The Purposes & Functions of
Components of Game Engines
Task 2:
Contents page
- Purpose of game engines
- The history of game engines
- 2D and 3D game engines Comparison
- Game engines & Game enthusiasts
- Game Engine Illustration and Functions
- OpenGL, DirectX and API explained
- Game Engine terminologies
- Conclusion
Purpose
of game engines
First
of all a video game engine is a software frame designed for the development of video games. Game developers use Game engines to create games for consoles, mobile devices and personal computers (pc). The main features provided
by a game engine includes: a rendering engine (also called a renderer or a graphics rendering) for 2D or 3D game graphics. A physics engine ( this
includes collision detection/ collision response), sound; and artificial intelligence. To save effort and profit when making a game, developers will reuse the same game engine to create different game or to even make it easier to port games over from different platforms such as pc to Xbox/PlayStation. A example of this being done is the game Dungeon defenders, released august 25, 2010, and has been released on Xbox Live Arcade, PlayStation Network and PC. It was made in Unreal engine and shows how the same game being used by the same game engine can be used cross platform with few changes to controls and the system. The reason game engines are so important is because it is what holds the game together, if you were to take away the games engine, the game as a whole would not work anymore, its like taking the batteries out of a remote. you can take away the thing that powers the remote and put it into something different to make it work. A game engine takes care of anything related to rendering, functionalities of a game. This would include things such as AI and collision detection. It also provides the capacity for 2D and/or 3D rendering facilities
Physics engine
& Collision
detection
A physics engine is a software on a computer
which copies and simulates physical attributes. This can be for rigid body
movement I this also includes collision detection) soft body and fluid dynamics.
There are
two types of physics engines: real time and high
precision. The high-precision physics engines needs more processing power to
calculate the precise physics
and are used by scientists and computer animated movies (animations for things
such as games as well). Real time physics engines are also used in video games
and other forms of interactive computing (this is a software which uses inputs from humans as it runs). It uses
simplified calculations and decreased accuracy to compute in time for a game to
respond at an appropriate rate for game play.
Collision detection is the detection of two object meeting in a intersection. Its how when two objects meet they normally collide and have a effect which occurs. A example would be that if a player character collides with a a wall type object, the collision detection should make it so that the two objects wont phase through each other. Another example would be a player character passing through a force field. The player character would be able to go through the field.
Graphic Rendering
Artificial intelligence
Artificial intelligence is an independent program
which a programmer has created so that it can make its own ‘choices’ as such,
when it needs to take a certain action. Artificial intelligence basically follows
a sort of event list. An event list is basically being when “if this happens,
do this”. This is done in games so that if the player does a certain action, a
NPC (non playable character) will react in a way it is told to (if a response has been programmed by the
game programmer) to respond to that player’s action. This makes the games more
immersive and also guides the player by seeing how the NPC’s AI will respond to
their actions (if you hurt a NPC in the game ‘Skyrim’ for example, the whole
village will become hostile and try to kill you.)
An example of Artificial intelligence (AI) in video games
is the NPCS in the video games ‘Dark souls 3’ and ‘Fallout 4’. In dark souls 3
there are 2 types of AI you will find. Neutral ones and Aggressive ones.
Neutral AI’s in this game are scripted so that they will not attack you until
you damage them enough. There are very rare accounts of any NPC’S which are
passive whole and whole. These neutral AI’s have an event list for quests that
you can do for them. Normally when you first meet them, they will have a few
lines saying who they are, next time you speak to them they will have a quest
for you to do which involves you doing something for them or helping them in
some way. Once this is done this then activates another event which allows the
player to access the next quest they have available. The other type of NPC, the
aggressive type, is scripted normally that when you player reaches a certain
area, does/collect something or just dies, the NPC is scripted to spawn in
(appear in the level). From here the AI may have a event to, once spawned in,
to go find the player. Once it has found the player it will attack. Depending
on how well scripted the AI is, it will behave differently to how the player
acts. It may attack when the player moves away, try to parry if they use a slow
weapon or just all in all run away. It all depends on how the programmer has
written the AI’s event list, if it’s to go full out power attacks or go full
defence and avoid as many attacks as possible.
The sound engine is the part of the system which takes care of anything that is related to the games sound. It takes care of all of the processes that need to be done to do its function. It produces these sounds by finding the sounds that have been added to the game and then plays these sounds when it is needed. A example of this would be a jumping sound. When the player jumps the sound engine needs to locate the sound that is attached to that motion/animation and play it. There is different effects which can be used in a sound engine such as 2.0 and 7.1 (surround sound) which gives more depth to the game as it allows the player to hear certain sounds from different directions ( this could also include layered effects such as mono audio for atmospherically effects such as music and surround sound for things such as footsteps to give indications to the player. A sound engine is important as it is what immerses the player. It allows them to a part of that games world but if the sound is not at a good standard of there at all it could defeat the whole purpose of that game. If it was a horror based game It would get rid of the suspense and just ruin the game. It could also ruin the experience for the game as a whole if sounds are off or gone as a whole. Without a sound engine a game is practically ready for failure.
The history of game engines
Over the history of game engines, technology has improved which in cause have improved the quality of game engines themselves. Game engines have come from running games like the original 'Legend of Zelda' which was played on the Famicom Disk System to running a game such as a legend of Zelda breath of the wild. Nintendo use their own personnel game engines which are not named but just by comparison without knowing the system can we see the difference between the technology available. The standard of what people think is good and acceptable. The fact that the first Zelda game was a low pixelated game with 8 bit music and the new game is one of the most graphically beautiful games yet.
A example of a game series used on a specific engine would be the series XCOM. The two games i will talk about are: XCOM: Enforcer (made in unreal engine 1); and XCOM: enemy unknown (made in unreal engine 3). Enforcer was released in 2001 and this can be easily seen by its minimal sound quality and its low quality graphics/low poly count. The sounds is quite displaced and is quite fuzzy, showing how early on in the games engine history it was made. XCOM: enemy unknown, was made in 2012 and compared to the quality of its predecessor it is a master piece. The sound quality is clear and cleaner, music wise and voice acting wise; the visual quality is crisp and at a good quality. Gameplay though is also quite different but this is because of designer choice. When comparing the two game you can tell that many things have improved. The model rendering has improved as well as the quality and textures of the models. The sound engine has improved as sounds have less interference and are a lot clearer. There are more gameplay options and improved physics engines.
Overall these examples show that over the history of game engines, they continue to improve overtime and as every game engine is updated and improved, more and more games are made which out do its predecessors .
2D and 3D game engines Comparison
In this section I am going to be comparing the two game engines Construct 2 and Unity. Whilst Unity can make a 2D and 3D games, Construct 2 makes 2D games. (people do try to make 3D games, or at least make games look 3D.) whilst taking into account that they have similar functions, they also have some big differences. A example of a similarity would be that both use a basic physics engine. When it goes into detail a 3D engines physics engine is a lot more complex but the basic things such as box collisions and platform objects are the same. Another similarity would be that both have a sound engine. Both may a 2 directional sound (stereo audio) as a base sound but a little difference between the two sound engines is that a 2D engine wouldn't have multi directional sound like a 3D engine. The reason for this is because it is o a 2D plane so that you dont need to hear something that physically doesn't work in the game.
Some more differences between a 2D and 3D game engine would be that whilst both use a rendering engine, 3D engine would be a lot more complex and require a more processing power. There would be a lot more things to render such as tessellation in the game 'Rise of the tomb raider'. (basically makes things look more natural, footprints in the snow, hairs on plant stems etc), and rendering lighting and shadows which really isn't needed in a 2D game. Another difference would be that 3D game used 3D models and 2D games use pixel art and sprites. These are a lot less complex as 3D models and take a lot less time to animate.
Game engines & Game enthusiasts
Game engines have helped game enthusiasts to create their own games as it has allowed them to explore with multiple different programs to see what developers use and to find which ones they like. It allows them to experiment with these programs, which then brings them into the world of game development. People who are big into any type of 2D or 3D games may want to see what its like to make these sort of games which may lead them into this career in the future.
Game enthusiasts may look at what other people have made with these game engines and may feel inclined to donate money to the game engines developers so that improvements can be made to it to make it simpler to use and easier to use for people who are new to the engine. It will allow them to use codes such as c# without actually directly interfering with the code itself. A example of a game enthusiast is a You Tuber called Bang yang who created the game, by himself, called 'Lost Soul Aside'. Created fro UE4, and inspiration taken from the FF15 trailer, it is a very well developed game which could be compared to a triple A game.
Game Engine Illustration and Functions
In this section I'm going to show you how to add objects, how to apply functions/actions on the objects as well as providing evidence of testing a game by using Unity's game engine. I will also talk about the rendering process and taking into consideration the rendering process as well as things i need to take into consideration when rendering video game.
YoutubeLinks:
https://youtu.be/4cscogAOEJg -running my game
https://youtu.be/Prju_8vAzS8 -Why We Take Rendering Into Account
OpenGL, DirectX and API explained
API, also known as Application program interface, is a set of
rules and tools used for building software applications such as: JavaScript;
OpenGL; Word press; and Direct3D. These
normally show how parts of a software should be used, also API's are used for
GUI (graphical user interface) aspects. The GUI is a way for us to interact
with computers. It uses windows, icons and menus for us to navigate through. 3D
modelling can be applied to API in a beginners guide as it is a method where it
allows the creator to create something without directly intervening with the
code of the system, it allows it to work on multiple platforms without having
to edit for each different plat form. An
example of a API is java script. JavaScript is a simple programming language
made and used to interact with web pages. It is a very light programming
language used across platforms. A example of JavaScript being used would be that
it can change the change HTML content of a page.
This would be done by using
the following
<!DOCTYPE html>
<html>
<body>
<h2>What Can JavaScript Do?</h2>
<p id="demo">JavaScript can change HTML
content.</p>
<button type="button"
onclick='document.getElementById("demo").innerHTML = "Hello
JavaScript!"'>Click Me!</button>
</body>
</html>
This basically
says that when you press the button on this page: https://www.w3schools.com/js/tryit.asp?filename=tryjs_intro_inner_html, it shall change the text of that page to
what is scripted.
A graphics pipeline is
what translate a 3D model you have created onto what you see on your screen. It
is the process of what your computer displays on your screen. The way this is
carried out heavily depend on what system; software you are using; and display
of your system.
Because of this programs like Direct3D and OpenGL were created so that
similar steps could be taken on all systems without having to do drastic
measures. The overall job of the API is to make sure that the overlying system
was clear and easy to use and to make sure they are kept away for the complex
codes underneath such as Graphics hardware accelerators like NVidia, Intel and
AMD.
Game Engine terminologies
Graphic
rendering
Culling Methods:
Culling is a term used to describe how any object in a final image that does not contribute to it will be removed. This software can be stored inside a: GPU; CPU; and a graphics card. If you cull a lot in your work and early on in the project, it will decrease the amount of processing work that is needed.These different methods include: Frustum Culling; No static culling techniques; portals; anti-portals; and many others. Each has their benefits and disadvantages.
Rendering Techniques:
Rendering is the method of making a photo realistic/non-realistic
image for either a 2D or a 3D model or a scene ( a collective of models). This
is done through the method of computer programs and then showing the final
render. There are different rendering techniques though which are used: Radiosity,
ray tracing/casting; and Rasterization. Rendering is the method of
making a photo realistic/non-realistic image for either a 2D or a 3D model or a
scene ( a collective of models). This is done through the method of computer
programs and then showing the final render. There are different rendering
techniques though which are used: Radiosity, ray tracing/casting; and
Rasterization.
Lighting:
In graphic rendering, the lighting is the simulation of recreating realistic lighting onto a object/scene. It is quite often extremely accurate and used as much as possible for a better project quality.
Textures: Textures are normally a image that is place onto a 3D objects, 2D planes in 3D space, or GUI in a 3D game engine/modelling engine. Another term for texturing is colour mapping.
Animation
systems
Path-based: path based animations are quite simple really. You get a object and key frame it at a specific point, lets say frame one. The you move to frame 10 and move the object to a new location and key frame it. Once this is done the system should animate the in-between of these two key frame points. So basically it just fills in what you haven't done.
Forward kinematics: Forward kinematics are a chain of bones inside of a 3D modelled body. The difference of this to Inverse Kinematics is that it doesn't just move what is connected to it. It moves everything that is below that specific joint. A example of this would be the shoulder joint. Anything from the to the fingers will be affected by any manipulation. You can have multiple of these in the model.
Systems
Physics: Physics is how objects interact with each other. A example would be how you don't want to have your player model fall through your world so you give it the properties of box collider and rigid body.
Effects: Effects would include things such as a object have a light pulsing from it, having the object spin and having the item disappear upon collision with the player model (maybe added to a score)
DirectX: This can be seen as a mass collection of API's which allow for tasks for things such as game programming. It is used fro the visualisation and graphic side of the project
Conclusion
Over all i have discussed The Purpose Functions & Components of Game Engines. and what they entail. I have discussed how they work and how over time they have improved and raised our expectations of games quite high. I have discussed terminologies linked to game engines such as AI, fuzzy logic fogging, textures and so on.
Bibliography
- https://www.youtube.com/watch?v=z5El-yYNUwU
- https://forums.unrealengine.com/showthread.php?118030-Lost-Soul-Aside-a-fantasy-action-game
- https://www.youtube.com/watch?v=xNCeypH72AQ
- https://www.youtube.com/watch?v=3O0Z8Fv31l0
- https://en.wikipedia.org/wiki/X-COM:_Enforcer
- https://en.wikipedia.org/wiki/List_of_Unreal_Engine_games
- http://zelda.gamepedia.com/BS_The_Legend_of_Zelda
- https://en.wikipedia.org/wiki/Shadow_mapping
- http://www.pcmag.com/article2/0,2817,1156299,00.asp
- https://en.wikipedia.org/wiki/OpenGL
- https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/what_is_directx.mspx?mfr=true
- https://en.wikipedia.org/wiki/Tessellation
- https://en.wikipedia.org/wiki/DirectX
- http://whatis.techtarget.com/definition/fuzzy-logic
- https://en.wikipedia.org/wiki/Fuzzy_logic
- https://en.wikipedia.org/wiki/Behavior_tree_(artificial_intelligence,_robotics_and_control)
- https://www.youtube.com/watch?v=qv6UVOQ0F44
- #http://playground.tensorflow.org/#activation=tanh&batchSize=10&dataset=circle®Dataset=reg-plane&learningRate=0.03®ularizationRate=0&noise=0&networkShape=4,2&seed=0.69308&showTestData=false&discretize=false&percTrainData=50&x=true&y=true&xTimesY=false&xSquared=false&ySquared=false&cosX=false&sinX=false&cosY=false&sinY=false&collectStats=false&problem=classification&initZero=false&hideText=false
- https://en.wikipedia.org/wiki/Behavior_tree_(artificial_intelligence,_robotics_and_control)
- http://yr12iptanimation.weebly.com/path-based.html
- https://www.youtube.com/watch?v=w1O0iu85QCo