0
\$\begingroup\$

I'm pretty new to game development but I work on an android app. It's a 2D Jump and Run game.

I do it in Eclipse and the map is readed out of a txt file right now. But I want to do a Jump and run game, where the player must jump over holes in the ground. Theses holes should be created randomly. So I want an infinite map, which is created randomly. Can somebody give me tips how to begin with this? How can I do a randomly generated map? I don't want the full code or something else, just a little tip how to start because I don't know how I can do this randomly generating.

Thanks in advance! Hope u know, what I mean!

\$\endgroup\$

closed as off-topic by Maximus Minimus, MichaelHouse Mar 3 '14 at 14:43

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about "how to get started," "what to learn next," or "which technology to use" are discussion-oriented questions which involve answers that are either based on opinion, or which are all equally valid. Those kinds of questions are outside the scope of this site. Visit our help center for more information." – Maximus Minimus, MichaelHouse
If this question can be reworded to fit the rules in the help center, please edit the question.

  • \$\begingroup\$ Unfortunately questions like this are just too broad for the site. You should try jumping in and implementing something, then ask specific questions about the problems you encounter along the way. \$\endgroup\$ – MichaelHouse Mar 3 '14 at 14:46
1
\$\begingroup\$

I'd define a minimal interval between two holes (I assume your map is tiled so let's say this interval is 2 tiles), then every time a new tile enters the screen, if there wasn't a hole for the previously defined interval, generate a random number to know if the new tile will be a hole.

\$\endgroup\$

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