My lizard is the Lizard of Space
Since the last update, I have completed the Maze Zone and Palace Zone areas of the game. Both of these are entirely new since the demo, so I don't have an original area to compare against like I have in previous updates.
The original concept for me was of a towering palace, with a hedge maze adjacent forming an entrance to it. In the end, it's really just a garden of cedars and not much of a maze, but I'm not sure how I would have made a real maze interesting to play anyway.
The Palace Zone stands on top of the Maze Zone. It's old, and inhabited by a few ghosts. As there are two sides to the world of Lizard, there is an alternate way to ascend the palace by climbing through a network of platforms on the other side, built above the Forest Zone found there. This concept was partially playable in the demo, but the connection to the Palace Zone wasn't ready to be seen at that point.
I have one remaining area to finish. A smaller version of it appeared in the demo, but it is being rebuilt considerably larger for the full game. This is the Void Zone. If you're familiar with Marble Madness, I consider it the Silly Race of Lizard. It's a place where things are a little strange. In particular, space works a little differently here: you can fall down in the Void Zone, but you'll never hit bottom, because it doesn't have one!
On the subject of space, though, I want to talk a little about data space from a development perspective...
Game development is resource management. In order to get a game finished, you have to deal with the reality that you have limited amounts of the things you need to build it. There's the generic kinds of resources that most types of work have to deal with (e.g. money, time, skill), but there are a few that are very specific to the domain of games. For an NES, some of the important ones include: CPU power, onscreen colours, onscreen graphic tiles, RAM memory, and ROM space.
So what is ROM? ROM is a container for data, like a file on your hard drive, or a floppy disk. In this case it takes the form of a chip inside the game cartridge.
The ROM is a collection of individual bytes of data. Each byte is package of 8 little binary yes/no or 1/0 pieces of information. A single byte might represent a number, or a character, a piece of graphics, a code instruction for the CPU, or any number of things; it's really up to the application to decide what each byte means, but to the ROM chip each byte is just 8 bits of data it has to provide.
The ROM chip communicates with the NES through the metal pins that stick out from it. Each pin has a particular purpose. 8 of them are used to deliver a byte of data to the CPU. Other pins are used by the CPU to tell the ROM chip which byte it wants. Each byte has an address, selected by binary inputs on a collection of address pins. Each unique combination of 1s and 0s on the address pins will select a different byte on the ROM chip.
Every new address pin you add to a chip doubles its capacity: with 1 pin you have two combinations, with 2 pins you have 4, with 4 pins you have 8, et cetera. This is why ROM sizes come in powers of two. In my game, the ROM used will have 19 pins, giving me a total of 524288 (2^19) bytes, also known as 512 kilobytes.
Every addressable byte in a ROM chip must stores a byte of data. If I only had, for example, 475 kilobytes worth of information to store, I have to figure out what to do with the rest. Usually unused space is just filled with all zeroes, or something similar, though occasionally you can find other strange things in the unused space of ROMs.
You can kind of gauge how much is left to do in the game by the amount of space left in the ROM. Any game content I make takes up space, and if I run out, the game has to be done, right? It's not quite that simple, of course, but there's a little bit of utility in this metric, and I do have to watch the numbers anyway to make sure I don't go over. My ultimate goal is to make the ROM as full of content as I reasonably can. There's a lot of factors to juggle there, but as I get closer to the end I'm pretty satisfied by how much of the available space I've been able to put to good use. I really want to pack as much as I can into this game, in a very literal sense.
The cartridge hardware I've chosen naturally divides my 512k ROM into 16 pieces of 32k each. To try and manage the use of space, I divide these by category, and try to each category as its own problem of filling that space up. There's always at least a little wasted space in every bank, sometimes there's nothing small enough to add, but a "full" bank should be using at least 95% of its space. This is how I've divided it up:
- Rooms: 10 banks, 320k
- Graphics: 2 banks, 64k
- Character/object code: 2 banks, 64k
- Music: 1 bank, 32k
- Main code: 1 bank, 32k
More than half of the game data is dedicated to the rooms that make up the world. Individual rooms are mildly compressed, so their size varies, but on average they take up about 700 bytes each. I currently have about 19k left of unfragmented space for rooms, which I think should be enough for the Void Zone, and a few remaining extras. I could create a more complex compression technique to fit more, but I've been avoiding this because, aside from extra software engineering required, it would slow down the transition between rooms, and I want the player to be able to move quickly through the world.
Graphics data are subdivided into 1k blocks of tiles. This is uncompressed, mostly to keep room transitions quick. Every transition unpacks and uploads 2k of room data, and up to 8k of graphic tiles; if I compressed the graphics too they would dominate the time spent unpacking. I didn't think shrinking that 64k graphics allocation would be worth slowing down the game. I've currently got room for 16k of tiles, which will be spent mostly on the unfinished boss character sprites. Lots more than I need, I think; I'll try to find a creative use for the spare.
The character/object banks have about 12k of free space. This should be enough for the remaining bosses, I think. I'm expecting each boss to require around 2k of code.
The music bank is really tight; there's only 286 bytes left. Thankfully the soundtrack is already finished; the only need for these remaining bytes is any extra sound effects not yet covered. It should be enough.
The main bank has 3k left. I don't actually know what I'll do with this space, because all the main code is done. This is another case where I might try to find a creative use.
So... considering all of this, the ROM is about 90% full with existing content. Because of fragmentation I don't think I could reasonably do better than about 97% full when it's done, but the reason I'm sharing these numbers with you is to try and give you hope that this game is almost finished. Whatever I do between now and the complete game has to fit into that remaining ~7% of rom space!
After the Void Zone, I'll have the 5 remaining bosses to finish, and Lizard will be done. I'm getting a bit excited, actually, I can't wait to share it with you. Sorry about the wait.