Summary of "How we fit an NES game into 40 Kilobytes"
Fitting Micro Mages into 40 KB on the NES
The video explains the technical methods used to fit a new NES game, Micro Mages, into the extremely limited 40 kilobytes of memory available on original NES hardware. Below are the key points covered.
Context and Challenge
The NES, designed in the early 1980s, had only 40 KB of accessible game data at a time without extra cartridge hardware. Modern storage is vastly larger, so fitting a full game into this tiny space is a major constraint. The developers were inspired by Super Mario Bros., which managed impressive content within these limits.
Game Design Goals
Micro Mages is a vertically scrolling platformer with a cartoonish occult theme. It features:
- Running and shooting magic spells
- Vertical level traversal
- Multiple levels and boss battles
- Up to four-player multiplayer—a rare feature for NES games
Programming and Memory Allocation
- The game is written entirely in 6502 assembly language for maximum control and speed.
- Memory is split with 8 KB allocated for graphics and 32 KB for all other data.
- Graphics are organized into two tables:
- One for background tiles
- One for sprites (foreground moving elements) Each table holds 256 tiles of 8x8 pixels.
Sprite and Graphics Optimization
- NES sprites use 3 colors each, and only 4 sprite palettes can be active simultaneously, shared between players and enemies.
- Only 8 sprites can be shown per horizontal line; exceeding this causes sprites to disappear. To avoid this limit and save graphics space, smaller player sprites were used.
- Boss sprites are optimized by:
- Splitting large meta sprites into independently animated parts
- Identifying and reusing identical sprite tiles
- Flipping sprites horizontally or vertically These techniques drastically reduce the unique tile count.
Level Map Compression
- Background screens use 8x8 tiles, which would normally consume about 960 bytes per screen.
- To reduce this, a hierarchy of “meta tiles” and “meta meta tiles” compresses a full screen down to 60 bytes.
- Attempts to mirror half the screen to save space (reducing to 30 bytes) led to boring gameplay.
- A more sophisticated approach was used: storing a mirror axis bit per row to shift the mirror line, breaking symmetry and improving level design without increasing data size.
Hard Mode and Additional Content
- Saved memory allowed inclusion of a hard mode with tougher enemies and new enemy behaviors rather than just replaying the same levels.
- Hard mode level changes are done by palette swaps and selective tile updates, costing only about 7 bytes per screen on average.
- This effectively doubles content with minimal extra space.
Overall Impact
These combined techniques in assembly programming, graphics optimization, and data compression allowed the creation of a rich, multiplayer NES game with many levels and bosses within the strict 40 KB limit.
Main Speakers / Sources
- The developers of Micro Mages (unnamed in subtitles) presenting their design and programming process.
Category
Technology
Share this summary
Is the summary off?
If you think the summary is inaccurate, you can reprocess it with the latest model.