20. Putting your code in the right place: a brief introduction to prg banking
21. Giving your main character a sword
22. Adding more features to the pause menu
23. Adding a second map
24. Saving the Game
25. Adding objects that attract or repel the player
26. Adding an enemy that mimics player behavior
27. Adding a new sprite size
40. Understanding and tweaking the build tools
41. Dealing with limited ROM space
42. Resizing your rom
43. ROM Data Map
44. Expanding available graphics using CHR banking
45. Getting finer control over graphics with chr ram
46. Writing Functions in Assembly
47. Automatic builds with GH Actions
48. Switching to unrom 512 for advanced features
Building Your Game
Once you have finished setting up your tools, building the game is very straightforward. There are two ways to do it- through the command line and through your IDE. We will describe both approaches.
Using Visual Studio Code
- Press the
ctrl + shift + bkeys at the same time.
… that’s it! This will run the three commands described below, which will result in your game being built and opened in your NES emulator.
Read the section below to understand how it works, or how to compile it without this IDE.
Using the Command Line
Open the cygwin terminal using the start menu. Note that this is different from the command prompt (aka cmd) in Windows.
Navigate to your game’s base directory. (The folder you created with
create-nes-game, or renamed from
Type the following command to build your game:
create-nes-game build. This should not produce any errors.
If there are errors, look back at the first chapter and make sure all tools are installed. If you are still having trouble, open a github issue with nes-starter-kit, or otherwise reach out for help!
Use the command
create-nes-game runto start the rom with your preferred emulator.
create-nes-game cleancan be used to remove old copies of files that have been renamed or deleted. You shouldn’t really have to do this most of the time, but if things are acting strange, it may be useful.
The Visual Studio Code project is set up to always run both commands. Running
make clean is manual,
but it shouldn’t be necessary most of the time.