Modern Video Games

Alex EvangEntertainment

Jan 26, 2012 (5 years and 7 months ago)

1,145 views



Modern Video Games


PlayStation 2

Released March 2000

Processors are... Complicated

32 MB RAM, 4 MB VRAM

1280 x 1024 max resolution

Can make it smaller for speed!

GPU

600 million pixels / sec if textured and lit


PlayStation 2

Processors:

CPU
MIPS @ 300 MHz “Emotion Engine”

GPU
Custom built “Graphics Synthesizer”

2 Vector Units

Original PSX as I/O Controller

CPU could talk to VU0

VU0 could talk to VU1

VU1 could talk to GS


PlayStation 2

Rendering is done in “microcode”

Textures are paletted

Very hard to code efficiently!


PlayStation 2


Xbox 360

Released Nov 2005

CPU
3x 3.2 GHz, each with two threads

6 hardware cores, and they're all the same!

512 MB RAM (Unified!)

HLSL Shaders

Shader cores are shared

Up to 6 billion verts / sec

Up to 24 billion pixels / sec

Operating System


Xbox 360 vs PlayStation 3

Framebuffer bandwidth

Xbox
256 GB / sec

PS3
20.8 GB / sec

Multithreading

Xbox
4 (2 cores x 2 threads) and all share RAM

PS3
6 SPUs, 1 CPU, each with private RAM

Rendering

Xbox
Direct3D9 + low level additions

PS3
Custom (best perf if you use an SPU)


Xbox 360

Microsoft wanted the Xbox 360 to be as easy to
develop for as possible!

Windows API

DirectX

PIX (Performance Investigator for Xbox)

PIX for Windows


Multithreading

Multithreading has been part of game
programming since the beginning

Atari 2600's virtual scan gun

PlayStation's 3D processor

PS2's... whole architecture

Used to be that all processors ran at different
speeds

Xbox 360 made it really simple, all processors
are exactly the same


Shaders

Shaders are little programs that run on the GPU

Usually under a few pages in length

Programmed in HLSL or GLSlang


Shaders

Set color to red:
void main()
{
gl_FragColor = vec4( 1, 0, 0, 1 );
}


Shaders

Simple texture lookup:
uniform sampler2d texture;
void main()
{
gl_FragColor = texture2d( texture, gl_TexCoord )

* gl_Color
}


Shaders

Hue shift:
(rgba2hsva and hsva2rgba are coded as well)
uniform sampler2D tex; uniform vec4 HSVShift;
void main()
{
vec4 c = rgba2hsva( texture2D( tex, gl_TexCoord );
c.xyz += HSVShift.xyz;
gl_FragColor = hsva2rgba( c );
}


Release Dates

1977
Atari 2600

1983
(6 yrs)
NES

1988
(5 yrs)
Genesis

1994
(6 yrs)
PlayStation

2000
(6 yrs)
PlayStation 2

2005
(5 yrs)
Xbox 360

2012
(7 yrs)
Wii U


CPU Speed
1977
1983
1988
1994
2000
2005
1
10
100
1000
10000


RAM
1977
1983
1988
1994
2000
2005
1
10
100
1000
10000
100000
1000000
10000000
100000000
1000000000


Sprite Count
1977
1983
1988
1994
2000
2005
1
10
100
1000
10000
100000


ROM
1977
1983
1988
1994
2000
2005
1
10
100
1000
10000
100000
1000000
10000000
100000000
1000000000
10000000000


Mobile

Android / iOS

CPU
ARM, 1 GHz+

RAM
32 - 64 MB
available

GPU
Comparable
to PlayStation 2 (in
Mar '11)

Programed in C

1 – 2 programmers


Web-based games

Flash / WebGL /
HTML5 Canvas

More than enough

CPU, RAM, GPU

Programmed in
JavaScript / PHP

Game programmer

Network
programmers