Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Evening.

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

Example:

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

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
    
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
1  
nothing really... –  Mr. Beast Mar 29 '13 at 9:59
add comment

migrated from stackoverflow.com Feb 25 '13 at 13:36

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

1 Answer

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
add comment

Your Answer

 
discard

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.