Cartridge Tilt is a series of randomly generated mappacks using a highly experimental, structure-based level generator. The generator builds ground, ceilings, pipes, bridges, blasters, enemies, and more, all with a steadily increasing difficulty curve.
Based on that description, you might be expecting the level generator to have traditional SMB-like design sensibilities, like the Mari0 1.6 level generator mod, or maybe even Level-Headed.
Not even close.
If anything, this is more of a sequel to The Random Mappack, a really early "random level generator" I made that simply fills every tile with a random ID. I wanted to make something that was a little more sophisticated this time, while trying to shoot for a glitchy, corrupted aesthetic similar to another old level I made... and ended up going completely overboard, writing over 1500 lines of code!
The result doesn't play a whole lot like Mario; it's more like a maze that you have to get through. Is there another way around these enemies? Which tiles are safe and which are not? How do you get past this seemingly impossible barrier using portals? (The portal gun is very much required to make progress.) Luckily, you're given infinite time and lives to figure it out; the only limit is your patience.
How it works
The generator starts by creating a bunch of randomly sized and positioned "structures," selecting several of them to place on the map in a random order. Sometimes this means hills are placed behind the ground, and other times the hills are placed in front of the ground, creating a giant hole. Enemies are randomly placed in the resulting level wherever there is ground to stand on, with more appearing in later levels. Finally, a ton of "distortions" are applied, placing random tiles all over the map to make it even more of a glitchy, corrupted mess.
The difficulty curve and obstacle frequency have been hand-tuned so that, in most cases, the generated levels are completable. However, I was not able to find a good way to ensure that every generated level can be completed; portals open up tons of possibilities for traversing the map, and accounting for every case is nigh impossible. That said, I did personally verify that all of the levels generated by the default seed can be completed, without using glitches or editing the levels by hand.
How to use
You can either run main.lua with Lua or as an executable script, like so:
# Run with Lua $ lua main.lua [args]
# Run as an executable script (UNIX only) $ chmod +x main.lua $ ./main.lua [args]
The script accepts the following arguments:
Arguments: -d, --directory Set the directory to generate the files in (if not provided as the first argument) -s, --seed Set the random seed used to generate levels (defaults to "Cartridge Tilt") -v, --verbosity Set how in-depth the info printed to the console is (0-5, default 1) Level format: --1.6 Generate levels in vanilla Mari0 1.6 format (default) --AE Generate levels in Alesan's Entities format Level parameters: -w, --worlds Number of worlds to generate (default 8) -l, --levels Number of levels to generate per world (default 4, other values not supported by 1.6) --height Height of levels to generate (experimental, not supported by 1.6) Generator options: --no-distortions Turn off distortions (random blocks) --no-enemies Turn off enemies