Game Development Community

Randomizing/Increasing the Difficulty of a Map

by Justin Mosiman · in Torque Game Builder · 03/10/2010 (2:15 pm) · 3 replies

Hello,

I am just getting started on my next game and the basic genre behind it is a platformer. As the character moves through the map, I'd like the map to get harder. In addition, I want it to be random so I don't have to actually make the map and it would be a new experience every time. A game with similar functionality that does this well is on the iPhone called Doodle Jump. No two games are the same, and as you get higher up the map gets harder.

What is the best way to accomplish this?

I have thought of one idea where you have a random number and then assign that random number to an array which has a grouping of objects and then place that grouping. As you get further on the map the random number would then be weighted towards one grouping of objects rather than another.

For example, say that group A of objects is really easy to get past and group Z is really hard to get past. Group A and Z are in an array, and the random number would be more likely to choose A at the beginning of the game because of the weight. However once the player gets further it is more likely to choose Z. Hopefully I explained it well enough.

But is that the best way? I have never done anything like this before so I don't have any basis for what would work and what doesn't.

#1
03/10/2010 (3:56 pm)
Are you talking about a Mario-style platformer or a game like "Doodle Jump"? It probably doesn't matter either way, but just curious.

Your idea will work, and is a pretty good way to handle this problem. For example, in a Mario-style game you might create a tiled layer 100 squares by 20 squares and name them in such a way that you could load them like an array, harder ones being given higher numbers. As long as the edges always matched (or matched close enough, you'll have to work that design out), you can just append new tiled regions to the right.

There are a couple of issues to consider. What you consider hard to solve may be easy for others (and the other way around). I'd make sure that there was a way your play testers could identify the "tile" they are in (preferrably with a text label on the GUI) so that they can let you know which tiles are easier and harder. The other issue is that all of the tiles could be mastered, making the game go on forever. You could keep the game fresh by being able to supply new tiles (through an in-game interface or patches).

The other option is to generate content programatically. This is difficult and would require a great deal of time. Tweaking such an algorithm to make playable levels would entail a great deal of testing that isn't often available to the average programmer. The advantage of this sytem is that there never will be the same 2 "tiles" and the game will always be fresh.
#2
03/11/2010 (12:11 pm)
Thanks for the response William, you confirmed that there is no silver bullet that will make it easy :)

I am planning on a mostly Mario style platformer game, but the Doodle Jump video was a good example of the random generation that I want to do.

At this point I'm thinking that I am going to generate the content programatically - I sort of have an idea in my head how I would do it. I'm not in any rush towards completing it quickly (my last 2D game took 9 months), so I think that I would rather do it right.
#3
03/12/2010 (8:12 am)
Another way of adjusting difficulty is to have time limits. X objects in N seconds, travel a certain distance in the time or combinations.