A Dozen Ways to Make Your
Game Better
Phil Scott
NVIDIA Developer Relations EMEA
Agenda
Introduction
David Letterman
Blah blah blah!!!
Questions
Motivation
Not a performance talk
Ok, well a little bit…
More of an observation of the industry
A dozen things to make your life as a game
developer easier, better, more enjoyable
Ever seen David Letterman???
You may even make more money!!!
X/Y scale of games
X/Y scale of games
X/Y scale of games
ON TO THE TOP 12
Number 13… Ok! it’s a bakers dozen
Bang for Buck
Development time / Market expectation
Take this top 12 and re-prioritise to be your own
Stop the reinvention of the wheel
Expect some kickback
We sometimes do the legwork
re-prioritise and go for next on the list
Bang for buck…
An example…
Bang for buck…
An example…
Brat Designs wanted to give the game BREED something
new and special
Every planet has 50% surface water (bar 2)
Needed minimal hit on a tight schedule, for both artists
and programming team
NVIDIA created the effect
Code framework
Added bumpmapping & shader technology to the engine
Created the math… Version 1.0 had no real time reflection
Brat refined it
Modified bump textures
Added generated a real time reflection
Bang for buck…
Final version
Number 12
Per Pixel lighting…
More addictive than hard drugs
Indeed is ‘the new black’
The basis of all the great titles for 2003/2004
Too complicated to cover in 2 minutes
I’ll cover what makes the transition easier
NVMeshMender
NVNormalMapGenerator
Melody
NVSDK sample code
High level languages for shaders
Per Pixel Lighting
Problems
Artist kickback
Its not intuitive
Texture artist needs to be model aware
Until recently, workflow has been prohibitive
But once they understand it, it cant be done without
Cross platform issues
It’s a PC & Xbox only ‘thang’, right?
Number 11
Batching and Performance
Batch, Batch…err… I’ve forgotten
We’ve been saying it for years
Some people still don’t get it.
As hardware gets faster, poor batching becomes all
the more obvious
Shaders help with batching ( Geometry can then be
STATIC)
Single bone skinning
Procedural modification of geometry
Perlin Noise, SINCOS, bezier spline morph targets
Complex texture coordinate generation
VS2.0 offers more constants so more bones
BIGGER BATCHES = BETTER FPS = BETTER GAME
Batching and performance
Porting from other platforms
Recent experience with a developer
18FPS to 220FPS in a day.
3000 Draw prim calls->under 200 per frame.
Just because it runs fast on the consoles does not
make do the same on a PC.
FACT: Poor batching is the #1 cause of poor
performance
Number 10
Wide ranging of support of hardware is important
ALL PUBLISHERS INSIST ON IT
High end is great, but also consider the mass
market.
GeForceFX 5900 is the high end.
GeForceFX 5200 & 5600 is main stream
GeForce4 series is low end
Wide Ranging Support
Try to keep the FPS consistent across all.
Market has changed paradigm.
Only top end had full feature functionality
Now ALL have the ability to shade complex pixels
Consider tuning separate pipelines
HLSL & CgFX to the rescue
Each pipeline is just a different technique.
Downgrade shaders
FX range all have the same functionality but differing
performance.
Downgrading shaders balances fillrate issues.
Number 9
Shadows… Real world glue
Cue to reality in your game world
Many different techniques
Stencil volumes
Projected
Shadow buffers
Disk ( cheap and cheerful, but getting dated)
3D Positional gauge
Gravity + Shadow = Glue.
Atmosphere
Gameplay… (yes I did say… GAMEPLAY)
Shadows… Real world glue
Stencil Shadows
Complex subject
Visit our website and download whitepaper and
presentations by Cass Everitt and Mark Kilgard
A certain codeshop in Texas is doing some VERY
COOL THINGS with stencil shadows
HUGE amounts of game atmosphere are generated
Self shadowing is a cool byproduct.
Problem… HARD EDGED shadows don’t suit
everybody
Fill rate intensive
Shadows in a Real Game Scene
Abducted game
images courtesy
Joe Reidel at
Contraband
Entertainment
Shadows in a Real Game Scene
Wireframe shows
geometric
complexity of
visible geometry
Primary light
source location
Blow-up of Stencil Shadow Detail
Notice cable
shadows on
player model
Notice player’s
own shadow on
floor
Shadows… Real world glue
Projected shadows
Easy to get working and looking good
Easily cacheable if objects come to rest.
Amenable to multiple light sources
FAST.
Soft edged
Antialiased shadows look even better
Multisampled in a shader
Render to backbuffer which is set up for Multisampling
and StretchRect to a texture. (uses FSAA hardware)
Can be faded to distant edges for effect
Caveat… Not self shadowing… !
Shadows… Real world glue
Projected
shadows in
action
Blend well
with the
scene
Gladiator:Sword of Vengence : Acclaim
Shadows… Real world glue
Shadow buffers
Involves rendering the scene from the point of view
of the light
Looks awesome, soft edged , self intersected
shadows
Surely the best way of doing shadows then…
Problem…
Not all hardware supports Shadow Buffers
Don’t let that put you off though ☺
Z precision issues become evident on large vistas
Number 8
WYSIWYG tool chain
Next talk covers this
But needs to be in the top 12
Creative people should stay creative
Controls in a format that people understand is
imperative
artists want ‘sliders’
Programmers want code
Number 7
Elimination of ‘ugly’s.
Great games can be ruined by ugly artifacts
Z precision and Fighting
32 bit colour whenever possible
Chopped billboards
Alpha-blending ‘burned edges’
Careful choice of texture formats
Most art is generated in 32bit colour.
Most hardware has at least 64mb
Elimination of the ‘ugly’s
Z fighting and precision
Poor choice of Near clip plane
If you want to draw a kilometre, NearClip!=1 mm.
Just work it out on paper where your range is.
Mixing Fixed Function and Vertex shaders.
Multipass is still popular (and in some cases
recommended)
Position invariance
You have so many hardware platforms to hit, that this
is still a difficult subject
Pulling the Near clip plane in just a few units can
resolve many issues
Elimination of the ‘ugly’s
Chopped billboards are #1
ugly.
Fixed by laying down a
depth buffer texture
Using this as a blend
between the current Z
and Depth
Gives the effect of a
volume rather than a
sprite
LOOKS MUCH BETTER
Battle Engine Aquilla: Lost Toys / Atari.
Elimination of the ‘ugly’s
Alpha blending artifacts
Anything that needs depth written out
SRCALPHA:INVSRCALPHA usually the culprit
AGREED:TnL makes sorting difficult
Sort by object… Good start
Careful winding of objects, from inside to out.
Difficult for artists to do
Not all objects are good for this
Try another approach…
Elimination of the ‘ugly’s
Jan Svarovsky’s idea…
First seen in Startopia
Draw the object with AlphaTest set to 0xF0 (or
higher)
Z_WRITES ON
Lays down only the most solid parts where sorting
doesn’t matter
Draw the model again, this time with blending
Z_WRITES OFF
Consider ZTEST = LESS
Lays down the edges only.
Number 6
Old School?
EMBM
Fixed Function
Multitexture
Multipass
RIGHT?
WRONG!!!
Old School
EMBM is still great
Supported in a vast range of hardware
Cheap per pixel displacment
Awesome effects can be created with ‘old’
technology
Heat haze
Rain drops & dribbles
Water surfaces
Making things look damp or wet.
And some bizarre texture lookup tricks too
Old School
Multipass & Multitexture
TSS is still powerful
Capable of DOT3 Bumpmapping (Object space)
Lots of people use shaders where standard pipeline
setup is far more applicable
Multipass gives lots of power to downgrade shaders
A basic principal of HLSL & CgFX
Shader LOD, by dropping passes
Load balancing can be easier
Old School
A new trick for Fixed Function
Good approximation of a Fresnel term
Uses 2 cube maps
Cubemap1
D3DTSS_TCI_CAMERASPACENORMAL
Top, Bottom and Sides have a colour ramp
Front to back
Side to side (this is the FRESNEL TERM)
Cubemap2
D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR
This is your reflection
(Cubemap1*Cubemap2) + BaseTexture
Number 5
Keep interface and options design simple
SIMPLE = GOOD
COMPLEX = CONFUSING
‘Joe Public’ is not
A game programmer
An NVIDIA graphics engineer
Rocket scientist
Stanford University graduate
Keep it simple
Elegant and ergonomic interface design is a big
win
TheUgly
Good
The
The
Bad
Drop
List boxes
Screen
resolution
TOO
MUCH
INFORMATION
Not
offering
a fullfor
range
of screen
resolutions & colour depths
Offer
options
for care
future proofing
End
users
do not
Too
automated
aREFRAST
texture
ishas
A8R8G8B8,
or is more
that ABRBGBBB
…. Or something…
embarrassed
than one developer
Sliders
for quality
settings
How
many wording
depthAnisotropic,
buffers are created
in X
format
Inconsistent
AntiAliasing,
Texture
and
Shadow settings
pixel shader
is used
per
effect
Use
terms
which
users
are
familiar
UseWhat
ambiguous
wording
and
scaling
WhatAntialiasing,
technique is
used for rendering
water, bumpmaps
Anisotropic,
Quality , Resolution,
Bit Depth or anything
Off->Full, Low->High,
0->100%
!=Ambiguous wording
Detect hardware
Starting to get the idea???
Use custom defaults for known hardware
Tell the user and get better review scores!
Keep it simple
Simple design of your interface
Is thoughtful and pleasant for the end user
Provides a better “Out Of The Box” console like
experience
Reviewers do review on lower and upper end.
Number 4
Anti Aliasing…
Excellent use of 20 minutes to improve ‘out of the
box’ experience
Hardware is now fast enough to consider AA as a
default option
Enumerate what is available
if( SUCCEEDED(pD3D->CheckDeviceMultiSampleType( D3DADAPTER_DEFAULT,
D3DDEVTYPE_HAL , D3DFMT_R8G8B8, FALSE,
D3DMULTISAMPLE_2_SAMPLES, NULL ) ) )
Create Back/Front buffers.
D3DMULTISAMPLE_TYPE MultiSampleType ;
Post Processing and FSAA are mutually exclusive
Or are they???
Anti Aliasing
Post processing and FSAA
Create backbuffer with FSAA (as usual)
StretchRect Backbuffer -> Texture
While (Postprocssing)
{
Use_Textures();
}
Render_Last_PostProcess(FullScreenQuad_toDisplay);
CAVEAT:Needs the latest DirectX9 runtime
Number 3
Make your game world move.
Doesn’t have to have any impact on game dynamics
A simple test…
Touch nothing, and switch on “God Mode”
If the world stays alive, you are doing a good job
Otherwise…
Keeping the world alive…
So how do I make my game world move?
Use mathematical functions in shaders only based
on a TIME variable.
Grass and leaves
Waves and ripples
Cloud maps and caustic animation
Lights, god fingers & corona effects
Weather effects
Rain and snow are very effective
Keeping it alive
Grass and Leaves
Pre-animated billboards
Offset each frame
If geometric,
good hardware
supports SINCOS
functions natively
Vertex engine usually
not going flat out
Use them agressively
Keeping the world alive
Waves and ripples
Add great dynamics
Physics can be done in
a pixel shader
Elder Scrolls III:Morrowind, Bethesda Softworks
Keeping the world alive
Even easier
Fixed Function Pipeline
TexGen to scroll/scale
coordinates
EMBM has a matrix that
can be modulated over
time.
M = Itentity();
M._00 = (Sin(Time)*Scale);
M._11 = (Cos(Time)*Scale);
Expendable Images © 1999, Rage Software PLC
Keeping the world alive
Cloudmaps… Generalised soft shadows from above
Caustics… Refraction of light
MAKE IT LOOK EVEN COOLER
Encode animation into a 3D texture
: ©2003 Yeti Studios
Use SINCOS * TIME * PV_WEIGHT into the volumeGunmetal
to keep
it from ever
repeating
© Massive Development GMBH
REMEMBER TO MIPMAP
3D TEXTURES are Memory Hungry
Keeping it alive
Weather & particle effects
Snow & Rain
Leaves & papers
Bubbles
Plankton
Anything that is a
volume of space is good
without a specific
source
Number 2
Don’t waste cycles on the human computer
Shoot for the low hanging fruit
VTUNE and other profiling tools
So… teams/games
What does this
you.
Large
cantell
cause
domino effect
Regular profiling
Keep quick project records, and
note any huge differences and cross check
Wasting time optimising already fast code, is false
economy
Don’t waste cycles on the human
computer
KNOW YOUR OWN APP!!!
Its far harder for somebody else to understand it
and help you otherwise
A good paper trail makes writing games a science
rather than black art.
Successful developers do this
Look to .plan files as an option or inspiration
Number 1
Its ‘your’ game and not a
clone of somebody else’s.
Take all our effects from
the SDK and play
Post processing is cool
“Tron2.0” courtesy of Monolith & Disney Interactive
Adds the ‘look’
that everybody
knows
USP
Atmosphere
Make it your own…
The point is…
There is no secret sauce
Ultimately your art director & tech director should
know ‘their vision’ in advance and not be driven by
market trend…
Time to market usually means market trend has
moved to something new
Your title has more chance of being popular if you
make it stand out from the crowd
We can help… if you let us
Final Top 12
1 It’s your game… Make it your own
2 Don’t waste cycles on the human computer
3 Keeping the world alive…
4 AntiAliasing… What better way to spend 20 mins
5 Keep interface and options design simple
6 Old School?
7 Elimination of ‘ugly’s.
8 WYSIWYG
9 Shadows… Real world glue
10 Wide ranging of support
11 Batching and Performance
12 Per Pixel Lighting
13 Bang For Buck
Question time…
?
Phil Scott
[email protected]
© Copyright 2026 Paperzz