Register - Login
Views: 95216375
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - Stats - Latest Posts - Color Chart - Smilies
09-25-18 03:33:57 PM
0 users currently in General Game/ROM Hacking. | 2 guests

Jul - General Game/ROM Hacking - Peppy's Tool - The Star Fox Random Level Generator
Login Info: Username: Password:
Reply: Mood avatar list:

Options: - -

Thread history
Posts: 917/1084
sf1 levels are a time-based script system, whereas sf2 is more map based

that said, having another randomizer for 2 would be cool
Posts: 9681/9863
Gonna have to second divingkatae on that one, if at all possible. The one issue I see is the fact that Starfox was a rail shooter, while Starfox 2 one can pretty much fly anywhere, not to mention that battleship/planet levels have multiple segments that may rely on different... protocols, so to speak? (It's been a day)
Posts: 763/813
Now that SF2 has been released, it would be nice to see this updated for that too.
Posts: 9665/9863
Can't believe I'm saying this. The wise one has returned.

Also thank God a version of the level editor exists because I somehow lost my one copy of it, and it's been years and I'm aching to dabble in that program again.

On that note, any idea if you'd be willing to develop some kind of SF2 tool once the official ROM leaks?

Regardless, going to be tinkering tonight.
Posts: 894/1084
it certainly has been a while! your star fox editor is what originally brought me back to Jul so i could PM you about it some six years ago i can't wait to try the randomizer out, and i'm certainly glad something more came of the script editor!
Posts: 621/621
Hello there!

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!
Jul - General Game/ROM Hacking - Peppy's Tool - The Star Fox Random Level Generator

Rusted Logic

Acmlmboard - commit 5d36857 [2018-03-03]
©2000-2018 Acmlm, Xkeeper, Inuyasha, et al.

18 database queries.
Query execution time: 0.169960 seconds
Script execution time: 0.006834 seconds
Total render time: 0.176794 seconds
Memory used: 524288