liveBook · Manning

RAM table

As explained in Classic Game Programming on the NES: Make your own retro video game

A RAM table is a table stored in random-access memory containing state and control information for game entities.

A RAM table stores the changing data an NES game needs to revisit. In the star animation example, each entry holds a 16-bit name table address for one of 10 stars. section 13.2.1

Animating stars

A routine scans the saved addresses during the NMI, selects a pattern from the timer, and writes it to the PPU. Clearing the table removes the previous locations before another screen setup.

How Classic Game Programming on the NES: Make your own retro video game covers it

How deep it goes
Explains allocation, clearing, population, lookup, and reuse, but does not generalize table layouts beyond the star example.
Examples
Uses a 20-byte table holding ten randomly placed star addresses and animates their displayed patterns.
What you can do after
Build it from scratch by allocating a RAM table, filling it with object addresses, and scanning it during updates.
How it connects
Connects RAM tables with random number generation, name tables, video memory, PPU access, interrupts, and animation.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Classic Game Programming on the NES: Make your own retro video game. The section links point to the parts of the book it draws on.