The Nitty Gritty of Game
Development
Life in and around the Game Industry
NVIDIA Corporation
Overview
―Quick‖ Bio
Anatomy of the Game Industry
Engine components
Life as a Game Developer
Getting there from here
NVIDIA Corporation
―Quick‖ Bio
2002-2003 Electronic Arts
Command & Conquer Generals
Design Support / Audio / Optimization
2003-2005 TimeGate Studios
Kohan Kings of War, Axis & Allies
Graphics / Audio / Optimization
NVIDIA Corporation
―Quick‖ Bio
2005-2009 NVIDIA Corporation - Architecture
8800, 9800, gt 2xx
Performance Simulators
2009-Pres NVIDIA Corporation - Developer Technology
Wut
NVIDIA Corporation
Developer Technology
Game Optimization
Developer Education
GDC, Siggraph, etc
New feature integration
Tessellation
3D Vision
Research
Realtime Per-face Texture Mapping
PN-AEN triangles (crack-free PN triangles)
NVIDIA Corporation
Anatomy of the Game Industry
Developers
Make Games
Publishers
Finance Games
Advertise
First Party – Developers that are owned by a publisher
Bioware, id, Maxis, Ensemble (RIP)
Third Party – Independent development houses
Valve, Epic, Gearbox
NVIDIA Corporation
Developers from 10’
Large developers often split into two or more teams:
Engine Team (usually one)
Game Team (usually one per title in simultaneous development)
Engine Team focuses on reusable components
Game Team focuses on everything needed for one game
Other aspects of Game Development
Art – Models, Textures, Animation
Sound / Music
Design – Level design, Gameplay design, etc
Q/A – Make sure everything works!
Production – Everything else
NVIDIA Corporation
Art pipeline from 5’
Art is a complex pipeline with many pieces
Concept art – 2D artwork that conveys mood and tone
Modeling – In a DCC such as 3DS Max or Maya
Unwrap – Often combined with Modeling these days
Sculpting – Creation of normal maps
Rigging – Assigning a skeleton to vertices for animation / attachments
Texturing – Material properties to be applied to a model
Animation – Everything relating to model motion
NVIDIA Corporation
Engine Components
Modern engines are as complex as some OSes
Filesystem
GUI
Controller input (Keyboard/Mouse/Gamepad)
Windowing system
Audio
Rendering
Threading / Fibers
AI
And have strong realtime requirements
60 Hz is only 16.66… ms
NVIDIA Corporation
Filesystem?
Problem: fopen is verrrrrrry slow
Solution: WADs.
Giant conglomeration of all files (at least of one type) needed by the game
fopen only called once
Header read from the file into memory
As other data is needed, just fseek into the wad and fread big chunks
But you don’t want everyone to have to know about the WAD
Generally use Fseek or engine::fseek, etc.
NVIDIA Corporation
GUI
Today’s games support complex, rich interaction with gamers
Some embed complete HTML renderers (!!)
Problems: Relying on the OS’s windowing system…
Makes it harder to port
Subjects the developer to OS bugs
Solution: Homegrown
Often built with Scaleform or similar technologies
But still require significant game development and time
One of the most important aspects for making a game feel ―tight‖
NVIDIA Corporation
Audio Engine
Scheduling, play and decode of audio effects
Play and decode generally handled by the Miles Sound System
~10Ks of titles have used MSS
Scheduling, pre-caching and prioritization still handled by
application, though
As well as placement and movement throughout the world
Generally 32 or 64 voices can be dealt with at once
Application prioritizes based on volume, importance, distance, etc
Other samples are culled
Avoid clipping!
NVIDIA Corporation
Threading
Amdahl’s Law: A system can only be as fast as the sum of the
length of the critical path.
By and large, games tend to be mostly single-threaded
But this subjects them heavily to Amdahl’s Law
Multithreaded programming is still hard
Most common thread division
Main Thread – Message Pump management, simulation updates
Rendering Thread – Just issues D3D calls as fast as possible
Loading Thread – Loads assets from disk asyncronously
Main thread is still subject to Amdahl’s Law
NVIDIA Corporation
Why not thread the simulation?
For peer-to-peer topologies, this is very hard
Need absolutely deterministic behavior on all clients
To make this possible, would need to make agent updates commutative
Client-Server is no picnic, either
Still subject to all of the usual multithreading issues
And client-server tends to have radically fewer agents
NVIDIA Corporation
Rendering
My personal favorite 
Typically split into two phases
View phase
Draw phase
View Phase makes broad determinations about visibility
Simulation updates view objects, which always exist
What is on screen? Near the screen? Far away?
Which chunks need to be resident in memory?
Which can be evicted from a cache and pushed back to disk?
NVIDIA Corporation
View Phase (cont’d)
Many types of visibility determination
Chunking
View Frustum culling (Bounding volume testing)
Occlusion queries
Quad or Oct trees
Once an object is determined to be on or near screen
It is submitted to the rendering queue, which will actually draw it
If the data is not available to render, the view might ask to load it
It might block (causing a stall—yuck)
Or it might just say ―load this asap, we’ll skip it this frame‖
Avoiding stalls without breaking immersion is tricky
NVIDIA Corporation
Draw Phase
D3D9 is still the most common :,(
Consoles control this
D3D11 is becoming more common
OpenGL is (unfortunately) the Linux of graphics APIs
Technically superior, but somewhat unloved
2008, THE YEAR OF OPEN/GL
2011, THE YEAR OF OPEN/GL
2015, THE YEAR OF OPEN/GL
Fear not!
Which API you know is less important than understanding the graphics
pipeline.
NVIDIA Corporation
Types of Renderers
Two main forms of real-time rendering
Forward rendering
Deferred rendering
In forward rendering, objects are shaded final colors, including
all lights, as you go
If N is # objects and L is # lights, then naively this is O(N * L)
Can mean waste as you render an object, then render something over the
top of it. D’oh!
Can be mitigated with a depth prepass
First, only lay down depth
Next, render objects, but use a depth test of == with no depth write
NVIDIA Corporation
Deferred Rendering
Deferred rendering is two-pass
First pass, lay down material properties
In theory, this is good, simple shaders
In practice, this is fairly bandwidth intensive, which directly translates to W
Second pass, apply lighting.
For N objects and L lights, deferred rendering is O(N + L)
Better!
And no real need for a depth-only prepass
NVIDIA Corporation
AI
Broadly ―what should NPCs do?‖
Can often be a significant portion of the frame time
More convincing AI is often more expensive
But there are also ―tricks‖ that can look convincing without
actually being expensive
NVIDIA Corporation
Breakdown of a frame
In most games, Care and Feeding of the GPU is the most
expensive CPU task
Talking to the APIs is unfortunately expensive
Better with D3D11 and OGL, but still an issue
AI / Pathfinding is generally the second most expensive chunk of
time
Both suffer (fundamentally) from Amdahl’s Law:
The GPU is a giant state machine, so it’s difficult to hold many
conversations with it at once
AI needs to reason about the game world, and that is hard to do if the
game world isn’t frozen in time (at least briefly)
NVIDIA Corporation
Life as a Game Developer
NVIDIA Corporation
Life as a Game Dev
Initially, very hard
Expect long hours
And comparatively low pay
Many, many, many programmers want to be game developers
Like all of you
Multiplied by every college in the country
Except University of Florida, because… Florida.
But the game industry isn’t that big
So supply and demand is working against labor
NVIDIA Corporation
Life as a Game Dev (cont’d)
Move Early, Move Often
Most areas have 0-2 game developers (heavily skewed towards 0)
This means as a developer, you will move geographically and frequently
The game industry has an abnormally high divorce rate
Approaching 75%. Yikes.
Spouses often refer to themselves as widows with husbands/wives
You do not play games for a living. 
NVIDIA Corporation
Crunch time
Crunch is ubiquitous
Even Valve
Suckitude of crunch varies by employer
Much better at Valve, id, EA (modern EA)
NVIDIA Corporation
Still not dissuaded?
Ship titles. Shipped titles are freedom in the game industry
Figure out what’s important to you, and negotiate for that.
You will be a peon for your first game. I’m sorry!
To be fair, you’ll be a peon for your first gig regardless
But Game Industry Peon << Any other industry Peon
There are upsides
Everyone you work with loves games as much as you do
You get to work on your hobby
You get immediate feedback about the cool shit you’ve done
You can point to something tangible, and say ―I made that.‖
You will be the hero of kids everywhere
NVIDIA Corporation
Getting there from here
So how do you get there?
Good fundamentals. I cannot stress this enough.
Algorithm analysis, quick O estimations
Computer organization and assembler
Debugging
Be sociable / personable
Personal Projects / OSS
NVIDIA Corporation
Questions?

The nitty gritty of game development

  • 1.
    The Nitty Grittyof Game Development Life in and around the Game Industry
  • 2.
    NVIDIA Corporation Overview ―Quick‖ Bio Anatomyof the Game Industry Engine components Life as a Game Developer Getting there from here
  • 3.
    NVIDIA Corporation ―Quick‖ Bio 2002-2003Electronic Arts Command & Conquer Generals Design Support / Audio / Optimization 2003-2005 TimeGate Studios Kohan Kings of War, Axis & Allies Graphics / Audio / Optimization
  • 4.
    NVIDIA Corporation ―Quick‖ Bio 2005-2009NVIDIA Corporation - Architecture 8800, 9800, gt 2xx Performance Simulators 2009-Pres NVIDIA Corporation - Developer Technology Wut
  • 5.
    NVIDIA Corporation Developer Technology GameOptimization Developer Education GDC, Siggraph, etc New feature integration Tessellation 3D Vision Research Realtime Per-face Texture Mapping PN-AEN triangles (crack-free PN triangles)
  • 6.
    NVIDIA Corporation Anatomy ofthe Game Industry Developers Make Games Publishers Finance Games Advertise First Party – Developers that are owned by a publisher Bioware, id, Maxis, Ensemble (RIP) Third Party – Independent development houses Valve, Epic, Gearbox
  • 7.
    NVIDIA Corporation Developers from10’ Large developers often split into two or more teams: Engine Team (usually one) Game Team (usually one per title in simultaneous development) Engine Team focuses on reusable components Game Team focuses on everything needed for one game Other aspects of Game Development Art – Models, Textures, Animation Sound / Music Design – Level design, Gameplay design, etc Q/A – Make sure everything works! Production – Everything else
  • 8.
    NVIDIA Corporation Art pipelinefrom 5’ Art is a complex pipeline with many pieces Concept art – 2D artwork that conveys mood and tone Modeling – In a DCC such as 3DS Max or Maya Unwrap – Often combined with Modeling these days Sculpting – Creation of normal maps Rigging – Assigning a skeleton to vertices for animation / attachments Texturing – Material properties to be applied to a model Animation – Everything relating to model motion
  • 9.
    NVIDIA Corporation Engine Components Modernengines are as complex as some OSes Filesystem GUI Controller input (Keyboard/Mouse/Gamepad) Windowing system Audio Rendering Threading / Fibers AI And have strong realtime requirements 60 Hz is only 16.66… ms
  • 10.
    NVIDIA Corporation Filesystem? Problem: fopenis verrrrrrry slow Solution: WADs. Giant conglomeration of all files (at least of one type) needed by the game fopen only called once Header read from the file into memory As other data is needed, just fseek into the wad and fread big chunks But you don’t want everyone to have to know about the WAD Generally use Fseek or engine::fseek, etc.
  • 11.
    NVIDIA Corporation GUI Today’s gamessupport complex, rich interaction with gamers Some embed complete HTML renderers (!!) Problems: Relying on the OS’s windowing system… Makes it harder to port Subjects the developer to OS bugs Solution: Homegrown Often built with Scaleform or similar technologies But still require significant game development and time One of the most important aspects for making a game feel ―tight‖
  • 12.
    NVIDIA Corporation Audio Engine Scheduling,play and decode of audio effects Play and decode generally handled by the Miles Sound System ~10Ks of titles have used MSS Scheduling, pre-caching and prioritization still handled by application, though As well as placement and movement throughout the world Generally 32 or 64 voices can be dealt with at once Application prioritizes based on volume, importance, distance, etc Other samples are culled Avoid clipping!
  • 13.
    NVIDIA Corporation Threading Amdahl’s Law:A system can only be as fast as the sum of the length of the critical path. By and large, games tend to be mostly single-threaded But this subjects them heavily to Amdahl’s Law Multithreaded programming is still hard Most common thread division Main Thread – Message Pump management, simulation updates Rendering Thread – Just issues D3D calls as fast as possible Loading Thread – Loads assets from disk asyncronously Main thread is still subject to Amdahl’s Law
  • 14.
    NVIDIA Corporation Why notthread the simulation? For peer-to-peer topologies, this is very hard Need absolutely deterministic behavior on all clients To make this possible, would need to make agent updates commutative Client-Server is no picnic, either Still subject to all of the usual multithreading issues And client-server tends to have radically fewer agents
  • 15.
    NVIDIA Corporation Rendering My personalfavorite  Typically split into two phases View phase Draw phase View Phase makes broad determinations about visibility Simulation updates view objects, which always exist What is on screen? Near the screen? Far away? Which chunks need to be resident in memory? Which can be evicted from a cache and pushed back to disk?
  • 16.
    NVIDIA Corporation View Phase(cont’d) Many types of visibility determination Chunking View Frustum culling (Bounding volume testing) Occlusion queries Quad or Oct trees Once an object is determined to be on or near screen It is submitted to the rendering queue, which will actually draw it If the data is not available to render, the view might ask to load it It might block (causing a stall—yuck) Or it might just say ―load this asap, we’ll skip it this frame‖ Avoiding stalls without breaking immersion is tricky
  • 17.
    NVIDIA Corporation Draw Phase D3D9is still the most common :,( Consoles control this D3D11 is becoming more common OpenGL is (unfortunately) the Linux of graphics APIs Technically superior, but somewhat unloved 2008, THE YEAR OF OPEN/GL 2011, THE YEAR OF OPEN/GL 2015, THE YEAR OF OPEN/GL Fear not! Which API you know is less important than understanding the graphics pipeline.
  • 18.
    NVIDIA Corporation Types ofRenderers Two main forms of real-time rendering Forward rendering Deferred rendering In forward rendering, objects are shaded final colors, including all lights, as you go If N is # objects and L is # lights, then naively this is O(N * L) Can mean waste as you render an object, then render something over the top of it. D’oh! Can be mitigated with a depth prepass First, only lay down depth Next, render objects, but use a depth test of == with no depth write
  • 19.
    NVIDIA Corporation Deferred Rendering Deferredrendering is two-pass First pass, lay down material properties In theory, this is good, simple shaders In practice, this is fairly bandwidth intensive, which directly translates to W Second pass, apply lighting. For N objects and L lights, deferred rendering is O(N + L) Better! And no real need for a depth-only prepass
  • 20.
    NVIDIA Corporation AI Broadly ―whatshould NPCs do?‖ Can often be a significant portion of the frame time More convincing AI is often more expensive But there are also ―tricks‖ that can look convincing without actually being expensive
  • 21.
    NVIDIA Corporation Breakdown ofa frame In most games, Care and Feeding of the GPU is the most expensive CPU task Talking to the APIs is unfortunately expensive Better with D3D11 and OGL, but still an issue AI / Pathfinding is generally the second most expensive chunk of time Both suffer (fundamentally) from Amdahl’s Law: The GPU is a giant state machine, so it’s difficult to hold many conversations with it at once AI needs to reason about the game world, and that is hard to do if the game world isn’t frozen in time (at least briefly)
  • 22.
  • 23.
    NVIDIA Corporation Life asa Game Dev Initially, very hard Expect long hours And comparatively low pay Many, many, many programmers want to be game developers Like all of you Multiplied by every college in the country Except University of Florida, because… Florida. But the game industry isn’t that big So supply and demand is working against labor
  • 24.
    NVIDIA Corporation Life asa Game Dev (cont’d) Move Early, Move Often Most areas have 0-2 game developers (heavily skewed towards 0) This means as a developer, you will move geographically and frequently The game industry has an abnormally high divorce rate Approaching 75%. Yikes. Spouses often refer to themselves as widows with husbands/wives You do not play games for a living. 
  • 25.
    NVIDIA Corporation Crunch time Crunchis ubiquitous Even Valve Suckitude of crunch varies by employer Much better at Valve, id, EA (modern EA)
  • 26.
    NVIDIA Corporation Still notdissuaded? Ship titles. Shipped titles are freedom in the game industry Figure out what’s important to you, and negotiate for that. You will be a peon for your first game. I’m sorry! To be fair, you’ll be a peon for your first gig regardless But Game Industry Peon << Any other industry Peon There are upsides Everyone you work with loves games as much as you do You get to work on your hobby You get immediate feedback about the cool shit you’ve done You can point to something tangible, and say ―I made that.‖ You will be the hero of kids everywhere
  • 27.
    NVIDIA Corporation Getting therefrom here So how do you get there? Good fundamentals. I cannot stress this enough. Algorithm analysis, quick O estimations Computer organization and assembler Debugging Be sociable / personable Personal Projects / OSS
  • 28.

Editor's Notes

  • #6 Titles: DOTA 2, Portal 2, L4D2, StarCraft 2, Rage, UE3, Borderlands,