liveBook · Manning

What you will learn in Classic Game Programming on the NES: Make your own retro video game

Make your own retro video game

by Tony Cruise

Chapter by chapter

Chapter 1: Let’s program games!

1.1 Our goal · 1.2 NES architecture · 1.3 6502 Assembler · 1.4 Calling all retro developers · 1.5 The structure of a game · 1.5.1 Initialize console · 1.5.2 Intro screen(s) · 1.5.3 The game loop · 1.5.4 Graphics chip draws changes to the screen · 1.5.5 Ending a game · 1.6 Summary

What you learn in chapter 1 →

Chapter 2: Getting set up

2.1 Emulation · 2.1.1 Mesen · 2.1.2 FCEUX · 2.1.3 iNES · 2.1.4 Other options · 2.2 Editor · 2.2.1 Visual Studio Code · 2.2.2 Sublime Text · 2.3 Assembler · 2.4 Graphics creation · 2.4.1 NES Tileset Editor · 2.4.2 NEXXT · 2.4.3 NES Assets Workshop · 2.4.4 NES CHR Editor · 2.4.5 Other options · 2.5 Sound effects and music creation · 2.5.1 FamiTracker · 2.5.2 FamiStudio · 2.6 Summary

What you learn in chapter 2 →

Chapter 3: Starting 6502 Assembler

3.1 Online Assembler Simulator · 3.2 Memory and registers · 3.2.1 Numerical representations · 3.2.2 Registers · 3.2.3 Status flags · 3.2.4 Zero-page memory · 3.2.5 Stack · 3.3 Moving things around · 3.3.1 Loading data into a register · 3.3.2 Storing register data in memory · 3.4 Summary

What you learn in chapter 3 →

Chapter 4: Math, loops, conditions, and bits

4.1 Let’s do some math · 4.1.1 Addition · 4.1.2 Subtraction · 4.2 Increasing and decreasing · 4.3 Conditions · 4.4 Jumps, branches, and calls · 4.4.1 Jumps · 4.4.2 Branches · 4.4.3 Calling a subroutine · 4.4.4 Labels · 4.5 Bytes, bits, and nibbles · 4.5.1 Bit test · 4.5.2 Logical operations · 4.5.3 Shifting and rotating operations · 4.6 Using the stack · 4.7 Summary

What you learn in chapter 4 →

Chapter 5: Starting somewhere

5.1 NES cartridge code structure · 5.2 NES memory configuration · 5.2.1 Memory · 5.2.2 Segments · 5.3 Defined values · 5.4 NES header · 5.5 Vectors · 5.6 Zero page · 5.7 Sprite data · 5.8 Code · 5.9 Chars · 5.10 RAM · 5.11 IRQ interrupt · 5.12 Initializing the NES hardware · 5.13 NMI routine · 5.14 Some useful functions · 5.14.1 PPU update · 5.14.2 PPU off · 5.14.3 Clearing the name table · 5.14.4 Poll game pad · 5.15 Main application logic · 5.16 Compile script · 5.17 Summary

What you learn in chapter 5 →

Chapter 6: Starting a game

6.1 Setting up our game project · 6.1.1 Memory configuration · 6.1.2 Compiling script · 6.2 Creating a code library · 6.3 Adding some macros · 6.4 Initializing the console · 6.5 NES background graphics · 6.5.1 Tile name tables · 6.5.2 Tile patterns · 6.6 Defining the tile set · 6.7 Displaying the title screen · 6.8 Displaying the game screen · 6.9 Summary

What you learn in chapter 6 →

Chapter 7: Move and shoot

7.1 NES sprites · 7.2 Defining patterns for our player and bullet · 7.3 Controlling timing · 7.4 Moving the player’s ship · 7.5 Firing a player bullet · 7.6 Moving the player’s bullet · 7.7 Summary

What you learn in chapter 7 →

Chapter 8: Enemy movement

8.1 Generating random numbers · 8.2 Step 1: Enemy generation · 8.3 Step 2: Enemy movement · 8.4 Summary

What you learn in chapter 8 →

Chapter 9: Collision detection

9.1 Object collision detection · 9.2 Enemy collisions · 9.3 Summary

What you learn in chapter 9 →

Chapter 10: Keeping score

10.1 Keeping track of the player’s score · 10.2 Adding to the player’s score · 10.3 Subtracting from the player’s score · 10.4 Displaying the score on screen · 10.5 Beating the high score · 10.6 Summary

What you learn in chapter 10 →

Chapter 11: Player collisions and lives

11.1 Player collisions · 11.2 Animating the player’s death sequence · 11.3 Handling game over · 11.4 Displaying the player’s lives · 11.5 Summary

What you learn in chapter 11 →

Chapter 12: More enemies

12.1 Defining more enemy types · 12.2 Keeping track of enemies · 12.3 Changing our enemy spawn code · 12.4 Changing our enemy movement code · 12.5 Making our smart bomb smarter · 12.6 Summary

What you learn in chapter 12 →

Chapter 13: Animations and more

13.1 Enemy animations · 13.2 Background animations · 13.2.1 Changing tile patterns · 13.2.2 Changing the palette · 13.3 Shaking things up · 13.3.1 Changing the shared background color · 13.3.2 Using the scroll registers · 13.4 Level progression · 13.5 Summary

What you learn in chapter 13 →

Chapter 14: Sound effects

14.1 NES sound capabilities · 14.1.1 Pulse wave channels · 14.1.2 Triangle channel · 14.1.3 Noise channel · 14.1.4 Delta modulation channel · 14.2 Creating some sound effects · 14.2.1 Zap · 14.2.2 Boom · 14.2.3 Big boom · 14.3 Adding the sound engine · 14.3.1 Exporting sound effects · 14.3.2 Adding the sound engine code · 14.4 Adding sound effects to our game · 14.5 Summary

What you learn in chapter 14 →

Chapter 15: Music

15.1 Music project structure · 15.1.1 Sequencer · 15.1.2 Piano roll · 15.2 Arpeggios · 15.3 Instruments · 15.3.1 Envelopes · 15.3.2 DPCM samples · 15.4 Generating music data · 15.5 Using music in our game · 15.6 Summary

What you learn in chapter 15 →

Chapter 16: Where to from here?

16.1 Enhancing our game · 16.1.1 More enemies · 16.1.2 Extra lives · 16.1.3 Increased difficulty · 16.1.4 Music · 16.1.5 Arcade touches · 16.2 Extending the NES · 16.2.1 What is a mapper? · 16.2.2 More sound · 16.2.3 Game saves · 16.2.4 Extra features · 16.3 Publishing your finished game · 16.3.1 Free ROM download · 16.3.2 Online ROM sales · 16.3.3 Physical cartridges · 16.4 Other types of games · 16.4.1 Platformers · 16.4.2 Scrolling platformers · 16.4.3 Action adventures · 16.4.4 Role-playing games · 16.5 Summary

What you learn in chapter 16 →

Concepts explained in this book

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.