Game Engine Research Paper

Game Engine Research Paper

Video Game Engines: A Research Report By Ryan Strawn Monday, April 14th, 2014 Table of Contents Section 1 - What is a Game Engine? (page 2) Section 2 - What Does a Game Engine do? (page 3) Section 3 - Types of Game Engines (page 7) Section 4 - Conclusion (page 9) Bibliography - (page 10) What is a Game Engine? ! A game engine is a tricky thing to define, the term is often thrown around in the gaming community but not everyone really knows what one is. The reason for the confusion is because engines come in many forms, and the actual implementation of one would be lost on someone unfamiliar with software development. Let’s preface a more in depth description by talking about how a computer works. A computer at the ground floor is a series of physical circuits either on or off, on top of that the values string together into commands eventually forming an operating system, the operating system can then create applications based on higher level programming languages, these languages can then be used to operate game engines and web browsers. As we can see “computers work on a principle which can be described as layers of abstracted complexity”(Michaelenger). !Game engines lie on top of the stack of complexity I described, so the wikipedia definition seems somewhat appropriate; “...a software framework designed for the creation and development of making video games”. A game engine takes common tasks of coding that are generally involved in game development and provides them in an accessible library, this allows developers to create their games without having to build everything from the ground up. !With all I’ve said, the idea of a game engine still seems a bit muddy and abstract, so I will try to provide an analogy. All cars need an engine to function and drive the vehicle forward, and if you were to develop a new type of car it could be advantageous to buy a prebuilt engine rather than putting the pistons, cylinders, and other part together from scratch, then the team could spend more time on the body, paint, stereo system, etc. All games use components that would compare to a car engine; animations, loading, displaying, user input, collisions, physics, etc. With an an engine in place, developers can spend more time on the parts of the game that make it unique like graphics, gameplay, characters, levels, and more. What Does a Game Engine Do? - Components/Terminology ✦ Graphics !Let’s say that we want to add a character, item or icon (referred to in game development as a sprite) onto the screen in our game. If we were to do this without a game engine, the seemingly simple function of displaying an image in a certain location could take 100 lines of code or more, but with an engine like Cocos2D (used for making iPhone games) it only takes this: CCSprite *sprite=[CCSpritespriteWithFile:@"sprite.png"]; sprite.position = cpp(100, 100); [game addChild: sprite]; !This is a great example of how a game engine performs actions behind the scenes, actions that have already been hashed out and implemented many times before by other programmers. !A game engine can contain many graphic features, most include functions for animations, lighting systems, fades, layers, scaling, resolution. All of these would typically take a lot of complex code, the language of the engine can access and utilize more quickly. ✦ Physics !Many modern games utilize some form of physics to simulate real world interactions between the world and the player. Most of us are familiar with Angry Birds, it uses physics to operate it’s entire gameplay theory with falling, teetering, and destructible blocks. Physics can simulate gravity, friction, velocity, bounciness, mass, and other properties. Some popular physics engines are Box2d, Havok, and PhysX, and they are typically packaged into other game engines. These physics code sets are extremely useful to developers because they contain complex mathematic equations that are anything but simple to program from scratch. ✦ User Input !This is the essential part of a game, the interactivity of a game happens when the user enters a command and things start happening. Inputs can vary greatly depending on the type of game that is made and that platform it is for; mobile games use touch commands, pc run games likely use the keyboard and or the mouse, and console systems like Playstation or Xbox use their own unique controller. A game engine can streamline the process of preparing a game for one or many of the platforms in a feature called input handling. The engine will “listen” for inputs, meaning that it is ready for a certain key to be pressed, and when a press and/or release is recognized it will trigger an “event”. The event could be anything from moving the player, character action, or opening a menu. ✦ Scripts/Behaviors ! A script within a game engine is a piece of code that can dictate when a reaction or event is supposed to occur, they are also referred to as behaviors in some engines because they determine when and how things should act within the game. A script could trigger an event like a scene or level change, a manipulation of the lighting or camera, or a character, enemy or item being added or removed from the scene. These scripts, like many other features of a game engine, are prebuilt sections of code that would otherwise be very long and time consuming to write. ! ✦ GUI ! GUI is an acronym that stands for graphical user interface, it refers to on screen text and menus, informational and instructional text. Drawing text with certain fonts and colors on screen with interactive buttons is not highly complex to code, nevertheless if a game engine provides a customizable gui system it can save a huge amount of time. Every game’s user interface is going to be unique and custom, designing one that matches the game’s visual style and caters to it’s gameplay is very important. !Below is an example of how to add an interactive button with text within the Unity game engine which uses javascript as it’s main language. // JavaScript function OnGUI () { if (GUI.Button (Rect (10,10,150,100), "I am a button")) { print ("You clicked the button!"); // C# using UnityEngine; using System.Collections; public class GUITest : MonoBehaviour { void OnGUI () { if (GUI.Button (new Rect (10,10,150,100), "I am a button")) { print ("You clicked the button!"); ✦ Sound ! Engines can handle sound and music. Game engines can assist developers by triggering sounds and music during specific events, they can also place the audio in a 3d field which will make the sounds come from a specific area within the games environment. The sound features in an engine can affect volume, panning, distance and also add pitch modulation depending on the characteristics of the environment. All of these ways of affecting and handling audio give a game depth and create an immersive experience. Often times audio goes under-appreciated in games, but if the audio is of low quality everyone will notice and it could sink a game’s success. ✦ Porting ! A huge advantage of using a game engine, and one of the reasons that most developers will opt to use one rather than building from the ground up, is that engines typically provide a means to publish/port to multiple platforms (android, ios, web, ps, xbox, pc, steam, etc.). ✦Networking ! Many modern games use some form of online play component, and it can be a huge selling point or even a key element the gameplay revolves around. The scripts that engines provide can help solve the connectivity issues between servers and devices that arise when making giving a game online features. Types of Game Engines ! Game engines come in many varieties that cater to different game genres, developer preferences, team and project sizes, and programming skill levels. The differences between engines, how they are classified and used is vast and even daunting, there are literally thousands of game engines. ✦Mobile, 2d, and 3d ! Certain game engines cater specifically to mobile gaming, they have scripts that allow porting to android, html5, ios and are optimized for touchscreen controls and displays. Many of the 2d game engines allow you to publish to mobile, and some allow you to port to consoles as well. 3d game engines are much more complex and multifaceted than 2d. 3d worlds in engines like Unreal and Unity involve massive terrains, models, lighting, and other aspects that place them in a whole different category. ✦API’s, SDK’s, and Visual Interfaces ! API stands for application programing interface, it utilizes a certain type of programming language to create a library of coding functions. An SDK is a software development kit, it combines multiple API’s together and a variety of development tools like modeling, animation, environments, physics. Some examples are the Adobe Gaming SDK, the Corona SDK, and Valve’s Source SDK. Most SDK’s are supported in online communities with coding/scripting examples and definitions of the functions and features it contains. Most of these API’s or SDK’s are non visual, there are no buttons or menus to navigate and they require the user to start from script/code to get a game up and running, a lot of programming knowledge is required for these. !Lately there is a trend to provide a visual interface for the engine, it turns the coding of the engine into a full blown software tool, one that could potentially be used by someone who is not a programmer. Some of the visual editors like the 2d engines GameSalad, Stencyl, and Gamemaker and the 3d engine Unity are excellent for high speed creative development, and appeal to indie developers or small teams.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    10 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us