CommanderZ wrote:Oh, I thought I am limited to 32 heights
Could you please set up a patch setting for maximum height?
No, I don't think this makes sense. I mean, putting a hardcoded heightlevel limit into the game which has no background in the data structures or in the code (I think the problems that still exist can be solved) isn't a benefit. But, I think, letting the player decide "I want to play on a scenario where the highest mountains have height X" makes sense, indeed. But the latter is a parameter to some map generation algorithm, not to the game itself.
CommanderZ wrote:
I would put there values like 16, 32, 64, 128 and possibly even higher (with warning that too high values drain CPU). The glitches make heights over 64 pretty undisplayable for now.
Ok, making the painting code work efficient with big heightlevels may be a challenge. But lets see... For example, the terraforming code so far works in O(heightevel^4), where O(heightlevel^2) are the result of performing a linear search on an array of size O(heightlevel^2).
CommanderZ wrote:
Btw, are you sure mantaining the old array is necessary?
Yes and no. Yes, because maybe some people don't want to spend some extra space for extra heightlevels. Those people can happily keep playing using the traditional 16 heightlevels - I think both solutions can live parallel, if we want so. Also, the upper four bits of the tile_height field contain pretty important information, so you might use the lower bits for something else, but you can't remove the tile_height field completely from the Tile datastructure.
And no, when the patch is on, one doesn't need those 4 bits for anything.
And there is a little teaser what a 80 tile mountain looks like (I know, the terrain is ugly, but...)
CommanderZ wrote:
EDIT: So with what max height should I account with with my map generator modifictions? 64? That might be enough (for maps smaller than 1024*1024 is 128 too much, but it gotta look gorgeous on very large maps).
If introducing a parameter for that is possible - I think doing so is the right thing.