Register - Login
Views: 85558341
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - JCS - Stats - Latest Posts - Color Chart - Smilies
09-19-17 10:57:36 AM

Jul - Game Research/Hacking/Modding - Peppy's Tool - The Star Fox Random Level Generator New poll - New thread - New reply
Next older thread
Super Mario 64 forum moderator
Level: 50

Posts: 621/621
EXP: 942160
For next: 5157

Since: 07-27-07
From: Montreal, Canada

Since last post: 21 days
Last activity: 19 days

Posted on 08-28-17 10:08:34 PM Link | Quote
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!

Rumours of my death have been greatly exaggerated.
Level: 57

Posts: 894/906
EXP: 1434117
For next: 51811

Since: 02-22-10
From: The Codrex, Karda Nui

Since last post: 5 days
Last activity: 33 min.

Posted on 08-29-17 11:22:10 AM Link | Quote
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!

Star Mario
Placeholder Ikachan until :effort: is found
Level: 159

Posts: 9665/9675
EXP: 51795338
For next: 15419

Since: 08-10-09
From: Santa Cruisin' USA

Since last post: 2 days
Last activity: 13 hours

Posted on 09-09-17 11:13:45 PM Link | Quote
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.
Next older thread
Jul - Game Research/Hacking/Modding - Peppy's Tool - The Star Fox Random Level Generator New poll - New thread - New reply

Rusted Logic

Acmlmboard - commit 2f1bc75 [2017-08-27]
©2000-2017 Acmlm, Xkeeper, Inuyasha, et al.

30 database queries.
Query execution time: 0.155439 seconds
Script execution time: 0.005659 seconds
Total render time: 0.161098 seconds