Extracting Super Mario Bros levels with Python(matthewearl.github.io) |
Extracting Super Mario Bros levels with Python(matthewearl.github.io) |
I want to do more of these and experiment with training generative neural nets on that kind of thing when I get the chance.
[1] http://www.vgmaps.com/Atlas/NES/index.htm#SuperMarioBros2J
If anyone has interest in picking up the project, and auto-generating the levels, ping me.
Other tools mapping the Super Mario Bros. levels:
1. animmerger [1] by bisqwit
Written in C++.
Takes png images as input.
This tool seems to be the reference in creating level maps for Super Mario.
Matt's tool seems to use animerger to generate the color palette according to the source code [2]
2. ALMA [3] by BZH314 (disclaimer: our baby project)
Matt mentions using this approach as a possibility in the post.
Written in Python using the OpenCV [4] computer vision library.
ALMA takes videos as input, generates the map levels as images (png and animated gifs) and also generates the videos to show the algorithm in action [5]
(shameless self plug: need more YouTube subscribers to get that sweet sweet vanity URL please :-)
ALMA applies background subtraction to remove the moving enemies in order to keep only the background (a problem Matt's tool does not have)
3. Manually stitched
If you're looking for good SMB1 level maps stitched manually, there are some good work out there:
Rick N. Bruns' nesmaps.com [6]
Mariowiki: example of World 1-1 [7]
Are you aware of other tools out there?
---
[1] https://bisqwit.iki.fi/source/animmerger.html
[2] https://gist.github.com/matthewearl/733bba717780604813ed588d...
[5] https://www.youtube.com/watch?v=wanvx0PpE1w&list=PLa4uefpt5W...
[6] http://www.nesmaps.com/maps/SuperMarioBrothers/SuperMarioBro...
If what you want to do is extract a level and/or play around with level creation the golden standard tool is Lunar Magic [0].
There are some forums with information about rom hacking, level creation, music creation and so on for SMW, like SMWCentral [1].
You're looking at a lot of procedural data where for example the patterns behind the sprites can change without having to create a new sprite. Where the palettes were separate from the image data so they could look different without having to use double, triple the storage. These things can't be picked up on by png, it's not a smart enough format to be able to arbitrarily detect all repeated patterns of varying sizes and turn them into what amounts to a procedural level script.
I can't find a good exhaustive sprite sheet of SMB (this is the best I can find, but it contains a ton of repeats: https://www.mariouniverse.com/sprites-nes-smb/). I'd love a visualization of just how tiny SMB is in terms of what's stored in it.