Game engine
A game engine ( English game engine [ ˈgeɪmˌɛndʒɪn ]) is a special framework for computer games that controls the course of the game and is responsible for the visual representation of the course of the game. As a rule, such platforms are also used as a development environment and also bring the necessary tools with them.
The most commonly used 3D engines include the CryEngine , Frostbite , the Unity Engine, and the Unreal Engine .
Basic functionality
Depending on the engine, this may be a. from the following components:
Graphics engine
The graphics engine is responsible for the graphic representation on the screen. A graphics engine usually contains the following tools:
- Functions for loading, managing and displaying textures or sprites
- Text output
- Effects like fire, explosions, water, snow, fog
In the case of a 3D engine, the following tools are often added:
- Functions for loading, managing, displaying and animating 3D models
- Shader system for the most realistic possible representation of the effect of light and shadow on various materials (e.g. metal, wood or skin)
Physics system
Current games are being equipped with increasingly realistic physics systems ( physics engine ). In addition to greater visual realism, the physics system can also have an impact on the game if, for example, a falling object (e.g. a thrown hand grenade ) rolls down a hill instead of remaining on it. One can distinguish between different types of physics:
- Rigid body physics is widespread, i.e. the simulation of Newtonian mechanics for solid bodies.
- One aspect of rigid body physics is ragdoll physics : virtual characters can fall physically correctly.
- Some games also simulate the realistic behavior of soft bodies (e.g. flags, clothing) or fluids (e.g. water, smoke)
In 2005, physics engines also received hardware support, so-called physics accelerators , to outsource the calculation of physical effects to a special physics card or graphics card .
Sound system
Almost all current games and their underlying engine support 5.1 or 7.1 - surround sound and technologies such. B. EAX , appropriate PC hardware ( sound card ) and boxes required. This enhances the spatial impression of the game world by creating a differentiated spatial sound which, for example, allows the position of opponents to be located. In addition, different rooms such as bathrooms, halls, corridors, caves or underwater sound damping can be simulated. Other physical effects such as the Doppler effect can also be implemented with hardware acceleration.
State storage
There are two approaches to saving the current game status and reloading it again:
- Serialization of the object tree: All objects, their states and relationships are saved.
- Only certain data is saved. The advantages are small files and the game states can also be saved on memory modules of consoles. The disadvantage is a greater programming effort because the programmers have to program exactly what is saved. Due to this complexity, game engines therefore often fall back on simpler procedures, for example that the game state can only be saved at certain points in the game.
control
Imprecise control quickly leads to frustration. While the developers of earlier PC games still used the arrow keys on the keyboard , there are now other, more suitable solutions for different genres. In the racing games division , this is the steering wheel, possibly with force feedback support. When playing sports games, such as the FIFA series, many players use gamepads .
Joysticks are usually used to control aircraft and spaceships . Simulations designed for high realism often allow the use of multiple control systems in order to e.g. B. to be able to use a high-quality circuit in a racing simulation next to a steering wheel. In the flight simulation scene, modular systems allow the construction and control of complete cockpit replicas .
Strategy and building games are usually controlled by the mouse . In first-person shooters , third-person shooters and other similar genres , a combination of mouse and keyboard has prevailed.
Network code
The network code determines the requirements for the multiplayer part of a game, e.g. B. how many players can take part in the game at the same time or whether a 56k modem is sufficient or a broadband internet connection such as xDSL or TV cable is required.
The developer can choose between the two network protocols UDP and TCP . The advantage of TCP is the security that data arrives at the client safely and in the correct order. UDP, on the other hand, is faster, but packet duplication, packet loss or mixing can occur. Most of the time, both protocols are used at the same time to send volatile data over UDP and secure data, such as logging in over TCP.
Data management
Data management is required for loading and saving scores, user and level data and for memory management. Game engines therefore have the following functions:
- Loading files from data packages ( e.g. encrypted ZIP files)
- Memory management
Scripting
Script languages are used to program the game processes. In principle, game sequences can also be programmed in the development language, but script languages offer the following advantages:
- Script languages are easier to learn than pure development languages for game designers who are not necessarily professional programmers.
- Script languages can often be done iteratively during program execution, which shortens development time; Recompiling the engine code is not necessary.
- The game engine is becoming more universal and can also be expanded by users
The execution of a scripting language is slower than hardware-related, compiled programs such as C / C ++. Therefore, game engines are rarely written in a scripting language, but are preferably implemented in C ++. Usually the game engine provides its own scripting language. A two-layer architecture has therefore been established, especially for larger game productions: the actual game is developed in the script language provided by the underlying game engine.
Some game engines use existing scripting languages, such as Lua . Due to the special requirements, many game engines have their own scripting language, for example UnrealScript in the Unreal Engine , C-Script or Lite-C in the 3D GameStudio , Clonk , or Perch in the Shark 3D engine.
Differences between engines for consoles and PCs
Game engines for consoles
Modern consoles differ technically from PCs mainly in the following aspects:
- Significantly less main memory
- All devices of one type are equally powerful.
- Special hardware, especially for calculating the 3D graphics
- optical media CD / DVD / Blu-ray Disc as the primary storage medium
Depending on the console, the hardware can be programmed in a similar way to PC hardware; However, this is then at the expense of quality, since the console hardware is then not exhausted. Since the technical key data of consoles typically fall significantly behind current PCs, optimal use of the console hardware is important for a good game engine. Console engines therefore usually have a lot of code that is developed exclusively for a specific console. Since CD, DVD or Blu-ray Disc are noticeably slower than hard disks and , on the other hand, loading times for consoles should be particularly short, the organization of the data on these media and the loading technology play an important role.
Certification process
Games published for consoles must go through a rigorous certification process from the console manufacturer. In order to pass this, the games must meet an extensive list of requirements, for example certain requirements for loading times. Most of the requirements have significant consequences for the underlying game engine. Because of these requirements, console game engines typically have a completely different software architecture than PC engines.
Porting from console to PC
Simple, however, is the move from consoles to PC: An engine that runs on consoles, can usually easily on the PC port , because there the demands are lower. However, when it comes to games of this type, computer gamers often complain that the game on the PC does not take advantage of the more extensive possibilities of current PC hardware. A classic example are PlayStation 2 games, which have also been ported to the PC, and which you can often tell that the graphics were designed for the technically rather limited console hardware. Another aspect is that game developers only have to develop consoles for fixed hardware, while a PC game has to run on PCs with a wide variety of equipment. This has less influence on the software architecture , but means for the game developer that he has to extensively test the engine with different hardware configurations.
Development tools
Development tools play an increasingly important role in the development of computer games. Many professional developers now even attach greater importance to this than to the actual game engine. You can roughly distinguish between different approaches, which are usually used in combination:
- Plug-ins for existing programs. For example, such plug-ins enable data from known 3D modeling programs to be converted into a special format for the game engine.
- Standalone programs.
- The game engine has built-in editing functionality. This is not very practical for consoles.
- Dynamic connections: Changes made in stand-alone programs or plug-ins are taken over directly by the game engine. This process is particularly established for professional console development.
The so-called turnaround times are becoming more and more important : the faster a game developer sees the result of his changes in the game, the more productive he can work. Since game productions are becoming more and more complex, this aspect plays an increasingly important role. For this reason, the development tools and the game engines are increasingly interlinked.
Engines for playing existing game data
Since older games ( DOS ) no longer run easily on current platforms, dedicated developers have started various projects to write new engines for interpreting game data. In this case, the project usually only provides the engine, the game data has to be provided by the user (in this way the developers do not infringe the copyrights of the original manufacturers). Examples of this are ScummVM , an interpreter that runs on modern platforms for the SCUMM scripting language from LucasArts- Adventures and others, or Exult , a post-programmed engine for Ultima VII and Ultima VII Part 2 .
List of game engines
literature
- Jason Gregory, Jeff Lander: Game Engine Architecture . First edition. Taylor & Francis Ltd., 2009, ISBN 978-1-56881-413-1 .
- Jonathan Blow: Game Development: Harder Than You Think . In: ACM Queue . tape 1 , no. February 10 , 2004, p. 28-37 , doi : 10.1145 / 971564.971590 ( queue.acm.org ).
- Eike Falk Anderson, Steffen Engel, Leigh McLoughlin, Peter Comninos: The case for research in game engine architecture . In: Proceedings of the 2008 Conference on Future Play: Research, Play, Share (= Future Play '08 ). ACM, New York, NY, USA 2008, ISBN 978-1-60558-218-4 , pp. 228–231 , doi : 10.1145 / 1496984.1497031 ( c-sheep.org [PDF; accessed September 11, 2012]).
- Valente, Luis and Conci, Aura and Feijó, Bruno: Real time game loop models for single-player computer games . In: Proceedings of the IV Brazilian Symposium on Computer Games and Digital Entertainment . 2005, p. 89–99 ( guff.stage.tigris.org [PDF; accessed July 29, 2012]).
- Steed, Anthony and Oliveria, Manuel Fradinho: Networked Graphics: Building Networked Games and Virtual Environments . Morgan Kaufmann, 2009, ISBN 978-0-12-374423-4 .
- White, Walker and Koch, Christoph and Gehrke, Johannes and Demers, Alan: ACM Queue . tape 6 , no. 7 . ACM, November 2008, ISSN 1542-7730 , p. 18-25 , doi : 10.1145 / 1483101.1483106 .
Web links
- Monster project - article on game development by Yager in NZZ Folio , issue 05/05.
- Cotton: Canonical Game Loop
Individual evidence
- ↑ Unity, UDK, Unreal Engine 4 or CryENGINE - Which Game Engine Should I Choose? , digitaltutors.com (English), quote: “The most popular game engines are Unity, UDK, Unreal Engine 4 and CryENGINE.” accessed on October 31, 2014.
- ^ Howard Wen: Exult: The Open Age of Ultima. In: Linuxdevcenter. O'Reilly Media, April 24, 2003, accessed January 19, 2016 : “Exult replaces Ultima VII's engine so that the game can be played on other operating systems and platforms. It also expands the graphics capabilities of the game and adds features not present under the original engine. (A legal copy of Ultima VII is required in order to use Exult.) Lord British (aka Richard Garriott) himself, the creator of the entire Ultima franchise, has given the Exult team his unofficial blessing. "
- ↑ Exult (English) - developer site at SourceForge (accessed on: March 24, 2013)