Skip to content

A Beginner's Guide and toolkit for NES game creation.

License

Notifications You must be signed in to change notification settings

schemaxxx/nes-starter-kit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NES Starter Kit

A Beginner's Guide and toolkit for NES game creation.

It's a game!

Click here to try the example game!

Download the example rom

Looking at this in Github's code editor? Check out the documentation site!

Work in progress

This project is very much a work in progress. This readme tries to outline the end product, but please be warned that not everything is here yet. Imagine this like the "Under Construction" gifs on Tripod and Geocities back in the day ;)

Right now, the tools are set up to work, the project produces a working game, and the first two sections of the guide are complete. You should be able to produce a rudimentary game using nes-starter-kit. Consider this like an Alpha release.

If you decide to check this out and have thoughts, please share them! You are welcome to open an issue or PR, or even just send me a Tweet/DM/email/whatever. Your input can help shape the outcome of this project. (and is very much appreciated!)

NOTE on update from May 19th, 2018

In a change to master today, I swapped around how maps are ordered due to a dumb mistake I ported over from older games. Unfortunately, this required creating a new version of the tmx2c tool, and I haven't figured out proper versioning yet. If you downloaded or updated past this date, you need to redownload the tools zip file.

Running tools/tmx2c/tmx2c.exe should show version 1.0.1. (Not 1.0.0)

I'm sorry about this - I hope breaking changes like this will be rare, but at the same time this was a necessary change to make future chapters more understandable. In addition, once the guide is more fleshed out, I will start maintaining proper versions. (This is a reminder to me that I need to do that very soon!)

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!

Related projects

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.

Feature Comparison

Feature Name nes-c-starter-kit NESMaker gameboy-bootstrap
Language C 6502 Assembly C
Gui Editing No Yes Yes
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
Programming required Yes No No

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:

  1. Getting Started
  2. Making it Your Own
  3. Adding new features
  4. Adding Polish
  5. 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

  1. Setting up your tools
  2. Building your game
  3. Playing your game
  4. Making Your first change
  5. Things to know about the NES and C
  6. FAQ

Part 2: Making it your Own

  1. Changing the world
  2. Adding new map tiles
  3. Changing sprite art
  4. Changing the HUD (top bar)
  5. Adding collectible sprites
  6. Adding new enemies
  7. Adding/changing music
  8. Adding/changing sound effects
  9. Changing movement

Part 3: Adding new features

(Note: these are rough ideas and very likely going to change. Suggestions also welcome)

  1. Putting your code in the right place: a brief introduction to prg banking
  2. Giving your main character a sword
  3. Adding more features to the pause menu
  4. Adding a second map
  5. Making the main character grow or shrink
  6. Adding objects that attract or repel the player
  7. Adding an enemy that mimics player behavior

Part 4: Polish and more

  1. Ways to improve performance (Note: these will likely include changing the music engine, and doing stuff every other frame)
  2. Making a full title screen
  3. Animating tiles)
  4. Playing your game on a real NES
  5. Making a "real" cartridge

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!

  1. Understanding and tweaking the build tools
  2. Understanding and adjusting the size of your game
  3. ROM Data Map
  4. Expanding available graphics using CHR banking
  5. Getting finer control over graphics with chr ram
  6. Writing Functions in Assembly
  7. Automatic builds with CircleCI

Credits

Tools

cc65 By Ullrich von Bassewitz

NESLib by Shiru

NES Screen Tool by Shiru

NES Space Checker (nessc) by Shiru

Famitracker by jsr

FCEUX

Tiled by Thorbjørn Lindeijer

Art/Resources

Early 90's Arcade Pixel Art by Refresh Games

Who's Cuter Font by Damian Yerrick (Tepples)

8-Bit Victory Loop by Wolfgang

8-Bit Forest Theme by Wolfgang

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.

Contributing

I don't have any set rules around this right now. 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.

About

A Beginner's Guide and toolkit for NES game creation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Assembly 44.0%
  • C 42.6%
  • JavaScript 8.5%
  • Makefile 2.2%
  • Shell 1.4%
  • HTML 0.8%
  • C++ 0.5%