NES Tile Examples

Alex EvangEntertainment

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

1,252 views



NES Tile Examples


Review
Any questions about HW1?


Jumping Forward a Bit...

March 2001

Designed to be
“Comparable to the
SNES”


Game Boy Advance

CPU
32-bit ARM7 @ 16.8 MHz

Z80 co-processor (for CGB and DMG mode)

GPU
Really awesome custom made one

240x160

4 Tile-based backgrounds

128 sprites

16 BG, 16 sprite palettes (16 colors each)

32,768 colors

RAM
256 KB + 32 KB “fast”

ROM
32 MB


GBA Sprites

8x8 -
64x64

Sprites Support:

X,Y Positioning

Mirror, Flip,
Rotate, Scale

Tile group

Single palette

Only 8
All 128 per horizontal line

And the previous tricks still work!


Easy to Write 2D Graphics Code!
global int g_CurSprite;
global Sprite g_Sprites[ 128 ];
void DrawSprite( int tile, int x, int y )
{
g_Sprites[ g_CurSprite ].enabled = true;
g_Sprites[ g_CurSprite ].tile = tile;
g_Sprites[ g_CurSprite ].x = x;
g_Sprites[ g_CurSprite ].y = y;
++g_CurSprite;
}


Programmer Jobs

Before:

Game Programmer

After

Graphics Programmer

Gameplay Prog.

AI Programmer

Tools Programmer

Physics Programmer

Network Programmer


Programmer Jobs

Graphics Programmer

Very math heavy!

Linear Algebra

Illumination Models
(BRDF, Phong)

3D API (Direct3D,
OpenGL)

Often included in an
engine

Gameplay Programmer

Event based logic

Game specific
mechanics

Coding within limits


Programmer Jobs

Tools Programmer

Write GUIs (.NET,
Java, Python)

Integrate with tools
(Maya, 3DS Max)

Integrate with build
systems (Ant, Make)

AI Programmer

Pathfinding (A*)

Sensor Interface

Finite State Machines


Programmer Jobs

Physics Programmer

Kinda like a new-
Graphics Programmer

Very math heavy!

Network Programmer

Socket API

Client / Server
architecture

Client prediction and
blending


Pathfinding

Just use A* (search for “a star algorithm”)

But how do you generate the nodes?


Pathfinding


Pathfinding


Pathfinding

Designers place nodes

Easy to implement!

Can include design-specific data about the nodes
(like sniper point, defend this, etc.)

Programmatic node generation


Programmers place nodes”

Easy for tile-based games

Design specific data can be in the tiles

Hybrid


Pathfinding