This document provides an overview of game architecture and development processes. It discusses the game loop, which involves updating the player and world simulation, and then rendering. It also covers pre-production, production, and maintenance stages. Pre-production involves prototyping gameplay and designing features. Production is when the full game is built iteratively. Maintenance includes patches, mod support, and ongoing content for multiplayer games.
1. Video Game Development: Game ArchitectureA. Babadi 1 of 52
In The Name Of God
Video Game Development
Amin Babadi
Department of Electrical and Computer Engineering
Isfahan University of Technology
Spring 2015
Game Architecture
2. Video Game Development: Game ArchitectureA. Babadi 2 of 52
Outline
Real-time applications
Game loop
o Updating
o Rendering
Updating the player and the world
Rendering and level of detail
Game loop in networked games
Preproduction
Production
Maintenance
o What is a mod?
3. Video Game Development: Game ArchitectureA. Babadi 3 of 52
Real-Time Software
Video games are real-time software applications.
The arrival of input information is highly unpredictable.
The application must process and respond to the input
accordingly.
This time-dependent information must then be displayed on a
screen.
4. Video Game Development: Game ArchitectureA. Babadi 4 of 52
An Example
Consider a software application designed to aid in air traffic
control.
Internals of this system consist of
o A data acquisition module,
o A display/computation module, and
o An interaction module.
Air traffic controller
5. Video Game Development: Game ArchitectureA. Babadi 5 of 52
All real-time interactive applications consist of 3 tasks running
concurrently.
Real-Time Loops
World
Simulation
User Input
Resulting State
Presentation
6. Video Game Development: Game ArchitectureA. Babadi 6 of 52
Game Loop
In a game, both the world simulation and the user input can
be considered tasks belonging to the same global behavior,
which is "updating" the world.
Updating Rendering
7. Video Game Development: Game ArchitectureA. Babadi 7 of 52
Game Loop
𝑙𝑜𝑛𝑔 𝑙𝑎𝑠𝑡𝑇𝑖𝑚𝑒 = 𝐺𝑒𝑡𝑇𝑖𝑚𝑒();
𝑤𝑖𝑙𝑒 (! 𝑒𝑛𝑑)
*
𝑖𝑓 ((𝐺𝑒𝑡𝑇𝑖𝑚𝑒() − 𝑙𝑎𝑠𝑡𝑇𝑖𝑚𝑒) > 1000/𝑓𝑟𝑒𝑞𝑢𝑒𝑛𝑐𝑦)
*
𝑔𝑎𝑚𝑒_𝑙𝑜𝑔𝑖𝑐();
𝑙𝑎𝑠𝑡𝑇𝑖𝑚𝑒 = 𝐺𝑒𝑡𝑇𝑖𝑚𝑒();
+
𝑝𝑟𝑒𝑠𝑒𝑛𝑡𝑎𝑡𝑖𝑜𝑛();
+
8. Video Game Development: Game ArchitectureA. Babadi 8 of 52
Game Loop
Game loop should at least be executed 25 times per second.
What if frames-per-second (FPS) rate varies?
Are there any alternatives?
9. Video Game Development: Game ArchitectureA. Babadi 9 of 52
1. Updating
We can divide updating block into 2 main blocks.
Updating the Player
Updating the World
10. Video Game Development: Game ArchitectureA. Babadi 10 of 52
1.1. Updating the Player
We need an updated snapshot of the player state in each
frame.
Getting the Input from Player
Restricting Player Interactions
Player Update
11. Video Game Development: Game ArchitectureA. Babadi 11 of 52
1.1. Updating the Player
How do the input devices work?
What factors usually restrict the player interactions?
Which step is the hardest one?
12. Video Game Development: Game ArchitectureA. Babadi 12 of 52
1.1. Updating the Player
How do the input devices work?
o Abstract device controllers (more in the next lectures)
What factors usually restrict the player interactions?
Which step is the hardest one?
13. Video Game Development: Game ArchitectureA. Babadi 13 of 52
1.1. Updating the Player
How do the input devices work?
o Abstract device controllers (more in the next lectures)
What factors usually restrict the player interactions?
o Geometric and logical restrictions
Which step is the hardest one?
14. Video Game Development: Game ArchitectureA. Babadi 14 of 52
1.1. Updating the Player
How do the input devices work?
o Abstract device controllers (more in the next lectures)
What factors usually restrict the player interactions?
o Geometric and logical restrictions
Which step is the hardest one?
o Restricting player interactions is usually the hardest step.
15. Video Game Development: Game ArchitectureA. Babadi 15 of 52
1.1. Updating the Player
How do the input devices work?
o Abstract device controllers (more in the next lectures)
What factors usually restrict the player interactions?
o Geometric and logical restrictions
Which step is the hardest one?
o Restricting player interactions is usually the hardest step.
Can we apply these rules to games like Tetris?
16. Video Game Development: Game ArchitectureA. Babadi 16 of 52
1.2. Updating the World
In addition to the player's action, the world keeps its own
agenda.
Which one is more important? The player or the world?
How can we process the whole world?
17. Video Game Development: Game ArchitectureA. Babadi 17 of 52
1.2. Updating the World
How can we subcategorize active and passive elements?
Game World Entities
Active Entities Passive Entities
18. Video Game Development: Game ArchitectureA. Babadi 18 of 52
1.2. Updating the World
How can we deal with these entities?
Game World Entities
Active Entities
Logical Entities AI Entities
Passive Entities
19. Video Game Development: Game ArchitectureA. Babadi 19 of 52
Passive Entities
These items play a key role in the player restriction section,
but are not very important for the sake of world updating!
In games with large worlds, we can pre-select a subset of
passive entities so that player restriction portion can only
focus on those entities.
But the majority of time in the world update section is spent
checking the other type of entities.
20. Video Game Development: Game ArchitectureA. Babadi 20 of 52
Active Entities
Sort According to Relevance
Update State
Sort According to Relevance
Sense Internal State and Goals
Sense Restrictions
Decision Engine
Update State
Logical entities
AI entities
21. Video Game Development: Game ArchitectureA. Babadi 21 of 52
2. Rendering
Usually any world-rendering pipeline will consist of 2 parts.
Selecting the Relevant Subset
Actual Rendering
We’ve already covered this subject in
“The Rendering Pipeline” lecture.
22. Video Game Development: Game ArchitectureA. Babadi 22 of 52
2.1. Selection
We only want to draw parts of the game world that are visible
from the player’s viewpoint.
Sometimes level of detail (LOD) technique is used too.
What are the differences between the player character and
other objects in the rendering step?
24. Video Game Development: Game ArchitectureA. Babadi 24 of 52
Getting the
Input from
Player
Restricting
Player
Interactions
Player Update
Sort According
to Relevance
Update State
Sort According
to Relevance
Sense Internal
State and
Goals
Sense
Restrictions
Decision
Engine
Update State
Selecting the
Relevant
Subset
Actual
Rendering
A Quick Overview
25. Video Game Development: Game ArchitectureA. Babadi 25 of 52
Game Loop in Networked Games
So far, we’ve only focused on single-player games.
Is the described model suitable for networked games too?
How are player and non-playable characters defined in a
networked game?
26. Video Game Development: Game ArchitectureA. Babadi 26 of 52
Game Loop in Networked Games
The player update section must change to make sure every
player update is followed by a broadcast message that sends
the newly computed position to other gamers through the
network.
AI section needs a special-case AI module that receives data
from the communications channel and reflects it to the local
gaming environment.
27. Video Game Development: Game ArchitectureA. Babadi 27 of 52
The Programming Process
We will now focus on today's production techniques and how
programming must be planned to ensure timely and complete
delivery.
Any modern game requires hundreds or thousands of source
files and several hundred thousand lines of code.
Game programming is a very complex task!
28. Video Game Development: Game ArchitectureA. Babadi 28 of 52
Development Stages
All game projects consist of three basic stages.
Preproduction
Production
Maintenance
29. Video Game Development: Game ArchitectureA. Babadi 29 of 52
1. Preproduction
The concept of the game is agreed upon.
Different technologies and solutions are evaluated.
Gameplay formulae are tested.
Some early concept art is created.
The result is a working prototype of the game.
The game design should be final.
30. Video Game Development: Game ArchitectureA. Babadi 30 of 52
1. Preproduction
It’s the only phase where a game company should be allowed
to experiment.
o It is a highly experimental phase!
The role of preproduction is, then, to analyze alternatives and
finally create a detailed plan.
o Technology is always seen as a potential risk!
Technology prototypes usually focus more on showcasing the
key elements of the gameplay.
o The presentation layer is kept in a very early and crude form.
31. Video Game Development: Game ArchitectureA. Babadi 31 of 52
Where Do Ideas Come From?
Most promising game projects start with a raw game design.
This is usually expressed in a single sentence that defines the
genre and gameplay as well as your role in the story.
"The game is a first-person shooter, with some outdoors areas
and large monsters, where you are a warrior trying to save the
princess."
32. Video Game Development: Game ArchitectureA. Babadi 32 of 52
Where Do Ideas Come From?
Your initial sentence must answer:
o Who is the player?
o What are his goals?
o What's the genre?
o How does the game play?
33. Video Game Development: Game ArchitectureA. Babadi 33 of 52
Alternative Paths
Sometimes, games start with a strong narrative description.
o "You are a scientist in a military complex full of soldiers who are trying
to conquer the world.“
Another game type is started because of some unique and
impressive technology.
o "let's build a game with this brand new outdoors renderer.“
Starting with the gameplay is a much safer bet.
34. Video Game Development: Game ArchitectureA. Babadi 34 of 52
Discussing Feature Sets
Lead programmer should at first define a list of features to be
implemented into the game, e.g.
o How many characters should be displayed?
o Will the user be able to pick objects?
This list should be crafted as a team effort between the design
and the coding team.
A good way of getting a reasonable feature set laid out on
paper is to use an expansion-contraction process.
35. Video Game Development: Game ArchitectureA. Babadi 35 of 52
Expansion-Contraction Process
Create an Exhaustive List
Clustering Features
Choosing Best Features
36. Video Game Development: Game ArchitectureA. Babadi 36 of 52
Minimax Method
A good, objective way to choose which clusters to implement
is to use the classic minimax method.
Minimax tries to minimize disadvantages and maximize
advantages.
This is usually depicted in a 2D matrix of cost versus benefit.
37. Video Game Development: Game ArchitectureA. Babadi 37 of 52
Minimax Matrix
Worst
Solution
Best
Solution
Cost
Importance
38. Video Game Development: Game ArchitectureA. Babadi 38 of 52
Minimin Features
Cost
Importance
• Mainly decorative elements
• Should be coded at the very
end of the project if time
allows.
• A good example is birds
flying by in a 3D adventure.
39. Video Game Development: Game ArchitectureA. Babadi 39 of 52
Maximin Features
Cost
Importance
• These features should be
dropped immediately.
• As an example, imagine a car
racing game where you can
see the driver inside the car.
40. Video Game Development: Game ArchitectureA. Babadi 40 of 52
Minimax Features
Cost
Importance
• Obviously, these should all
be built into the game,
assuming time allows for
them.
• Being able to configure your
character's look in a role-
playing game and AI
communication are two good
examples.
41. Video Game Development: Game ArchitectureA. Babadi 41 of 52
Maximax Features
Cost
Importance
• An outdoors renderer for a
flight simulator is a good
example.
• Is there an easier
implementation?
• Is your team capable of
handling the feature?
• Select some maximax
features and forget about
the rest.
42. Video Game Development: Game ArchitectureA. Babadi 42 of 52
2. Production
After completing preproduction and securing funding for the
game, production begins.
It’s the longest part of the process and usually takes between
one and three years to complete.
Production is often divided into milestones.
43. Video Game Development: Game ArchitectureA. Babadi 43 of 52
2. Production
The game takes shape following the planning that has been
laid out during preproduction.
The technology prototype built during preproduction will also
mutate to implement all the final features the game needs.
Production is usually where all the eye candy is put in place,
and games show their full technological complexity.
Art assets are created in a factory-like fashion, game levels are
crafted, and so on.
44. Video Game Development: Game ArchitectureA. Babadi 44 of 52
2. Production
At the end of this iterative process, a final version of the game
must be delivered to the publisher.
This process ensures that the game is virtually bug-free and
also reaches the desired quality standard.
In the case of console games, this process is a bit more
complex than for a PC title!
45. Video Game Development: Game ArchitectureA. Babadi 45 of 52
Agile Methodology
One method employed for game development is agile
development.
46. Video Game Development: Game ArchitectureA. Babadi 46 of 52
Milestones Are King
More is not better!
"On time" is better than "more ambitious.“
Surgical teams and key members are a risk.
Don’t forget the order of execution!
47. Video Game Development: Game ArchitectureA. Babadi 47 of 52
3. Maintenance
Games usually have a relatively short shelf life.
Support must be provided: patches, editing tools for the fan
community, and additional missions.
Maintenance is the moment when relationships with
consumers are at their highest point.
Games with good maintenance have longer shelf lives.
What about massively networked games?
48. Video Game Development: Game ArchitectureA. Babadi 48 of 52
Some Ideas
Release new content for the game.
o Extra missions or characters are easy to do.
o These contents can be placed on web sites for easy deployment.
o Remember that a good data-driven design is the key to success.
Provide users with content creation tools.
o A mod community can be started.
o Content sharing should not be seen as a potential problem but as an
opportunity to increase your user base.
o Many teams have hired personnel directly from the mod community
because they were the most talented users of the editing toolset.
49. Video Game Development: Game ArchitectureA. Babadi 49 of 52
Mod
A mod or modification is the alteration of the a video game in
order to make it operate in a manner different to its original
version.
An example of game modification in GTA: Vice City (2002)
50. Video Game Development: Game ArchitectureA. Babadi 50 of 52
Maintenance of Massively Multiplayer Games
Massively multiplayer games are a completely different
business when it comes to maintenance (or should we say
product development?!).
These games are actually created in the maintenance phase!
Because they are pay-per-play titles, keeping new content
pouring in is the best (and only) way to make the game
profitable.
51. Video Game Development: Game ArchitectureA. Babadi 51 of 52
There Is More Maintenance!
The maintenance phase is a great time to organize, archive,
and document.
Developers forget good coding practices during lengthy
crunch times.
Some maintenance time should go into revising your code,
and storing and documenting the reusable modules.
There's no deadline pressure on the maintenance phase.
52. Video Game Development: Game ArchitectureA. Babadi 52 of 52
References
Sanchez-Crespo’s textbook,
Wikipedia, and
Some other sources on the Internet.