• Advertisement
Sign in to follow this  

Hill Climb Terrain

This topic is 1520 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello

 

Iam making a game similar to hill climb racing game for iOS and andriod. Below is the link.

 

https://www.youtube.com/watch?v=NoBjjcMyjbE

 

I was kind of wondering how to make a endless terrain, keeping the terrain structure/pattern same everytime, even if the user resets the game and plays again. not like a random terrain generation..but generation one terrain with same pattern, but endless. similar to the game link above.

 

 

Any Suggestions. 

Share this post


Link to post
Share on other sites
Advertisement

what i am keen on knowing is how do i generate a fixed patterned endless terrain. so, even if i reset the game, the pattern of the terrain is same as before and endless.

Edited by anupgupta

Share this post


Link to post
Share on other sites

what i am keen on knowing is how do i generate a fixed patterned endless terrain. so, even if i reset the game, the pattern of the terrain is same as before and endless.

 

That's the part I answered. You figure out a way of transforming pseudo-random numbers into a patterned endless terrain. Then make sure you start your pseudo-random numbers with the same seed every time, and you'll get the same pattern.

 

If that's still not clear, try to ask the question differently.

Share this post


Link to post
Share on other sites

Most random functions have a parameter for a seed.  Once seeded with that number, they will return the same sequence of numbers.  So for example, if you were calling rand() for the height for every x meters and then creating a line out of that (or a spline for curves, a catmull rom spline would work well for creating a curved line), as long as you always passed in the same seed, you'd get the same line.

Share this post


Link to post
Share on other sites

To give you an example of where this is used, have you ever seen this website?

http://www.minecraftseeds.info/

 

MineCraft uses procedural generation for its worlds. Every time you create a new world, you are given the option to enter a seed, or leave it blank. If you leave it blank, the seed is randomly generated. If you enter a number, the world generated from the number you enter will always be the same, so that's kind of a way of sharing worlds with your friends.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement