by MvGulik » Fri Sep 07, 2012 2:31 pm
(Additional world data export)
Don't know much about exported Salem world map images (other than what I picked up from Haven). Or about Salem's world specs/features. But I find it a interesting subject ... So just adding some raw thoughts on the matter.
Elevation/Height:
Considering its possible to have cliffs in Salem. Storing the Elevation data as image alpha map can only be used as a general height map. Problem(1) is that every ground tile has four elevation values that are(can be) independent from the elevation's in the neighboring ground tiles. So you need to merged(averaged) them (loss of data). ... Problem(2): see Ground type section.)
Alternative:
- The elevation data could, if where talking PNG, be stored as additional PNG data chunk. (Can be stored as plain text or as binary data(if I recall correctly). This data chunk can also be compressed if needed.) The benefit of this way would be that you don't end up with additional separate elevation file(s). But using the elevated data again involves more work of course.
Ground type: (for a potential clean worldmap ground-type overlay)
- Figure that ground type is a single value per tile, and with a range less than 255 values. The alpha channel seems usable for this. But if your already storing elevation as a PNG data chunk. Doing the same for the ground type seems more logical. And on top of that. (problem(2)) Data chunks will not interfere with the displayed image itself, like alpha data will. (Local user display of saved map sessions.)
That still leaves the format of the stored data steams open. Thinking [tile1[TL, TR, BL, BR], tile2[TL, TR, BL, BR], ... ] seems fine to me.
[edits: lots ... done.]
---
Mmm, potential additional problem I did not take in account. ... Are the elevation values given to the client on ground tiles absolute or relative?