Some semi-random thoughts on terrain generation
Quote:Do we want to enable the orenest generator to generate other stuff, too?
HELL, YES!
A veins of air would be really awesomeBig Grin

On syntaxis:
[OreNests]
OreNestType=Air
OreNestMaxHeight=65
OreNestAmmount=10
OreNestSize=15
OreNestBiomes=Jungle (this one isn't necessary, but could be really nice, if done)
OreNestType=Netherrack
OreNestMaxHeight=20
OreNestAmmount=3
OreNestSize=50
OreNestBiomes=

So, in my mind it should be parsed like: (pseudopseudocode)
Code:
for (c = 0; c < NumKeys(OreNests); c++) {
  if (GetKey(c) == "OreNestType") {     // means we're parsing data for new ore type
    if (_ore_description != NULL) { RegisterOre(_ore_description); }
      _ore_description = new OreDescription( GetKeyValue("OreNests", "OreNestType") );
  }
  if (GetKey(c) == "OreNestMaxHeight" && _ore_description != NULL) {
    _ore_description.maxHeight = GetKeyValue("OreNests", "OreNestMaxHeight");
  }
}

So it will eat "sections" of keys and will arrange ore with specific types with given settings.
Reply
Thanks given by:


Messages In This Thread
RE: Some semi-random thoughts on terrain generation - by Taugeshtu - 11-12-2012, 01:07 AM



Users browsing this thread: 12 Guest(s)