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
NES Starter Kit
A Beginner’s Guide and toolkit for NES game creation.
Current game version: 1.0.4
Current tool zip version: 1.0.2
Click here to try the example game!
Looking at this in Github’s code editor? Check out the documentation site!
What is this?
It’s a fully-fledged starter kit for NES games. It is the source to a top-down adventure game, alongside all of the tools needed to change it. It also comes with a guide to changing everything about it, which could also be titled “The dummy’s guide to creating an NES game”.
The idea is, download this (either via git or a zip file), set up the tools, run the game, then tweak it and make your own! With the right hardware, you can even play your game on your own NES.
The only thing this is not is an introduction to programming - if you have never programmed anything before, I suggest finding a tutorial online for C or C++, and getting a couple really basic programs working. (At the very least, find out what a “hello world” program is, and write+run one successfully.)
One options is the Learn C Tutorial - it lets you write and run your code in the browser, so you don’t need to set anything up!
There are a few other projects worth knowing about that might be a better fit for your task.
First off, there’s the upcoming NESMaker project. This has not yet been released, but it is a full-blown gui for building games. Check out the NESMaker website! This project is a good fit if you don’t quite want to get your hands dirty with code. You may be able to edit the resulting code, but it will likely be in assembly language, and a little harder to pick up if that is new to you.
In a similar vein, if you’d like a way to do that with Gameboy games, look into my ClassicGB project. It’s a code-free web-based game builder. It also exports C source code, in case you want to extend it yourself! Check that out on the ClassicGB website!
Lastly, if you want something more barebones, I also have nes-c-bootstrap - it is a simpler “Hello World” project that you can use for more of a blank page. That project is elsewhere on Github.
|Game Style||Adventure only||Many||Adventure only|
|Graphics editor||external - nesst||Built-in||Built-in|
|Map Editor||external -tiled||Built-in||Built-in|
|Music Editor||ext - famitracker||Built-in||Not available|
|Sound Editor||ext - famitracker||Built-in||Not available|
|Works on console||Yes||Yes||Yes|
|Source available||Yes, you write it!||Unknown||Yes|
|Source easily editable||Yes, built for it||Unknown||No|
|Code Editor available||Yes, VS Code||Unknown||Not specialized|
Note: NESMaker was not available at the time of this writing, so some of these details are based on speculation. If something’s wrong, submit a PR!
Table of Contents
This guide is broken into 4 main chapters:
- Getting Started
- Making it Your Own
- Adding new features
- Adding Polish
- Advanced topics.
The suggested approach is to follow along with all of part 1 in order to get yourself familiar with the console/tools/etc. After that, feel free to jump around to whatever chapters interest you.
The second part mainly focuses on core things you will want to change to make your own game. Art, music gameplay and more!
The third part focuses on how you can extend the game further. Want to give the main character a weapon? Add some new features to the start menu? Do something else unique? This has guides and pointers on how to do it!
The fourth part focuses on more cosmetic things - don’t be afraid to get into these chapters early; sometimes adding a little bit of polish can really help encourage you to continue working on the game.
The final part deals with more advanced topics - for most simple games, you won’t need to read anything in this section. It gets into depth on details of how the library itself works, as well as the system, and how the rom is organized. That said, these topics are here if you need them, or for that matter if they interest you.
Part 1: Getting started
- Setting up your tools
- Building your game
- Playing your game
- Making Your first change
- Things to know about the NES and C
Part 2: Making it your Own
- Changing the world
- Adding new map tiles
- Changing sprite art
- Changing the HUD (top bar)
- Adding collectible sprites
- Adding new enemies
- Adding new talking NPCs
- Adding/changing music
- Adding/changing sound effects
- Changing movement
Part 3: Adding new features
- Putting your code in the right place: a brief introduction to prg banking
- Giving your main character a sword
- Adding more features to the pause menu
- Adding a second map
- Saving the Game
- Adding objects that attract or repel the player
- Adding an enemy that mimics player behavior
Part 4: Polish and more
- Ways to improve performance
- Making a full title screen
- Animating tiles
- Playing your game on a real NES
Part 5: Advanced Topics
Things in this section are somewhat complicated, and go into how the engine works. You shouldn’t need these things for most games, but if you do, this is a place to learn!
- Understanding and tweaking the build tools
- Dealing with limited ROM space
- Resizing your rom
- ROM Data Map
- Expanding available graphics using CHR banking
- Getting finer control over graphics with chr ram
- Writing Functions in Assembly
- Automatic builds with CircleCI
Famitracker by jsr
Please credit these wonderful people in your own creations, if you don’t replace their work! Technically all of the art and music is licensed as public domain, (CC0) but it’d be really nice to give them credit.
I don’t have any set rules around contributions right now, but I absolutely welcome them! Thank you for even considering this.
If you’ve got something you’d like to add, just send over a pull request, and I’m sure we can get something together. Just try to follow the existing code style as best you can.
If you run into issues or have feature suggestions, please submit them through the Github “Issues” tab.