Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Thanks to the ROM hacking scene the file format for Super Mario World (and I'd imagine most other popular games of the era) is well known and basically fully understood. There are also documents out there which will describe it all in painful detail. Unfortunately because it means going to less-than-legal sites I'm can't supply you any links from work, but if you google for the .MWL file extension and an editing application called Lunar Magic it may point you in the right direction.</p> <p>The basic principle though, is fairly simple. First you need your graphics, so you make a single image with tiles for the landscape at a defined size - smaller is more memory efficient, larger gives you more detail, so let's say ours are 32 X 32 pixels. So you end up with something like this (Characters representing different tiles):</p> <pre> ! " £ $ % ^ & * ( ) </pre> <p>You can make one title set per "style" of level, so fire world, ice world, cave world etc. This saves you loading in tiles that you aren't going to use.</p> <p>Next you need a level file, this starts off as consisting of which tile set you want to load and numbers representing each graphic, like so:</p> <pre> fireworld.img 2 2 2 2 2 2 2 2 3 3 2 2 2 2 3 3 3 3 3 3 3 3 3 3 </pre> <p>Merged with the tileset above you'd have (depending on how you number the tiles)</p> <pre> " " " " " " " " £ £ " " " " £ £ £ £ £ £ £ £ £ £ </pre> <p>Obviously you then need to layer more information on top of this: Which tiles are solid, which are deadly etc. This can be done at the image level (a 3 is always solid) or, for more flexibility but larger files, at the map level. Bit flags will do, first number is solid, second is deadly:</p> <pre> fireworld.img 200 200 200 200 200 200 200 200 310 310 200 200 200 200 310 310 310 310 310 310 310 310 310 310 </pre> <p>On top of all of this you need to suffix the level file with a start and end point (a couple of coordinates) and enemies (which graphic they use, which AI routine they use, where they start).</p> <p>Once all this is done you can look into compression. There are a number of ways to save space and obviously it doesn't matter as much now as it did in the 16 and 8 bit eras, but even so our format above is massively wasteful.</p> <p>As always these are just the basic principles. Your results may vary...</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload