MarioGPT Uses AI To Generate Endless Super Mario Levels For Free

Mario has featured in over 200 games since first appearing in 1981's "Donkey Kong." Some of those games, like "Super Mario Maker" and "Super Mario Maker 2," allow players to create their own challenging levels for themselves, their friends, and other players online. But despite the vast amount of Mario-based content in the wild, there are probably people out there who just can't get enough of the diminutive Italian plumber's princess-saving antics. The good news is, it's possible to get an infinite number of Mario levels created just for you without putting in too much effort.

MarioGPT uses AI, some text prompts, and a predicted player path to generate all the Mario levels you could ever want. The AI itself is trained on levels from two classic Mario games: "Super Mario Bros" and "Super Mario Bros: The Lost Levels." This training gives it a solid grasp of assets, enemies, and general gameplay allowing it to generate authentic levels from there. If you want to know the ins and outs of MarioGPT, its creators have released an in-depth paper on its creation and functions.

It's hoped that the tool could go well beyond the 2D Mario universe and speed up game generation in general. MarioGPT and programs like it could in theory help small indie developers take their games to the next level and punch well above their weight in an industry that is dominated by multi-billion-dollar resource-heavy companies like EA, Activision Blizzard, and Microsoft. Anyone can currently grab the program on GitHub, but there's a good chance not everyone will be able to use it.

MarioGPT has a bit of a learning curve

While ChatGPT, the current most famous Generative Pre-trained Transformer, is usable by pretty much anyone who can type, MarioGPT is a touch more complex. It isn't all there in a neatly pre-packaged .exe for you, and you can't just tick some boxes or type some words and watch a level pop up in front of your eyes. There's a very basic level of game development knowledge required to get things going with this program. The creators have included a few simple instructions for generating and previewing levels in a separate post on GitHub.

The code for the levels is generated through Python 3.8, and you'll need to run and generate the code for the level. A small amount of code, which can be copied from the Github page's readme, is required to actually generate the level. Level generation is random, so the same prompt can produce different levels every time the code is run. Other prompts can also be switched in to generate other kinds of levels. 

Examples of prompts include: "many pipes, many enemies, some blocks, high elevation," "no pipes, many blocks, some enemies," "Some pipes, many blocks, no enemies, low elevation," and so on. There is also a small chance an error will happen and the level will be unplayable, but you can just run the program again and you'll likely end up with a working level on the next attempt.