The Blog

Planning a Platformer

When I first started this project, my goal was to create a practical, useful guide to learning development for the NES. Along the way, I realized that I would need some kind of "capstone" project to tie the whole thing together. Since the NES was famous for its platformers, making a platformer was a logical choice.

A platformer needs, well, platforms. I'm not much of an artist myself, so I spent some time looking for a public-domain tileset that would work well on the NES. Purely by chance, I stumbled upon Adam Saltsman's work at itch.io. Any of Adam's tilesets would be a great fit for an NES project, but I was particularly drawn to his "Caves of Gallet" tiles.

"Caves of Gallet" (https://adamatomic.itch.io/caves-of-gallet)

The backgrounds handled, I next started thinking about what kind of character the player would play as (and who, or what, the enemies and obstacles would be). I haven't created sprites yet, but I'm leaning toward a frog character for the player. I'm thinking of using the "cute" style from the Kirby series for enemy designs.

So, the plan for the book is to create the graphics while exploring how the PPU works, then layer in additional concepts as needed - level design, collision mapping, player physics, etc. I've been taking a lot of inspiration from how Contra handles these, thanks to Alan Blomquist's Retro Game Internals series. I've been working on the PPU overview chapter and I hope to have it up soon. Once the graphics system chapters are done, we'll move on to input and audio.

Thanks for coming along on this journey with me. I'm excited to show you more of what the NES can do!

What to make?

With Chapter 3 out of the way, it's time to start working on the long-term project that will make up the core of the book. Only problem is, I'm still not entirely sure what that project should be.

I've taught half- and full-day NES development workshops several times. At first, I used a Pong clone as the project, which had the advantage of being something most people immediately understood, but the disadvantage that I had to spend a disproportionate amount of time on handling collisions. It was eating into the time I had for teaching more parts of the hardware, so I decided to come up with a different project.

My second teaching project was a top-down adventure game in the style of Legend of Zelda. No collisions, no need to program velocity/acceleration since movement was solely from the controller, and having the player character face different directions provided a great example of tile re-use. I am hesitant to use the top-down adventure model in the book, though, because ultimately it's a bit simple.

So, I'm leaning toward creating a platformer for the book. Platform games are what the NES was largely known for relative to its competition, and they are filled with technical challenges for the programmer:

  • Storing map data for multiple levels
  • Scrolling across multiple screens
  • Jump and platform physics
  • Sub-pixel positioning for velocity/acceleration
  • Collision detection with enemies and world elements

There's a lot to dig into, and since this is a book, plenty of time to get into the details. It will also be the first platformer I've ever written! I'm looking forward to it and I hope you are too.

"The Book" So Far

After more than a year of false starts, I'm finally making good progress on writing a book about assembly development for the NES.

I'm publishing the book as a website, with updates happening live as I make them. For authoring, I'm using raw HTML (not even a static site generator) and the Tufte CSS framework, with some minor modifications. Margin notes are already proving more useful than traditional footnotes, and I'm trying to include sidebar images whenever I can.

As I start getting into actual assembly code, I plan to use Prism.js for highlighting - I wrote the asm6502 parser for it. I also want to integrate Ben Firshman's jsnes to include live, interactive demos of each sample project. Eventually, it would be great to have something akin to 8bitworkshop's in-page development environment, but I think that's going to have to wait quite a while.

That's it for now. Progress is slow but steady, I'm moving into Chapter 3, "Getting Started", where we install a development environment and write a "Hello World" program. More updates to come!