Unit 70 Report Title: What is a Game Engine Author: William Hughes
I certify that work contained in this assessment was researched and prepared by me.
Learner Signature: William Hughes
1.1 Introduction All games require an engine to run, from massive 3D PC games to small 2D mobile games. Game engines allow game developers to create and develop video games. They also run and compile the game so it is playable on hardware.
1.2 Types of Game Engine 2D Game Engines are used for 2D games which allow for movement throughout a flat 2D world in the X and Y dimensions. Popular 2D game engines include Gamemaker, Unity 2D, and Clickteam Fusion 2.5.
3D Game Engines are used for 3D games which allow for movement throughout a 3D world in the X, Y and Z dimensions. Popular 3D game engines include Unreal Engine, Unity 3D and Cryengine.
Mobile Engines are used for games on mobile devices. The most popular mobile devices currently run Android and iOS so many game engines are designed to port games to these operating system. Examples include Construct 2, Gamemaker, Stencyl and GameSalad.
Game Mods are third party modifications of finished games made by independent players. Mods add content, fixes, and overall improvements to the game. These are regularly not monetized and made just out of love and passion for the game. Some games are more compatible for modding than others. For example, Bethesda’s Skyrim and Fallout 4 are known for being incredibly friendly and welcoming to mods, whereas Rockstar’s Grand Theft Auto 5 is very unfriendly to mods even to the point of banning users who use them stopping them from playing the game. Installing mods is sometimes incredibly simple, other times, it’s incredibly complicated. For example, the Steam workshop allows users to download and install mods to games with only a simple click button, whereas games like The Witcher 3 require downloading mod files off the internet and moving them to a folder named mods where The Witcher 3 is installed or downloading an external program named “Nexus Mod Manager” to do it for you. Due to the complexity of mod installing for some games, some users decide to not use them due to lack of knowledge of how to do it. Mods have usually been a PC exclusive feature but recently Bethesda have brought mods to the PS4 and Xbox One. This is similar to the Steam workshop in that installing a mod is as simple as clicking a button. However, mods are more restricted on console than on PC as Playstation and Xbox are in fear that mods could cause damage to the system that could then be blamed on them. In response to security fears, Bethesda have recently brought out a system similar to mods named “Creation Club”. The Creation Club is a group of bethesda approved mods. However, as these mods have have been verified to work with the game and the system, the system costs money to use. This has posed fears over the future of modding as some people believe all future mods will have to become verified by the developers and cost money to use.
1.3 What do they do? Game Engines render the graphics and control post-processing of the game’s graphics. The game engine renders how the lighting and texturing work responding to the environment and gameplay changes. For example, in a mirror, the game engine can either use a pre-baked texture which won’t respond to changes in game (meaning you could not see yourself moving in the mirror) or be real-time and reflect changes in the environment (meaning you could see yourself moving in the mirror). The choice of which depends on what the engine supports, what the 3D artist and level designers want, and the devices they are designing for (real-time lighting and reflections are harder to render than pre-baked lighting and reflections meaning framerates are decreased further with real-time graphics).
Game Engines handle the scripting of the game. Most engines require scripting in a programming language such as JavaScript or C# in order for the gameplay to be as designed. Game engines make sure that the code runs when it should, and allows the code to modify the game and variables. Some game engines also support “drag and drop” scripting which does not require programming.
Game Engines handle the physics engine and collision detection of the game. Physics is how the objects interact with the environment and other objects. Collision detection can recognize when certain game objects go inside other objects. As a result, they can either stop it entirely, meaning that gameobject can not go through that game object, or have something else occur when they collide. Programmers can write code which is only ran when these two objects collide. This is useful for shooter and puzzle games. Without collision detection, everything would be falling down through the floor of the game. Game engines calculate the physics of the game by calculating travel from a list of variables such as mass, gravity and friction.
Game Engines handle the sound of the game. This means that it handles how the sound is sent to the speakers or headphones connected to the computer. As well as that, it handles when sound is played and any post-processing features. Some engines support realistic sound which simulate how sounds would sound in any given environment whereas some fake this simulation or just don’t do it at all.
Game Engines handle the animations of the game. This means that it handles how objects move and how they look whilst they move. This is especially important for fighting games as they rely on distinctive, smooth animations in order for the gameplay to be satisfying and competitive.
Game Engines handle the memory management, threading and performance of the game. For example, the game engine allocates certain parts of the game to memory in order to save re-loading of assets, handles how the CPU uses it’s cores and threading to run the game and how the GPU is used to run the game. Game engines handle what is culled (not rendered) and what is displayed throughout the viewport of the camera. Some game engines are better than others at optimization meaning some games run better on some engines compared to others.
1.4 Summary All games require an engine to run. Game engines aid the development of video games and allow them to run and compile on hardware. 2D games require 2D engine tools whereas 3D games require 3D engine tools. Mobile games are usually created with 2D engines due to lower system requirements. Game mods allow for third-parties and players to modify games to change and add content. Game engines do many things related to the development of video games including rendering the graphics and post-processing,handling the scripting,handling the physics,handling the sound,handling the animations,and handling the memory management and how the hardware interacts with the software. Game engines basically put all the the assets used in games development together in order to create a final compiled game. 1.5 | Bibliography / References
Unit 70 Report Title: Components of a Game Engine Author: William Hughes I certify that work contained in this assessment was researched and prepared by me.
Learner Signature: William Hughes
1.1 Introduction There are many components or parts to game engines due to their complexity. In this report, I shall be discussing what these components are and how they interact with each other to create a game engine. 1.2 Graphic Rendering Video games without graphics aren’t video games. Game engines carry out many different methods and tasks to render graphics to make them look atmospheric and impressive to match the game’s tone. Game Engines carry out real-time rendering meaning that when the player controls the game and changes the scene, the render is immediately executed and shown to the player instantaneously. If this real-time rendering is not fast enough, performance loss can occur such as frame rate and frame times suffering as well as prominent stuttering and input lag. Textures are applied to models to make them look more detailed. Textures are images either taken by a photo or created in image editing software which are then wrapped around a mesh. Lighting is used to help generate mood and atmosphere in video games. Different types of lighting works better for different art styles and games. For example, cel-shaded games like The Wind Waker use a very different lighting type to realistic looking games such as Uncharted 4. The Wind Waker uses a system where colours can only either be two colours, light or dark. Whereas Uncharted 4 uses a system where lighting is a gradient from light to dark. Uncharted 4 also has more prominent shadows and light sources. Level of detail is a method to improve performance with minimal visual loss. This method works by reducing the quality of textures and models which are far away from the camera. This works due to the fact objects far away from the camera are so small from the camera’s viewport that the detail of it is unimportant. This however can cause a problem where if the camera moves too fast, the player can see the textures and model meshes improve thereby breaking immersion. Fog is a method to generate a more sombre, spookier and darker atmosphere for your game. It can also be a way to improve performance due to how it hides parts of the environment so it can be safely culled. Culling is a system in game engines where specific game objects aren’t rendered at certain times in order to save performance. Occlusion culling is a method where only the gameobjects the camera sees are rendered. This improves performance but can cause problems where if the player moves the camera quickly, they could see the game objects becoming visible. Third person games commonly use this method due to how the player is often only looking in one direction and because moving the camera the opposite way can take a few moments giving the engine time to render it. Ambient occlusion is a method to increase detail and atmosphere in games. This is done by reducing light where two objects are very near each other. This is done as calculating lighting is still a very difficult process for engines to execute quickly and so this gives the illusion of simulating how light bounces around scenes without actually needing to do it. Anti-aliasing is a method to reduce “jaggies” or the effect of visibly seeing the pixels on edges or steep inclines in the environment. Increasing the resolution decreases the need for anti-aliasing as the resolution increase means more pixels are on the screen, making edges smoother. There are multiple different anti-aliasing effects but they both come from two different types. Fake anti-aliasing or real anti-aliasing. Fake anti-aliasing such as FXAA simply puts a blur on edges which is very performant but can cause the visuals to worsen due to blurriness. Real anti-aliasing such as MSAA directly improves the image by banding edge’s adjacent pixels together meaning they share coverage points. This is less performant than FXAA but generally looks better. Binary space partitions is a programming technique which divides scenes into two over and over again. This generates a tree where every branch has two branches attached to it. This is used to increase performance of 3D games as the location of objects can be easily obtained and specified. 1.3 Animation Systems Animations are how characters move visually in video games. A character without animations would be static and would look like they were gliding over the environment like a ghost. Some triple A game companies use motion capture as a means to create animations for their games. This is expensive and requires real life actors and and actresses but looks incredibly lifelike. Therefore, it is generally used for cinematic, realistic games as opposed to more cartoony, unrealistic games. Inverse Kinematics is a way of simulating bodies by calculating where specific joints are by calculations gathered from related data. This is very important for Virtual Reality games due to the fact that currently, only basic hand and head tracking is possible. Therefore, it is difficult to determine where the users arms and legs are. Some VR game developers use IK to attempt to determine where the players arms and legs are by doing complex calculations regarding the hand’s placement and rotation compared to the head’s placement. This can help with immersion as it allows the player to visualise themselves in the world more but can cause problems where arms or legs aren’t in the same place that the player model’s arms and legs are. This is very noticable when looking in mirrors in VR that allow the player to see themselves move in the world.
1.4 Systems Game engines have to do more than just render the graphics of a game. They also need to handle the controls, physics, sound, networking and much, much more of the game. They also make creating video games much easier for professionals and hobbyists alike. 1.5 Artificial Intelligence Artificial Intelligence or AI is used for non-player characters or enemies to feel real by interacting with the environment and the player. If the AI’s skill is too high, players will feel like they don’t have a chance and will therefore stop playing. However, if the AI’s skill is too low, players will feel as though they don’t have a challenge and once again, stop playing. As a result, it is important to match the AI to the player’s skill. Difficulty is determined in many ways including difficulty sliders,player progression and player ranks calculated from wins vs losses. Artificial Intelligence is sometimes used for multiplayer games as a way to keep game sessions full of “players” even when there is not enough actual people playing in that match. This means that even if only a few people were playing on that multiplayer server, they would still get the multiplayer experience with only a few people due to the AI increasing the number of players. However, this can can cause problems where the AI don’t feel real causing a disconnect between players. Pathfinding is how the AI knows where to move. This involves the AI finding a path to a select destination. The select destination is determined by the AI’s logic written by the game AI’s programmers. This could vary from finding the shortest path to the player, to finding the longest path to a specific location.