Week 3 (Necessity of Game Engine)
Week 3 (Necessity of Game Engine)
1
Definition of Game Engine
A series of modules and interfaces that allows a development team to focus on product,
gameplay content rather than technical content.
2
Necessity of Game Engine
These games were simple and maximum performance essential on slow hardware.
Game Engines can make the process of creating a game much easier and enable
developers to reuse lots of functionality.
It also takes care of rendering for 2D and 3D graphics, physics and collision detection,
sound, scripting and much more.
3
Necessity of Game Engine
Usually depends on following
5
Components of Game Engine
A game engine typically performs a number of different roles. It is generally
structured as a number of sub-systems.
Examples:
Game Logic
3D rendering engine
Audio engine
Networking
Physics engine
Input
Graphical user interfaces (GUI)
Scripting
Networking
Memory Management
Scene Graph
Artificial Intelligence (AI)
6
How Game Engine Works
Game Logic
The main game program which contains the game logic.
3D Rendering Engine
Rendering engine which can be used to generate 3D animated graphics in your 2D
screen.
They provide a software abstraction of GPU using the multi-rendering API's like
Direct3D or OpenGL for video rendering.
7
Audio Engine
Audio engine which are used to control the sound effects.
They also provide a software abstraction of GPU using the multi-rendering API's such
as Open-AL, SDL audio, X-Audio 2, Web Audio for audio.
Physics Engine
Physics engine to implement 'physical' laws within the system.
Physics engines are software which allows performing fairly accurate simulation of
most of the real-life physical systems like the movement of rigid body and velocity
alteration and fluid dynamics, bounciness etc.
Gravity, collision detection, rotation & revolution, speed of objects and other such
applications are handled by the physics engine within the game.
8
Input
A game is nothing if it cannot be played, the game engine provides with support of
array of input devices like mouse, gamepad, touch etc. while also providing support for
devices like gamepad, joysticks etc.
There are many different ways of handling an input, two most commonly used are
through: events and polling.
Input events are captured by the computer (like right click of mouse, or pressing arrow
up key etc) and your custom code is triggered based on what input was received.
Polling is used to get the position values, for example on which coordinates(x,y) does
the mouse pointer is, or tilt angle of Game stick or the Smartphone using which you are
playing the game.
9
Graphical user interfaces (GUI)
Most games have their own GUI that fits the games theme, art direction, and
narrative.
That’s why a lot of game engines provide creators with tools to build their own
graphics user interfaces, such as buttons and drop-down menus, sliders and means
of combining different interactable elements.
Scripting
A crucial part of game engines is represented by scripts which you can use to define
the logic of your game components by adding behaviors.
With pre-build scripts, a solution provided by some game engines, you can easily
control the camera, the relationship between your game elements, and the animation
system which can be used to control character animation.
10
Networking:
Since a decade now, games support online multiplayer and social gaming, which
connects your gaming adventures with your friends.
Most of the gaming engines, provide complete support and scripts for such
requirements, so you do not have to worry about TCP/UDP traffic, social API
integrations etc.
Memory Management
Game engine used different memory management patterns listed as follows:
A Scene graph contains all of the geometry of a particular scene. They are useful
for representing translations, rotations and scales of objects relative to each
other.
12
Artificial Intelligence:
Knowing the kind of weapons the player will be using based on the situation or the
behavior of the player gets recorded and actions are performed accordingly, can be
done using specialized software embedded into the games.
The implementation of AI in games is usually done using ready made scripts that are
designed and written by software engineers who are specialized in AI.
For example: How our character reacts on hitting a wall, or seeing an animal etc.
can be done easily by building a tree of behaviour nodes, rather than writing
complex code.
13
Overview of Top Gamming Engines
• Unreal Engine
• Unity Engine
• Godot Engine
• Cry Engine
• Marmalade SDK
• AppGameKit
• Cocos2d-x
• MonoGame
• Amazon Lumberyard
• HeroEngine
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
THANK YOU !
35