New answers tagged

2

@Steven and @Engineer both provided fantastic information, but I'd like to add one additional note regarding world generation commonly used for games like Terraria and Minecraft (and many others) that increase the performance of these things - noise. In many cases, a world seed is provided that is used for noise functions. Those noise functions can provide ...


1

You need some kind of coherent noise function, I would recommend go with Perlin or OpenSimplex noise, it is well known algorithm and there many implementation of same functions for different languages: C/C++, C#, Python, Java, JS etc... Basically you just need to use noise function to generate value for x/y coordinate and apply math function on top of that ...


1

For this answer, I'm going to assume that the inputs to your biome-selection process are just the elevations (or other measures like temperature/moisture) output from your Perlin noise function. If you're generating your biomes in a different way, be sure to edit your question to walk us through your current generation rules. Perlin noise and similar ...


6

Couple of additions to Steven's informative answer, at a technical / processing level... speaking here in a general sense of the techniques used to generate large worlds (not Terraria specifically). Generating the initial space Firstly, there are fast block copies (memcpy / memset in C) used to allocate the initial memory (2D array) representing the world. ...


6

When the world generates, you'll see various texts appearing while waiting. These texts aren't random, the world is actually processing what the text says. I've seen a video that showcases how the world generation looks like behind the scenes. So that gives you a rough idea how it's creation works: (https://www.youtube.com/watch?v=bF-_AeRRbmU) It starts out ...


Top 50 recent answers are included