Functions of Game Engines

Graphics Rendering
Rendering is the final process of creating an image or animation  from a computer model. When rendering objects or characters in a scene it takes into account the geometric shape of the model, viewpoints, textures, shading and lighting. Which is then processed by the engine to a digital image or raster graphic, depending on how powerful your engine the faster the images will render. Rendering is an intensive process for your CPU and usually 50% of the CPU’s processing capabilities are taken up by it. Due to it being such a strenuous task there a methods that can be put in place in order to to utilise your processing capabilities more efficiently. Such as:

Culling Methods
In games there are often aspects of objects or NPC’s that aren’t visible to the eye thus making them useless rendering. In this circumstance you would use one of the ‘Culling’ methods to ensure that there is no form of waste rendering enabling you more processing power to dispose more efficiently.

  • Backface Culling – This is one of the most common forms of culling, it determines how many polygons are visible at the time that should be rendered. To do this the user has to specify which polygons are clockwise or counter-clockwise when projected on screen. Or in simpler terms anything on the backend of an object will not be rendered because it is not visible. For example in GTA you’ll see buildings from a front view, however the texture of the backend of the building won’t be rendered because it isn’t visible.
  • View Frustum This method of culling acts as a virtual camera showing your field of view. Anything that is outside of your field of view will not be rendered and remained culled, if it is not visible there is no reason for it to be rendered. View Frustum is a method mainly used in an First person game and is determined by the width/perspective of the camera, which is a geometric representation of visible content on screen.
  • Detail Culling – When in the view frustum, using geometry this method of culling will determine how far an object is and if it should be rendered or not. Depending on how far the object is the engine will appropriately adjust the level of detail in accordance of your distance, which is a more advanced feature of culling. For example on the other side of the map is a bin, from first site it might look like a block but the closer you get the more detailed it’ll be rendered to look like a bin. By doing this it adds more realism to the game
  • Portal Culling – Portal culling is when the engine segregates a scene from the rest of the map by determining which cells are currently visible and which ones aren’t. Regions of the map are divided into zones that are represented as polygons and once you have entered this particular zone everything outside of it becomes obsolete. Most commonly this method is used for Indoor scenes, again another way of saving processing power by only rendering whats in your view frustum in that particular room rather than everything in and outside of it. However if there was a window or an open door you would be able to see a rendered image, but this is through an entirely different view frustum that specifically calculates your position and what you should be seeing based on it..
  • Occlusion Culling – This is one of the hardest methods of culling purely because of it’s complexity. What this method does it sorts out the objects that is visible and re-positions anything that obscures this object within the scene. This is all determined by the position of the camera which will vary at different angles. This could be done by the Z-Buffer but it is very time consuming for bigger scenes, thus making the Occlusion culling the better option.


Figure5
Ray Tracing
This is a very advanced and complicated technique for making rendered images look more realistic, by  adding colour intensity, shading and shadows that would  be formed by having one of more light source. How it does is by tracing rays of light that would be reflected or absorbed by an object. For example if a player was crossing a road and a bus crossed drove past him, the path of light would be shining on the bus thus creating a shadow on the player.

Fogging
This is method used to shroud the players vision from witnessing any rendering processes taken place during gameplay. They do this by employing a fog gradient around your view frustum to progressively obscure your visions, until the level of detail increases. An example of flogging is in GTA when your looking down a straight road at a building but your visual sight is limited due to flogging. However the further down the road you go the LOD of the object will greaten.

Plumbers-Skyway-Tudor-GTA_IV

Shadowing
Shadowing also known as projective showing or shadow mapping, is the course of action an engine takes when rendering shadows to applied objects. These shadows are done in real-time, depending on if there is enough light within a pixel for it to be projected. In comparison to ‘Shadow Volumes’ (another shadowing technique) Shadow Projective/Mapping is less accurate. However Shadow Volumes use a ‘Stencil Buffer’ (temporary storage of data while it is being moved one place to another) which is very time consuming, whereas shadow map doesn’t making it a faster alternative.

Anti-Aliasing
Anti-Aliasing detects rough polygon edges on models and smooths them out using a quick scan method. The more edges a model has the easier the model can be scanned at once. This method is mainly used on the PS3 rather than the Xbox because it’s a more powerful console and has better processing power. However PC gamer’s may choose to turn of this rendering method because it often slows down the initial performance of your game.
Saboteur_Aliasing_000.jpg

Animation System
Animation is a technique used to render movement in computer generated models. These can either be pre-rendered or rendered in real time using two main methods inverse kinematics or forward kinematics.

Ragdoll (Real Time) – In earlier games developers had to create separate animations for death sequences. Now due to the advance technologies in games, physic simulations have become obtainable thus creating the ragdoll. Which is a skeletal replica that reacts appropriatly to it’s cause of death, giving various different outcomes to death scenarios making the game seem more realistic. For example in the ‘Force Unleashed series’ when your levitating an enemy using the force and your throw them or force push them the ragdoll would react accordingly to the speed and distance it was thrown. However if you was to do it again you couldn’t reenact the same scenario. 

Idle Cycle (Pre-Rendered) – This is a pre-rendered animation for still objects or characters. This gives the player more of a life like feel, giving the illusion that you are not just controlling him but it also has a mind of it’s own. Depending on the audience of the game the Idle animation may be more outrageous or subtle than others. For example in ‘Mario Galaxy’ which has a more younger audience, when Mario is idle he starts flicking coins. Whereas in Tekken which has a much older audience, it’ll have more natural Idle animations in reference to there fighting style. E.g. Eddie uses Capoeira fighting style so in his idle stance he’ll be sweeping his feet.

Forward Kinematics – This is a function for movement in animation and also is ued a lot in robotics. This method of movement is used for real time animation in things such as Rag dolls, where movement is started from the joints and moves forward through the arm. These are based on a number of kinematic equations that determine the movement of this animation.

Inverse Kinematics – In comparison to ‘Forward Kinematics’ this is the complete opposite. In the sense that movement starts from the outer joint and moves backwards through the body rather than forward. This method of animation is pre-rendered and is the most common form of animation in games. 

There are many other animation softwares that are available, but one that stood out the most to me was Team Bondies ‘Motion Scan’. Which is a new state of the art middle ware used by Rockstar to do the facial animations which were in L.A. Noire. How this is done is by sitting the actor in a rig surround by advanced cameras that pick up all subtle features as they act out there script. However the software is only a tool and is only as good as the actor who is performing there role. This animation is then processed and rendered into a 3D modelling software. 

Middleware
The middleware acts as an extension of the engine to help provide services that are beyond the engines capabilities. It is not apart of the initial engine but can be hired/rented out for it’s usage which can be for various purposes. There is an engine for any feature in game engines. For example the physics on Skate 3 were terrible, if you were to drop of your board you would bounce or fly to unrealistic lengths. In that circumstance for there next game they may want to hire out ‘Havok’ which is a well established and respected physics engine to help fix this problem. There are also other middle ware engines that you can hire out to assist your games in many ways like Demonware, they are a networking engine whos sole purpose is to improve your online features. 

Artificial Intelligence
Artificial Intelligence is creating the illusion of an NPC having realistic reactions and thoughts to add to the experience of the game. A common use of is ‘Pathfinding’ which determines the strategic movement of your NPC. In the engine you give each NPC a route to take and different options to act if that specific route is not accessible, this also takes other things into account like your level of health & the current objective at the time. These paths will be represented as a series of connected points. Another similar type of AI usage is ‘Navigation’ which is a series of connected polygons. Similar to Pathfinding it’ll follow these connected polygons only moving within the space, however they are not limited to one route. Thus having the space and intelligence to know what objects or other NPC’s to avoid it can take different routes depending on the circumstance. A fairly new method of AI is ‘Emergent’ which allows the NPC to learn from the player and develop reactions or responses to these actions taken place. Even though these responses or reactions may be limited it does does often give of the impression that you are interacted with a human-like character.

Other Systems

Graphics Rendering – Rendering is the final process of creating an image or animation  from a computer model. When rendering objects or characters in a scene it takes into account the geometric shape of the model, viewpoints, textures, shading and lighting. Which is then processed by the engine to a digital image or raster graphic, depending on how powerful your engine the faster the images will render. There are two types of rendering one being ‘Real-Time’ which is an on going rendering process that is calculated to show 20 to 120 frames per second. It renders graphics that are visually noticeable by the eye in a fraction of a second, an exmaple of a game that uses this is GTA wherever you move the engines renders with you and anything beyond your sight would still be in it’s wireframe state. The other method of rendering is ‘Non Real-Time’ in comparison to ‘Real-Time’ this method doesn’t render everything in your visual site, it renders specific things in order to save processing power thus giving you a better quality image. This method is mainly used for the cutscenes or cinematics, games will usually use both methods of rendering appropriately for there uses.

Collision Detection – This is the response taken when two or more objects collide with each other. Every game uses features of Collision Detection, however the level of importance it has in a game will vary. For example one method of intersect detection is ‘Bounding Sphere’, which is a sphere defined by a point, centre and radius that is placed around a character or object. Anything that penetrates this sphere is a detection of intersection, then usually an appropriate response is assigned to take. This is one of the simplest levels method of detection and is most ideal when accuracy isn’t a huge factor.
A second solution for Collision Detection is ‘Bounding Box’ which is a rectangular box surrounding your character or object. The Bounding Box has three values Width, Height and the Vector location and anything that intercepts this invisible square boundary is a sign of collision. Often a favourite for developers as it is mainly used for small objects in the mise-en-scene.

Physics – Physics are used to give the game some form of realism to the player. Depending on the game some would need more accurate physics that the other, for example a fighter jet simulation game would use more accurate physics in comparison to ‘Tom Clancy’s – H.A.W.X.’. If your in need of more accurate physics you might want to think about renting some middle ware. Havok is a specialised physics engine that may give you better results than making the physics yourself in the engine. As of the late 2000′s games are made to look more cinematic and the use of a good physics engine is detrimental for the realism of game.

Sound – Sound in game is detrimental because it’s a notifiable response that can occur from interactions in the game. Another purpose of sound is that it can add more realism to the game by having ambient sounds that make your environment more believable to be apart of. For example if the scene setting is in an army camp you’ll be able to hear marching, guns reloading or being shot, chants, groaning of injured soldiers etc. Or you could include soundtracks that bring out different emotions in the player, for example in Dead Space they use music to shift your emotions from calm to scared in a matter of seconds. Usually games are made and edited outside of the engine, however some engines do include there own auido technology.

Leave a comment