Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


I created a xna-game like the iOS Platformer game "Banana Kong". The level-layers are currently saved as XML files.


        <tile type="0" x="50" y="70"></tile>
        .. And so on
    .. And so on

Its a temporary solution, yes, but when I sell/release it, static levels are not very good.

So How I could create levels randomly?

The engine would have to pay attantion, to not create tiles, the player can't reach, or create tiles an other tiles.

My current concept is, that the engine could create random tiles as long a tile fits every condition - but there is a unlikely chance that this will never happen and I think there are better methods to do this.

So, I hope anybody could give me some resources, theories or anything, what can help me.

share|improve this question

migrated from Feb 25 '13 at 13:36

This question came from our site for professional and enthusiast programmers.

Microsoft won't support XNA in the future, just saying. – Jean-Philippe Leclerc Feb 23 '13 at 21:09
I know this, Jean-Philippe, but thank you anyways. – namespace Feb 23 '13 at 21:13
You've got MonoGame which is actively developed. – animaonline Feb 24 '13 at 8:59
What has the question "create random platformer levels" have to do with XML files or XNA or C#? I retaged it. Even though you seem to think the way your levels are represented in files is relevant, I think it has nothing to do with the question. – Liosan Mar 29 '13 at 9:57
nothing really... – API-Beast Mar 29 '13 at 9:59

You may want to give this paper a read. It is about constructing platformer level based on jumping rythm.

The simplest approach would be to define rules for each layer and match the tiles agains it. You may define a range the character can jump with single (and maybe double ) jump. Then evaluate possible next tiles in this range and pick one at random.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.