Understanding Game Architecture
People who are creative and artistic, find devotion in sharing their dreams, thoughts and visions. A Painter does so by painting, while a Musician creates music. Similarly, programmers want to automate and make your life easy, and game designers want to make their thoughts and ideas to come to life through their games.
Every standard game consists of some series of levels: embedded and closely related with the storyline of the game, action and adventure sequences to live, spectacular visuals to experience, and they challenge our mental abilities by exploring and bringing out our tactical & strategy making skills. Games are the most unique, of all entertainment mediums because of its interactive power with its audience.
Most of the games, give the player(s) the most important role of the story: the Hero. Which is a great way to invlove the player into the gameplay.
Architecture of a Game
The architecture and structure of a game is similar to that of a software. But it does have some additional components which makes it different from a software. Every game has the following components:
- Graphics Engine
- Sound/Audio Engine
- Rendering & Vision-Input Engine
- I/O Devices (like, Mouse, keyboard, speaker, monitor etc)
- DLL files and Drivers/Device APIs
All these above mentioned components combine together to make a game playable to its full extent. Before discussing each of them, let's just clear what an engine is. Engines are the self-processing component(s) of a complete process that are driving automatically behind the original process.
A graphic engine is a software which in association with an application program helps to draw graphics on your computer's display device.
The word engine in the computer field refers to a software which helps performing some definite type of processing on programs, such as text-to-speech engine, a database engine, a layout engine and a graphics engine. Graphics engine helps to make your game's graphics better by increasing the resolution and increasing the number of pixels per unit area. This engine also makes your game's scenes clear and run smooth.
The audio/sound engine is the component that consists of algorithms for dealing with sound and in-built programs are written into it to handle the sound effects embedded in the game. It has the capability to perform calculations using the CPU, or on any dedicated ASIC (Application Specific Integrated Circuit). Abstraction APIs, such as Open-AL, SDL Audio, X-Audio 2, Web Audio, etc. can be available within this engine.
Rendering and Vision-Input Engine
The rendering engine along with vision input system produces 3D animated graphics, using different techniques, like rasterization and ray-tracing. Being programmed and compiled to be executed on any CPU or GPU straightforwardly, majority of rendering engines are developed upon one or more rendering APIs like Direct3D and/or OpenGL that offers a software abstraction layer for the Graphics Processing Unit (GPU).
Low-level libraries like DirectX or OpenGL are popularly incorporated in games because they supply the hardware-independent access to different computer hardware. These hardware devices can be input devices like mouse, keyboard, and joystick; network devices like NIC and also to sound cards.
The devices which are used for inputting the data and the programs in the computer are known as Input Devices. Input device can read data and convert them to a form that a computer can use. Output Devices can generate the finished product of machine processing into a form usable/readable by humans. For a game, there should have to be a strong interaction between the user and the game he/she is playing. So for this the peripheral devices like mouse, keyboard, joysticks and monitors play a major role to make the game interactive.
DLL files and Drivers/Device APIs
A DLL (Dynamic Link Library) file, is a type of file which includes instructions written in the form of programs which can be called or used by other programs for performing certain tasks. In this manner, different programs can share the abilities and characteristics that have been programmed into a single file.
These system level files play a supporting role to build the architecture of the game and help to make it perform well. You might have noticed that, if you have installed a game which you want to play and you click the executable(.exe file) to run the game, and just before starting of the game, an error message pops up, with a message - <particular_dll_name>.dll is missing". These files are the supporting files that your system should have to make the game work.
Again, a device API can be defined as API (Application Programming Interface) which lets the developers to create any application which can ultimately interact with hardware devices plugged or installed with your system. A device API normally provides end users to employ their plugged or associated hardware for interacting with the system. Majority of the games (popular) need these device drivers and APIs to make the game work with all its components running successfully.
These five components make the architecture of a game both internally as well as externally.