Professional Documents
Culture Documents
Goals
To understand the fundamental modules running in a game To understand the fundamental structure of all video games
Objectives
Identify and implement the fundamental structure of all video games in C++ Identify and implement the different modules in a video game
Core Values
Creativity
Free your mind
Curiosity
Your thirst for knowledge can never be quenched
Patience
Everything will turn out just right
As a Software
Video Games are fundamentally, software. Development of Video Games follow Software Engineering Practices and Methods. Unlike Business applications, a Video Game should continue with or without User Input. A major difference between Video Games and other software is that development teams include more than just programmers. They include artists, level designers, writers, etc. similar to movie production.
Video Games
Video Games always require a computer to receive player input, perform logic and return feedback to the player. Thus, card games and board games are not considered Video Games (even if they have Video Game versions).
Sample Modules
Sample Modules
A Video Game is comprised of different systems working together Each system is further divided into subsystems. For example:
Game Logic may consist of Physics and AI Graphics may include 2D and 3D Resources may handle images, meshes, audio sources, etc.
Each module may have a Manager that would handle all the subsystems and their interactions between other systems Most of the modules correspond to specific hardware types
Specialized Modules
There are devices which have specialized hardware for specific modules. For example:
Physics Modules (Physics Processing Units) Post Rendering Effects (Digital Signal Processor) Network Module Logging (Debugging)
Game Manager
The Game Manager is the core of a Video Game. Ideally, it is the entry and exit point of the program. The game manager initializes the other modules in the game. All objects in the scene that are either visible, has logic or both is managed by the Game Manager. These objects are commonly called Game Objects.
Game Objects are anything that is visible or has logic
Time Manager
The Time Manager (or Timer) keeps track of the amount of time between iterations of the game loop Usually measured in milliseconds Other information that the Timer may keep track of:
Time elapsed since the Video Game started Time elapsed between video output (to determine or control frames per second)
Input Manager
The Input Manager (or simply Input) records the states of all available input devices to be used Input devices may differ per platform as listed:
For Desktop/Laptops; keyboard, joystick, mouse, webcam, microphone, etc. For Consoles/Handhelds; game pad buttons, joystick, IR, device orientation or motion, multi-touchscreen, camera, microphone, etc.
Output Manager
The Output Manager (or simply Output) handles feedback to the player Output is usually split into Audio and Video subsystems The Audio subsystem control the playing of music and sound effects The Video subsystem manages the visual feedback to the player, which may be in 2D, 3D or both
Input()
Input() calls the Input Manager to recheck all the states from the input devices
Update()
Update() contains the logic of the Video Game Objects react to player input or collisions Collision Tests, Physics and AI are also executed in the Update May not exactly be in the order as shown
Output()
Output() gives the player feedback Output devices differ per platform but they generally involve both Video and Audio Rather than displaying directly to the screen, we put the output in a buffer