It's been a while...
Some of you might remember that I was working on a Star Fox level editor around 2004, before I started hacking Super Mario 64 which lead to me making Toad's Tool 64.
Here's a thread about it on the old Acmlm's board:
The editor never went farther than a level script editor, where level script commands are listed and parameters can be edited, along with a single model polygon viewer. When I went all in on SM64 hacking I stopped working on it, but it helped me a lot to quickly figure out how the polygon and level data was stored in SM64, since they have similar formats.
I love when game corruption leads to seemingly random levels. This is the kind of thing I would enjoy doing as a kid by experimenting with Game Genie codes on games like SMB1, and also by "circuit-bending" (hardware hacking) my NES with a switch that could (sometimes) warp SMB1 to levels filled with random platforms, enemies and blocks.
Even though I enjoyed playing levels like this via game corruption, for some reason it had never occurred to make a tool to patch a game with randomly generated levels.
When I learned about Super Mario 64: Chaos Edition and the Super Mario World Randomizer, a light bulb lit up on top of my head (I blame home automation...). I thought about doing some game randomizer with the games I've hacked over the years.
Star Fox was a good match for the kind of randomizing I was striving for, since it's not a platform game, which randomness can make easily unplayable by creating walls and unreachable platforms.
It's also very linear in its gameplay (though level scripts do have some conditional branching and loops) so you can easily generate playable random levels simply by chaining random level script commands.
So... I made a tool:
Introducing Peppy's Tool - The Star Fox Random Level Generator. (Is there a pun to be made about this name?)
Download links for Windows and Mac
The tool will patch a Star Fox ROM with a new randomly generated level accessible though the default "Training" option in the control setup screen. It supports version 1.0 and 1.2 of the ROM, with or without a header. It doesn't work with higan or bsnes yet, probably because it extends the ROM by 32k and these emulators don't like that.
When I first got it working and played those random levels, I found it more enjoyable than I imagined. The levels are full of surprises and are seemingly infinite, since the tool fills a whole 32k bank with level commands (the whole game uses two 32k banks for level scripts). Sometimes weird stuff happens, like corrupted music and weird camera angles and other glitchy stuff. There's also always new things to shoot at on the screen which makes it hard to stop playing.
At the technical level, it works by scanning every level script commands in the game (excluding branch, loop, conditional branch and some other commands) and storing them in order in a list. Then it creates a new level by chaining random commands from that list into the extended 32k, and patches the Training level to jump to the start of a an existing level chosen at random (to initialize music, background, camera etc.) then jumps back to the new level.
By default the generator will copy random groups of 1-10 commands at a time from that list from their original order, so you may recognize some groups of objects from the original game. Some objects/structures in the game are made of more than one command so by doing that it can preserve them more entirely. You can adjust the range of randomness for command group sizes by moving the "Randomness" sliders.
You can make "completely random" levels by setting both randomness sliders all the way to the right, which will make the level generator copy one random command at a time from a random position in the list, creating more chaotic levels. It may increase the possibility of crashing, even though it doesn't tend to happen very often as the game engine is relatively resilient.
You can also adjust the level density, which will remove a percentage of level z-spacer (or what I called ztimers) commands at random. At its maximum setting, density will be so high that the game slows down to a crawl with too much stuff on the screen.
There are other features, which you can see in the screenshot and are described in the read me file.
Ok that was a long post, I guess I can't help it, like in the good old days!