I want to make a infinite generated terrain...
but i have no idea how to start making this
Infinite Terrain?
Infinite Terrain?
loading singature...
^ But the point is that it can't be infinite. The values you use to seed a pseudo-random number generator with have to come from somewhere. It could be to all intents and purposes infinite (i.e., it'd take more than a lifetime to visit all locations), but never truly infinite.
Anyway, I'd suggest generating heightmaps for large areas using perlin noise, then the diamond-square algorithm for more detail closer to the player (not because I have experience with that kind of thing, but because that's what Flavian uses in Infinity.
Anyway, I'd suggest generating heightmaps for large areas using perlin noise, then the diamond-square algorithm for more detail closer to the player (not because I have experience with that kind of thing, but because that's what Flavian uses in Infinity.
take look at this:
http://www.gameprogrammer.com/fractal.html
http://www.gameprogrammer.com/fractal.html
-
- Posts: 67
- Joined: Wed Aug 02, 2006 1:47 am
Or check out Klasker's demo at http://www.wc3jass.com/asger/page.php?10 and ask him for some hints
Thanks for reporting it. Fixed the link.BlindSide wrote:Damn I get a 404 when downloading Klaskers demo
It is quite difficult to generate an infinite AND seamless terrain with random trees, grass, and textures. I exported CTerrainSceneNode from the source and added a method for loading the heightmap from an array of floats. Kind of silly that it didn't have it already. Whenever the player reached a certain distance to the edge of the terrain, I regenerated the terrain again centered on the player. The real trouble is no avoid any kind of "snapping" errors and textures moving around slightly after a new terrain was placed.
I suggest you start out with creating a randomly generated terrain of fixed size, and then move on to seamless terrain if you feel you got the upper hand of it.