I'm currently building a Mars colonization game and I'm wondering if anyone can point me to resources on how to procedurally create resources and biomes within a 2d game. Much like in a game like Factorio were different resources and such are spread around the map.

Thanks in advance!

  • 1
    \$\begingroup\$ This question is off-topic here, because it asks gor resources, please refer to our help center \$\endgroup\$ – Bálint Mar 14 '17 at 6:34
  • \$\begingroup\$ There are countless ways to generate terrain and terrain features procedurally. Which one is the right method for you depends on your exact requirements. Can you write a bit more about how you want your terrain and your resource placement to look? \$\endgroup\$ – Philipp Mar 14 '17 at 11:43

Many games use noise generation such as Perlin, Value or Gradient noise for their resource spawning. Perlin is the most common type, and is used in Factorio. There is plenty more info on Perlin Noise to be found on the web.

  • \$\begingroup\$ Can you post a source which says that Factorio uses Perlin noise for resource field generation? Maybe it does for other terrain features, but It doesn't really look to me like the resource fields are generated that way. \$\endgroup\$ – Philipp Mar 14 '17 at 11:41
  • \$\begingroup\$ wiki.factorio.com/index.php?title=World_generator \$\endgroup\$ – Dennis Mar 14 '17 at 13:08
  • \$\begingroup\$ Ah, great! I'll get looking into that! \$\endgroup\$ – Yatoniea Mar 14 '17 at 18:05

Not the answer you're looking for? Browse other questions tagged or ask your own question.