1
2
Dec 20 2007, 5:16 am
In response to Garthor
|
|
And when you add identical turfs to a blank map does BYOND optimize or is every turf an individual piece of memory.
|
In response to Obs
|
|
Adding new turfs at runtime won't result in a long-term performance hit compared to them being in the .dmm file at compile-time.
|
In response to Garthor
|
|
So it's exactly the same? How do you layer two turfs together?
What's the limit on the number of turfs anyway? |
In response to Obs
|
|
In the map editor, placing a turf on top of another turf will add the previous turf's icon to itself as an underlay, if it would show through. I don't think there's any good way at runtime to determine whether one icon will show through another one, though, but you can still add the old turf's icon to the new turf's underlays, assuming that you know it will show through.
There is a limit of 65,535 unique turfs (turfs with the same variables are counted as one towards this limit), but also an absolute upper bound of 224 (16.7 million) turfs. |
Here is my map generator (using diamond square):
var/worldGen/w = new() |
Over at Dungeon Crawlers there's been a lot of great discussion on the forums about map generation, and we could always use more. Even non-members can post to those forums, so by all means stop by.
Granted you're doing an overworld map, which is rather different than an underground dungeon setting, but there's a lot of useful stuff to check out, plus links to sites with more on this topic. As far as dynamically making new maps, remember you can change world.maxz at runtime. New Z-levels will fill in with default turfs. However, 500×500 is a pretty big map so you should make your map generator sensitive to this fact so it doesn't bog down the server during generation. (I.e., put in a lot of sleep() calls.) Lummox JR |
1
2