Tuesday, April 21, 2020

NES Anguna

Well, I had a little bit of time still, while Frankengraphics is finishing up her game Project Blue, to have a little downtime on Halcyon, so I decided to see what kind of side project I could do in just a handful of weeks, but would be a full-sized decent game.

Because I tend to go big (Anguna, Halcyon), or small (cheesy competition games like Robo-Ninja Climb), but I rarely do anything medium sized. Which means that despite being part of the nes homebrew community for around 4 years now, I still don't have any games released on cartridge.

So I started brainstorming -- what's something I could make and finish quickly, but is worthy of a cartridge release?

What I came up with is Anguna. again. But what would make this port fun is to see how much of the Atari version I could reuse.  By remaking the same game, reusing the Atari code and world definitions, could I throw the game together in record time?

Both the NES and the Atari use the 6502, and the NES has 16 times as much RAM. So in theory, I could take the Atari code and plot it almost directly into the NES, and the game logic would run.  I just wouldn't have any I/O.

So...I/O.  That means graphics. I would need graphics for this port -- reusing the Atari graphics wouldn't cut it. With some experimentation, I found that most of Chris's sprites from the GBA Anguna would work if I converted them to be 3-color sprites instead of 15 colors, and cut the number of animation frames in half.  The background graphics weren't going to work well though, because of the color use and assumption of a foreground layer that you could walk behind. But I found some nice zelda-like art on opengameart.com that looked like it would work, so I figured I had everything I needed to try to port this game as quickly as possible.

I also decided to keep it mostly secret. (which is why I've been quiet here). I've said a lot about Halcyon, but I wanted to free the freedom on this project to quit halfway through without feeling judged.

I won't go into too many details about the development process (because I'm lazy), but some points of interest:

  • Bringing the main engine in went without a hitch. Just a few hours of converting assembler syntax, I had a no-graphics proof of concept running.
  • Replacing the graphics code for sprites was pretty quick and easy, thanks to enough tools that I'm comfortable with from other small projects. Actually wrangling and preparing each sprite (by loading the GBA version, playing with the palettes, rearranging tiles to make it fit in the reduced space, etc), took a good bit of effort. Particularly for the main character sprite.
  • Collisions took some time to get working, because I had depended on hardware collisions on the Atari, but the NES doesn't have any hardware support for collision detection. Collision logic wasn't difficult, but took some re-writing.
  • While the overall room contents stayed the same, room layouts had to change from the Atari layouts to accommodate the NES graphics. To design the room layouts, I pulled in the whole map tooling/pipeline from Halcyon. This was a bit of overkill, as these are non-scrolling small maps, but it was quick and easy, which was the goal. 
  • Doors (opened by killing enemies, or that close behind you) took longer than I expected. I had weird specific Atari code to handle them using various atari graphical objects (the atari "ball" was used for asymmetrical doors), and that had to be replaced by code that would update the NES nametables on the fly when you opened or closed doors.
  • One of the things that took the longest was the "glow" that surrounds the player in dark rooms. This was a pain to get right, and still looks a little janky. I just rewrite the background tiles as you move around the room.  It was annoying enough to program that I almost ditched it, but I felt like it was one feature that distinguishes the game from a NESMaker game, so it was worth keeping in place.
  • I hired Thomas Cipollone to compose music for it, which was a great decision. He cranked out a handful of good melodies to make the whole thing sound good. 
  • Beyond that, the other thing that took time was just reworking all the extra things: title screens, menus, subscreen, status bar, ending sequence. All that had to be completely rewritten, and all that stuff takes longer than you'd like.
That all said, I started somewhere around Christmas, and the game is "done" and ready for testing now in April. So a full adventure game in 4 months of spare time isn't too shabby.

Next steps are to test like crazy, polish and debug anything that's too broken, and then figure out how I want to go about publishing and selling carts. Then back to Halcyon!

No comments:

NES Anguna

Well, I had a little bit of time still, while Frankengraphics is finishing up her game Project Blue, to have a little downtime on Halcyon, s...