Author Topic: GSF Procedural Terrain Generator  (Read 40204 times)

...Awful...Just awful...
can you explain why this is Awful?
Apparently not lol.

Is there a way to understand the seed? For instance, does a value of 1 create a mountain on a certain x,y coord? This would make predicting maps MUCH simpler.
I understand the frustration, but the seed system is somewhat complex. It's a lot easier to just use the Custom Height Values (CHV) option, which allows you to set your own height values for each corner of the chunks.

The generator runs through the Grid Start and End coordinates, finds the coordinates where a chunk will be created (x, x+Chunk Size, y, y+Chunk Size), snaps the coordinates according to the Chunk Size value, divides them by the Chunk Size value, then alters the final values to keep them below 2 digits.

After that, it uses that value to determine at what position to grab a value from the seed variable. It then uses this new value from the seed for height values. After it has gathered the initial height values, it then interpolates them (by finding the absolute value of the difference between them), and finally multiplies them by the Terrain Z-Multiplier value to find the final height values for the four corners of the chunk. Here's a visual reference:



Edit: I got this generator mixed up with the other infinite generator I've been working on; corrections made.
« Last Edit: April 20, 2013, 06:20:09 PM by [GSF]Ghost »

I'll try to include preset colors for the next update; thanks for the suggestion. Although, I'm not sure what you mean by x,y and z variables?
I just didn't catch it; please let me know where else I mixed client and server code. Also, I tested onWake by joining my own server from another computer, but it treated the connected client computer also as host, which is why I thought it worked server-sided.

what i mean by x,y and z is me and my brother can almost never get the terrain to generate right, it always seams to be a mile up in the air or half buried in the ground or not even there at all. sorry for taking so long to respond.

Ah, yes, something the game has been missing for years. Glad someone finally took the liberty to make it happen!