Infinite Terrain?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
CuecaX
Posts: 13
Joined: Mon Mar 05, 2007 8:54 pm
Location: Brazil

Infinite Terrain?

Post by CuecaX »

I want to make a infinite generated terrain...

but i have no idea how to start making this :(
loading singature...
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

stodge
Posts: 216
Joined: Fri Dec 05, 2003 5:57 pm

Post by stodge »

Do you have an infinite hard drive and inifinite memory?
What does the debugger tell you? You did use the debugger, didn't you?
Katsankat
Posts: 178
Joined: Sun Mar 12, 2006 4:15 am
Contact:

Post by Katsankat »

Generated procedurally... HDD = nearly 0 well just a few procedures compiled
somewhere. Memory : a two dimensions array of unsigned chars... I guess memory can handle this.

Other option, do your world as a planet ... One can travel forever... infinitely.
Baiame
Posts: 41
Joined: Sun Oct 15, 2006 11:33 am

Post by Baiame »

^ 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.
roxaz
Posts: 575
Joined: Tue Jan 23, 2007 8:35 pm
Location: LT

Post by roxaz »

pinballwizard
Posts: 67
Joined: Wed Aug 02, 2006 1:47 am

Post by pinballwizard »

Or check out Klasker's demo at http://www.wc3jass.com/asger/page.php?10 and ask him for some hints :)
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Damn I get a 404 when downloading Klaskers demo :?
Klasker
Posts: 230
Joined: Thu May 20, 2004 8:53 am
Contact:

Post by Klasker »

BlindSide wrote:Damn I get a 404 when downloading Klaskers demo :?
Thanks for reporting it. Fixed the link.

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.
Post Reply