# Good Tutorial for Procedural Terrain?

Posts: 171Member

Making an fps game and am either going to do something mission based, or a survival game. I really want to do a simple survival game based on not dying and not running out of power but...

Survival games really need randomly generated terrain, and I'm not sure how to do that. I realize it's a perlin noise heightmap for the mesh and then the heightmap is color coded for figuring out what should be what terrain etc, but I don't know how to code it.

Are there any good tutorials for how to do this in Godot?

• Posts: 382Member

I've been doing my grad school work on this, so here's the best starting point:

You'll get the basics: where height data comes from, how to use Godot's surface tool yada yada, how to have all this happen in a separate thread, and how to enable collision on it. He does one make one mistake where he computes height for a single square six times, 3 for each triangle that makes the square. If you pause and think about it you'll realize you don't need to compute it six times, just four.

Going from there: you'll want to make bigger chunks than he does in the tutorial and play around with adding more layers of noise and mixing them to different effect. For rivers I suggest employing perhaps your first layer of noise as `abs(noiseVal)`. The absolute value, depending on if you inverse it or not, can make nice rivers or ridges. Your rivers in this method will be, however, like as in minecraft, flat.

• Posts: 382Member

My current game has almost no need for my grad work studies (sadly) and also no need for programming characters running about, which is why I also look forward to making a game with infinite terrain. My idea is:
Just Run
You wake up in your tent to your wife nudging your shoulder. You're in northern Canada during a summer getaway. "Something's outside the tent" she says. If you stay still for too long, eventually the tent gets torn into and an alien nasty dark colored beast drags your wife out screaming.
The further you can get away from the tent the higher your score. Needs: cool way for the alien to leap between trees, random stuff to find as your run, a good alien AI that scans and looks for you in a non-mechanical feeling way, and balanced fun between stamina depletion and hiding mechanics.

• Posts: 171Member

Thanks, will look at it.