Monday, April 26, 2010

What makes a fun Mario level?

This years 2010 Mario AI Championship includes a level generation contest. Having been interested in creating a platform game for several years I have written up my notes on Mario levels for those who are working on an entry. Disclaimer: I have never worked on a shipping platform game so this is simply what I might try to achieve if I was making a level generator.

Basic Rules:


While objects could be places randomly, good levels that are generated should at the bare minimum follow the basic Mario universe rules such as:
  • A pipe flower must come out a pipe, not the ground
  • Fish are only found in the water and other bad guy should only appear in their respective level themes. i.e. Bowser shouldn't appear in level 1
  • Mario must be able to reach rewards such as coins or boxes without dying.
  • All platforms graphics have left, middle and right images. They should all be used.

These might seem overly obvious, but I have messed around with enough home grown Mario games to see that it needs to be stated.

Average Rules


On any given level you will find the majority of the following to be true:
  • A maximum of seven bad guys on the screen at once by default, lower is better. If you play Mario 1 you will find that there are often only one bad guy on the screen at at time. The more bad guys, the more harder it is and the less fun. Two or three seems to be the magical amount.
  • Mario must be able to reach all platforms. A platform that mario doesn't think he can reach should only be there to lead to a secret and can in fact be reached via a hidden block, flying or other means. Everything should have a purpose.
  • There are between 50 and 100 coins in a level. Play a level twice and get an extra life.
  • A Mushroom box at the start of the level.
  • One save point midway through the level.
  • A Mushroom box after the save point.
  • The final bit of the level is always the same within a variation. In many Mario games you had one bad guy, a hill/tower/blocks. In Mario 3 you had one bad guy and the box to give you stuff.
  • A level is only X wide or high. While rooted in the technical limitation back in the day this size is what players have come to expect so while truly massive levels could be created the average level should fall into the expected size.

Overall level theme design


  • The level should choose a graphics theme such as desert, forest, castle and stick with the graphics and bad guys from that theme. Having a water level with bats doesn't make much sense.
  • At the start or end of a level there can be transitions from one theme to another such as leaving the desert and entering the forest.
  • Location: water/ground/air. Within each theme you can have water, ground or air levels. Walking on top of the castle in the air, water under a forest etc.
  • Does the level scroll vertically or horizontal? The generator should be able to create both types.

What is fun?


Getting to the meat of the contest is making levels that are fun to play. There are many different things that are fun and often times it is important to know what is not fun to know what is fun. Here are just a few:
  • Completing the level is fun. Unless it is world eight no level should be hard or take more then a few lives to get through. In fact many levels you have never seen before you should be able to get through on your first or second try. Dying is not fun. It is temping to make really hard or confusing levels, but don't. Let players run through the level and entice them back with the many ways levels can be replayed.
  • When you almost die (but don't) it is fun. Walking along, a block falls from the ceiling right in front of you making you jump. Blocks falling from the ceiling that you can miss if you just run is fun. The longer you can run without stopping is fun. Being scared, but not in danger is fun.
  • Finding a secret area is fun. Newer Mario games have about three in a level. The secrets shouldn't be completely hidden, there should be a hint such as a block in the middle of nowhere. Running along you could easily miss it, but if you went slowly you would notice it and after a little exploring you would find it. Finding secrets is a lot of fun because you want to show them off.
  • Choosing the right path is fun. When there are multiple platforms you could run across, one being fast and another being slow with lots of bad guys it is fun knowing that you choose the right path.
  • New bad guys are introduced in a learning progression. The first time you see a new bad guy he is all alone and you can approach it slowly and figure out how to kill it, only later having the bad guys come several at a time or unexpectedly.
  • Collecting is fun. The most basic collecting in Mario is the coins, other Mario games have you collect five big coins per level, MB3 had power ups that you could get at the end of the level.
  • Hidden rewards. Coin blocks, power ups, blue coins, one-ups. Nothing beats telling someone where the one-up is on 1-1.
  • It is fun to beating the level quickly. Maybe through a pipe warp or through a trick like running on the ceiling on Mario1 1-2. Players love finding ways around actually playing the game and love telling their friends.
  • Many levels tell a story along with having you run through the level. Ship levels have you arrive at the front of the ship and you progress past the masts and to the back. Level design can include nods to the story.
  • Many levels have a story with the bad guys. On a vertical level there could be a slow but constant stream of the bad guys. Near the end there can be two pipes with the bad guys coming out of them implying they all came from those pipes. Same can be said for many castle levels were you have fireballs coming from bowser who is far off. Having a story makes the level unique and interesting.
  • Highlight one game engine or sprite mechanic. While each level could simply combine the random elements it is much better to have each level be primarily about one thing. A sky level where you have platforms that move on rails. There might be a stationary platform or two, but mostly it is about the moving platforms. Ghost houses are another example where the levels are designed to explore the ghost bad guys and the different ways they can be presented to the player. Choose one aspect to highlight per level. Don't just create another bland Forest 4-2.

Procedurally world and game generation


The last section highlights what I think might be the Achilles heel of the contest. Even if I could generate a pretty good forest level playing 32 of them wouldn't be very fun as the same tricks and level designs would probably be repeated. It is a lot more fun to have several forest levels, several ghost houses, a coin ship, castles, ships, water levels, waterfalls, sand traps all spread out. Much more interesting then level generators would be the task of generating a world, such as the following task:
I just came from the forest world and am entering the desert world. Generate eight levels, two castles, one ghost house, one or two warps and include the following bad guys ....

Given those parameters a generator could introduce the bad-guys one by one knowing that in later levels you can easily beat them. It would be able to tie the levels together such as having one or two desert bad guys in the castle and have odd levels such as the coin ship which while not very fun by itself makes for a fun addition to a collection of levels for a world. World 1-1 should be very easy unlike world 8-4. A stand alone level generator doesn't know where it fits into the overall game or what levels came before or after it. It might just generate ten forest worlds in a row.

There is a random Mario game that you can play online. It generates a world of random levels for you to play, but I only played a few level because it became obvious that all of the levels were about the same and there was nothing new to play. Games that show you every trick in the book in one level are not very much fun later on.

"Fun" is a funny thing. Several years ago I created a random Quake level generator. Me and several friends knew all the Quake levels to well so one weekend I wrote a tool that would automatically generate a map, populate it with items, lights etc, compile it and distribute it to our boxes. Every ten minutes we got a new level no one had ever played before. Most levels were interesting and fun, but one day it generated a level that was a massive room with one wall in the middle. After spawning we immediately realized what we were in, grabbed a weapon and proceeded to run around this one wall. We spent several minutes chasing each other around this one wall laughing the whole time. While definitely the simplest and stupidest level it ever created it was a ton of fun, not something I would have ever set out to design. Following a set of rules for making a fun Quake level I would have never made what it had with my random rules.

I look forward to seeing the entires that are submitted. Writing up this has me itching to go back and play various Mario games to discover more fun aspects and to try out various ideas on my own level generator.

Edit: More information about platform design can be found in this paper: A Framework for Analysis of 2D Platformer Levels

Image by KER

No comments:

Popular Posts