Gameprog Lect2 Game Development
Gameprog Lect2 Game Development
What is a Game
A Computer Game is a Software Program
– Not a board game or sports
– Consider: chess vs. soccer vs. Warcraft
» What do you lose? What do you gain?
– Lose: 1) physical pieces, 2) social interaction
– Gain: 1) real-time, 2) more immersive, 3) more
complexity
A Computer Game involves Players
– think about audience. The game is not for you but for
them.
– Don’t just think about your story or the graphics or the
interface, but consider the players.
ملك وكتابة 1930
قصة عملة صدرت عام 1930تحولت
إلى لعبة شعبية
Game Example
Consider the game
– Three to Fifteen
– 2 player game
Goal:
– Collect a set of three numbers that add to 15
Rules
Setup
– Write the numbers 1 through 9 at the top of a sheet of paper
– Below that draw a line to divide the paper into 2 halves
– Choose a player to go first
Play Progression
– on your turn
» choose a number that has not yet been used
» cross it off the list of numbers at the top
» write it on your ‘half’ of the paper (to show it is yours)
Resolution
– if either player acquires a set of three numbers that add to 15
then that player wins
– if all the numbers are used and neither player has such a set of three then the
game is a draw
Game tokens
Anything the player directly manipulates:
cards, pieces, character, etc.
Costikyan: "To give a player a sense that he
controls his destiny, that he is playing a
game, you need game tokens."
Common Game Elements?
Games (implicitly) have players
Games are an activity
Games have rules ) Mechanics
Unreal
Unreal Engine
Engine 33
Middleware
Middleware Game
Game Engine
Engine
~250,000
~250,000 lines
lines C++
C++ code
code
Ogg wx ZLib
DirectX
DirectX OpenAL
OpenAL Ogg
Vorbis
Vorbis
Speex
Speex
Speech
wx
Widgets
Widgets
ZLib
Data
Data …
Music Speech Window Compr-
Graphics
Graphics Audio
Audio
Music
Codec
Codec
Codec
Codec
Window
Library
Library
Compr-
ession
ession
Introduction
Programmers create games
– But many great programmers not great game makers
With budget shift, emphasis has shifted
– Game content creators are artist and designers
Programmers can be thought of as providing
services for content
– But fate of entire game rests in their hands
Getting Started
A game must be planned in the same way
as any other software project.
Typically, this means someone must:
– Formulate a concept for the game.
– Flush out this concept into requirements.
– Architect design to meet requirements.
– Implement software embodies this design.
– Test and refine software into working game.
Prototype: Red Ninja
Rewards and Punishments
Value of an item (to an individual) closely
correlates with what it cost to acquire (money,
time, effort).
A player who has spent time and effort on
completing a task, expects to be rewarded.
Likewise a player who has failed in an objective,
expects to be punished.
If actions don't have consequences, then the game-
play is meaningless.
Three Kinds of Code
Gameplay Simulation
Numeric Computation
Shading
Gameplay Simulation
Gameplay Simulation
Models the state of the game world as
interacting objects evolve over time
High-level, object-oriented code
Written in C++ /C# or scripting language
Imperative programming style
Usually garbage-collected
Gameplay Simulation – The Numbers
Tools
What To Do, How To Do It
Programming or scripting?
– If starting from scratch, the game will likely need
to be programmed using a traditional programming
language.
– If using an engine, you may be able to program with a
traditional language, or you may have to use scripting
instead. Depending on the engine!
– While script writing is very much like programming,
it is not done using traditional languages, which
might not be what is wanted for a programming
course.
C++ (1 of 3)
Since then, C++ language of choice for games
– First commercial release in 1985 (AT&T)
+ C Heritage
– Learning curve easier
– Compilers wicked fast
+ Performance
– Used to be most important, but less so
– Maps closely to hardware (can “guess” what assembly
instructions will be)
– Can not use features to avoid cost, if want (ie- virtual
function have extra step but don’t have to use)
– Memory management controlled by user
C++ (2 of 3)
+ High-level
– Classes (objects), polymorphism, templates,
exceptions
– Especially important as code-bases enlarge
– Strongly-typed (helps reduce errors)
» ex: declare before use, and const
+ Libraries
– C++ middleware readily available
» OpenGL, DirectX, Standard Template Library
(containers, like “vectors”, and algorithms, like
“sort”)
C++ (3 of 3)
- Too Low-level
– Still force programmer to deal with low-level
issues
» ex: memory management, pointers
- Too complicated
– Years of expertise required to master (other
languages seek to overcome, like Java and C#)
- Slow iteration
– Brittle, hard to try new things
– Code change can take a looong time as can
compile
Java (1 of 3)
Java popular, and recently so for games
+ Concepts from C++ (objects, classes)
– Powerful abstractions
+ Cleaner language
– Memory management built-in
– Object functions, such as virtualization
+ Code portability (JVM)
+ Libraries with full-functionality built-in
Java (2 of 3)
- Performance
– Interpreted, garbage collection, security
- Platforms
– JVM, yeah, but not all games (most PC
games not, nor consoles)
+ Strong for browser-games, mobile
Java (3 of 3)
Used in:
– Downloadable/Casual games
Mummy Maze, Seven Seas, Diamond Mine
Poker, Blackjack
– PC
» Star Wars Galaxies uses Java (and simplified Java
for scripting language)
» You Don’t Know Jack and Who Wants to be a
Millionaire all Java
Scripting Languages (1 of 3)
Not compiled, rather specify (script) sequence of actions
Other games may use it lots more
Live births by age and race of mother: United States preliminary 2003 Ming Luo
1, 200, 000
1, 000, 000
800, 000
Live births
Al l races
600, 000 Whi t e
Bl ack
400, 000 Ameri can I ndi an
Asi an or Paci fi c I sl ander
200, 000
Asi an or Paci fi c I sl ander
Ameri can I ndi an
0 Bl ack
0- 14 15- 19 20- 24 Whi t e
25- 29 Al l races
30- 34
35- 39 40- 44
45- 54
Age of mother (years)
Is 2D always better than 3D?
NO!
Getting Started:
What To Do, How To Do It
2D 3D
Architecture of Engines
Scene Management
Memory Management
Event Handling
Rendering
Collision Detection
Architecture of Engines
User Specific:
Importing in Graphics:
– Models
– Animations
– Texturing
– All in specific format and standards
Tools: Creating Levels, Adding Triggers
Scripting tools
A look at Engines
Rendering Engines
– Licensed: C4, XNA; Open Source: Irrlicht,
Ogre 3D
3D Game Engines
– Unreal, Half Life, Torque, Never Winter
Nights
2D Game Engines
– Game Maker, Torque
Differ: Language, Flexibility, tools for visual
design and scripting
Game Maker
Tools Included:
– Scripting environment
– Level Editing
No Programming
knowledge required
Flexiblity:
– art content
– No interaction
model imposed
What you need to know?
Essential Concepts
– Object programming
– Co-ordinate system
– Physics
– Sprits and 2D animation
Design Concepts
– Level design
– Adding interaction model
Unreal Engine
Tools Included:
– Scripting environment
– Level Editing
Programming knowledge
required
Flexible:
– art content, Unreal content
supplied
– Interaction model, but
requires a large effort to
change
What you need to know?
Essential Concepts
– Object programming
– Event Based systems
– Threading
– Navigation
– Good Coding styles
– Inheritance, Reuse, Object Oriented
Programming
– Understanding someone else’s code
– Code Maintenance
– Pipeline
What you need to know?
Design Concepts
– Architecture design
– Cinematics
– Level design
– interaction model
C4
It is a library, C++
Tools Included:
– Level Editing
Programming knowledge
required
Flexible:
– Some art content
supplied
– No Interaction model
supplied
What you need to know?
Essential Concepts
– Programming C++
– Object programming
– Event Based systems
– Threading
– Navigation
– Good Coding styles
– Inheritance, Reuse, Object Oriented Programming
– Understanding someone else’s code
– Code Maintenance
What you need to know?
– Pipeline
– Engine Programming
Design Concepts
– Architecture design
– Cinematics
– Level design
– Adding interaction model
Alpha: Crash Bandicoot
Development Team Size
In the 1980’s might be single developer
Most teams today have 10-60 people
Programming in now a smaller part of
the complete project than before (need
good software engineering and media
design work)
70
Example 1988
3 programmers
1 part-time artist
1 tester
71
Example 1995
6 programmers
1 artist
2 level designers
1 sound designer
Contract musicians
72
Example 2002
2 producers
4 programmers
2 game designers
1 2D and texture artist
3 level designers
1 audio designer
4 animators
QA lead and testers
73
Development Milestones:
Development Timeline
Here are some example development
periods for different platforms:
– 4-6 months for a high-end mobile game
– 18-24 months for an original console game
– 10-14 months for a license / port
– 16-36 months for an original PC Game
74
Software Methodologies
Code and Fix
Waterfall
Iterative
Agile
Methodologies – Code and Fix
Really, lack of a methodology
– And all too common
Little or no planning, diving straight into implementation
Reactive, no proactive
End with bugs. If bugs faster than can fix, “death spiral”
and may be cancelled
Even those that make it, must have “crunch time”
– viewed after as badge of honor, but results in burnout
Methodologies - Waterfall
Plan ahead
Proceed through various planning steps
before implementation
– requirements analysis, design, implementation,
testing (validation), integration, and maintenance
The waterfall loops back as fixes required
Can be brittle to changing functionality,
unexpected problems in implementation
– Going back to beginning
Methodologies - Iterative
Develop for a period of time (1-2 months),
get working game, add features
– Periods can coincide with publisher milestones
Allows for some planning
– Time period can have design before
implementation
Allows for some flexibility
– Can adjust (to new technical challenges or
producer demands)
Methodologies - Agile
Admit things will change, avoid looking too
far in the future
Value simplicity and the ability to change
Can scale, add new features, adjust
Relatively new for game development
Big challenge is hard to convince publishers
Types of Games
80
Genres
Adventure
– Sub-genres include text-based adventure and graphical
adventure
– Zork by Infocom
– King’s Quest by Sierra
Action
– Superset of all other action-oriented genres
– Typified by fast-paced combat and movement
– Spacewar, Pong, and Space Invaders helped define the
genre
81
Genres
Action-Adventure
– Adventure games with action elements
– The Legend of Zelda was first break-out hit
– Jak 3, Metroid Prime 2 Echoes, and Resident Evil 4 are
modern examples of the genre
Platformer
– Typified by a character running and jumping in a side-
scrolling playing field
– Modern definition has expanded to include 3D
– Super Mario Bros., Sonic the Hedgehog, Pitfall! and
Super Mario 64 are examples
82
Genres
Fighting
– Players typically fight other players or the computer
using swordplay or martial arts
– Double Dragon is an example of a side-scrolling
fighter
– Virtua Fighter, Mortal Kombat, and Street Fighter.
First-Person Shooter
– Action game where player is “behind the eyes” of the
game character in a first-person perspective
– id Software’s Wolfenstein 3D and DOOM are the
earliest popular examples
83
Genres
Real-Time Strategy (RTS)
– Typically, a game in which the goal is to collect
resources, build army, and fight other player/AI.
– Popularized by Westwood’s Dune 2 and Command and
Conquer and Blizzard’s Warcraft
Turn-Based Strategy
– Like real-time strategy games, but turn-based
– Civilization, X-COM, Master of Orion, and Jagged
Alliance are standouts of the genre
84
Genres
Role-Playing Game (RPG)
– The video game counterpart to pen and pencil games
like Dungeons and Dragons
– Final Fantasy, Baldur’s Gate and Wasteland are some
popular examples of the genre
Massively Multiplayer Role-Playing Game
(MMORPG)
– An RPG set in a persistent virtual world populated by
thousands of other players
– Ultima Online in 1997 was the first popular one
– World of Warcraft is currently the most popular one
85
Genres
Stealth
– Characterized by a focus on subterfuge and planned-
out, deliberate play
– Metal Gear in 1987 was one the first
– Popular modern series include Metal Gear, Splinter
Cell, and Thief
Survival Horror
– An action-adventure or first-person shooter where
survival elements and fighting undead are stressed
– Resident Evil is easily the most popular series in this
genre
86
Genres
Simulation
– Based on the simulation of a system
– SimCity and The Sims are example of “God”
simulations where you control the lives many.
– Wing Commander and X-Wing are popular space
combat simulation games
Racing
– Games that involve competing in a race in a vehicle
– Typically try to re-create a real-world activity
– Pole Position was first popular racing game
87
Genres
Sports
– Games that simulate the sporting experience
– Breakouts include John Madden Football and Tiger
Woods’ Golf
Rhythm
– Gauge player’s success based on the ability to trigger
the controls in time to the beat of music
– Sometimes require specialized controllers such as
dance pads or bongo drums
– Rock Band, Guitar Hero
88
Genres
Puzzle
– Games that combine pattern matching, logic, strategy
and luck with a timed element
– Tetris is the breakout hit of this genre
Mini-Games
– Short, simple games that exist within the context of a
larger game
– Mario Party and Wario Ware are popular examples of
this genre
– FABLE II, Pub games
89
Genres
Traditional
– Computerized versions of board, word, and card games
– Battle Chess and Hoyle series are standouts
Educational
– Games designed to teach grade-school concepts to
children and young adults
– Oregon Trail was the first popular game in this genre
– The Carmen Sandiego series and Mavis Beacon
Teaches Typing are more modern popular examples
90
Genres
Serious
– A game designed to teach real-world events or
processes to adults
– Most are privately funded
– Popular with the US Government and the medical field
» "Sapphire" simulation trainer
91
Having the Idea
“How many industries can claim to deal in
daydreams?”
– Dreams are where every game begins
With an idea, don’t implement or tie down to
technology
“Genius is 1% inspiration, 99% perspiration” –
Edison
– Enjoy the 1% because everything else is hard work
Think of many raw ideas to throw into game
– May come up with hybrid
– Look at what can contribute to others so get emergent
game
The Creative Process – The
Beginning
Once you have an idea
– Is it really good?
– Worth spending time and money on?
– Even if “rehash” should bring improvement to
original and new challenges
– Discuss with someone that can appreciate the
idea
God Games
Brain Train (Nintendo DS)
Librarians congregate in OPAL and in SL to listen to
Michael Stephen's presentation on blogging for the
Alliance Library System, thursday June 15 2006.
Game Trivia
Game Trivia
Game Trivia
Game Trivia
Game Trivia
Game Trivia
Game Trivia
Game Trivia
Game Trivia