2 hours ago · Tech · hide · 0 comments

I’ve been interested in procedurally generating fantasy settings for a long time. Terrain is one part of that problem, and noise is a useful place to start. The name doesn’t tell you much, though. What does noise have to do with making a map? In this context, noise is a function that takes a position and returns a number that appears random. If we use that number as the height of the ground, we get a heightmap. That’s what the examples below show: a map viewed from above, with black representing low ground and white representing high ground. I’ve included a few little JavaScript toys to make this easier to see. They start with the same settings. Changing the seed gives you a different map; using the same seed and settings gives you the same map again. The controls work with a keyboard, too. Basic noise The simplest approach is to pick a random height for each tile. This is often called white noise. Each tile is independent of its neighbors, so a very low tile can sit right next to a…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.