The Purpose and Components of Game Engines
The Purpose and Components of Game Engines
The Purpose and Components of Game Engines
Wilf Bangham
Game Engines are a framework for creating games that many creators will use to speed up the
process of making games. The engine provides shortcuts for developers by giving them a base for their
games, so that they dont have to build up the games from scratch, as developers had to do in the early
years of making games. The functions supplied by game engines include: Physics, Collision, 2D/3D
Graphics, Sound, Animation and coding (or Scripting), plus several other helpful building blocks.
Most Game Engines will provide a graphical user interface so that the user can easily make their
game, and the tools they provide (the aforementioned functions) are laid out around the main
environment.
(Figure 1 - The Unity UI)
Figure 1 is the Unity Engine user interface. As you can see, the functions provided by the engine are
surrounding the main environment area, being the area in the middle of the engine.
There two largest commercially available game engines are the Unreal Engine (made by Epic
Games) and the Unity Engine. Unity is typically easier for people to pick up, because it was created to be
a cheap engine by a group of Danish colleagues. Unreal was made in the opposite area; by high end
developers at the studio Epic Games, who used it for all their games, including the Unreal series. Epic
Games decided to release the engine to the public after they were sing it for their own studio, before
deciding they could generate a lot of profit by making it available for public use. Each engine has its
pros and cons, and therefore different people will have different preferences when it comes to which one
the prefer. An experienced game designer named Steve Theodore said, [Unity] is open, very flexible,
and easily adapted to a lot of uses, implying that it is better for beginners in the game design industry. A
game lecturer called Jeremy Choo said, you can trust [the Unreal Engine] to manage a large / complex
game, showing that it caters to more experienced users.
Terrain
The unity engine provides tools for the creation and manipulation of terrain. This includes,
raising, lowering and painting textures over the terrain. The textures of the landscapes will need to be
made and designed by the studio, but can be easily imported into the Unity assets folder to use within
the project. This provides a quick way to create simple terrain, which can then be further manipulated
and tweaked with things such as bump maps and alternate skyboxes.
(Figure. 2 - Simple Terrain)
Figure 2 shows a simple terrain made in unity. The terrain can be smoothed to create a natural
appearance, improving areas of the terrain that can appear jagged or misshapen. Unity also provides
asset packages, which can be used in the initial creation of the world, to help visualise certain aspects
such as environmental features (water and trees), or even controllable characters in both the first and
third person perspectives. Unity can also make use of height maps, or images in monochrome that will
generate a terrain based on the black and white values. This allows random terrain to be made, which
in many cases can make it look more natural than if the developer were to create it by hand, which
would take more time and effort than these height maps. Terrain is one of the most important aspect of a
game, as it is the base of the world that the player will walk around in, and Unity provides tools to make
simple and complex terrain easily and quickly.
Rigidbody
Adding the Rigidbody component to an object in unity will make it respond to the built-in Unity
physics engine. This makes the object adhere to gravity, which is useful for a game where objects will
fall or can be pushed by the player. A Rigidbody is required to alter the objects position inside the
game, and it can be pushed, requiring that its mass is lower than the object trying to move it. The
Rigidbody settings can, however, also be set to ignore gravity, which could come in handy in a game set
in space or on another planet, where the gravity could be a different value. Another use of rigidbodies
are to ensure the player cant interact with the object, but it can still move. The IsKinematic option
allows the object to be moved with scripts or animation. This can be useful for objects such as door,
which will slide if a player steps in a trigger, and will make sure it cant be pushed out of the wall by the
player if they get around the trigger.
(Figure 3 - Rigidbody in action)
Figure 3 shows the Rigidbody component in action for multiple objects, and how it is able to drop
objects by applying them to the physics engine. As you can see, each object is able to interact with one
another, and they will all bounce off each other according to the physics set by the engine. Rigidbodies
are extremely important in games where objects need to move and respond to forces such as gravity.
Colliders
Colliders can be imposed on objects to create a barrier around an object so another game
object cant pass through it. The collider can often be pre-loaded onto an object, in the case of the cube
in Figure 4.
The collider can be edited in multiple ways. The size of it can be expanded to for an invisible wall that
will not allow an object to pass through it. This could be used in a game to create an invisible wall
preventing the player from accessing an area until later in the game. The collider can also be made into a
trigger, so the object that the collider is attached to can be passed through by an object or player, but
can cause a response from another object when the trigger is stepped in. This could be activating
speech, an object to move, or a cutscene to play. This could create a seamless gameplay experience,
with doors opening automatically or another character to begin walking somewhere. Triggers are often
used in modern games to activate events such as items dropping or a change in the environment (eg.
Day/Night or weather). The material of an object can also be changed in the collider, allowing it to take
on the properties of a material, such as ice, wood, rubber or a bouncy object. This will make it
respond to other objects differently. The ice material will make it slide along the ground, and the
bouncy material will make the object very bouncy. This can be used to make realistic interactions with
objects such as ice blocks or sports balls.
Particles
Particles in the Unity engine are made through the effects component, and can be used to
simulate many forms such as weather, light, dust and fluids, among other effects. Particles can be
added to objects, or they can be created as a separate object, which will then be emitted from an
invisible shape. The shape can then be stretched to increase the area where the particles will appear,
but unless the emission is increased. However, the developer needs to be careful with this aspect, as the
max number of particles needs to be set as a higher number than the particles per second, or the
spawning particles will be held until the current particles have disappeared.
The particle system in figure 5 is the basic object that will appear when making the object from the
menus. The particles can then be sized, coloured, spread and have a collision detector set on them.
Simple particles like these can be made into snow without too much editing required, but more complex
particle systems such as smoke or fire can be created with more time and editing of the attributes.
Particles can be used in games by developers to further enhance environments with small effects that
can make the game feel more immersive and realistic, such as small bits of grass floating when walking
through grass of sand being kicked up. The downside of particles are that too many will slow the game
down, as having two alpha channels overlap requires more of the graphics cards memory. Particles can
be optimised however, by making them smaller, reducing the number, or (in the case of weather), having
it follow the player instead of being spread across a whole area of the terrain.
Audio
Audio in Unity can be complicated. Sound is a very important part in any game and mixing
sounds over each other can make testing them difficult. Audio sources in Unity are components that can
be added onto objects, and can be edited to accommodate the distance, volume, pitch and priority.
These options can help a developer to create a more immersive experience, as sound can be used to
change the mood or attitude of the player.