I actually had an idea of switching city every week or every month or so. I think that might be cool.
Heck, if we get a ton of players (donations) we could even launch a second city!
Anyhow...
As Rhys correctly guessed, I'm working on letting players purchase lots. Rhys' rendering code is kinda daunting, and so far my tactic has been to tackle this task in small, bite-sized chunks. As fortune would have it, Rhys left a good starting point for me in the client code:
Code:
private bool isLandBuildable(int x, int y)
{
if (x < 0 || x > 510 || y < 0 || y > 510) return false; //because of +1s, use 510 as bound rather than 511. People won't see those tiles at near view anyways.
if (m_TerrainTypeColorData[y * 512 + x] == new Color(0x0C, 0, 255)) return false; //if on water, not buildable
//gets max and min elevation of the 4 verts of this tile, and compares them against a threshold. This threshold should be EXACTLY THE SAME ON THE SERVER!
//This is so that the game and the server have the same ideas on what is buildable and what is not.
int max = Math.Max(m_ElevationData[(y*512+x)*4], Math.Max(m_ElevationData[(y*512+x+1)*4], Math.Max(m_ElevationData[((y+1)*512+x+1)*4], m_ElevationData[((y+1)*512+x)*4])));
int min = Math.Min(m_ElevationData[(y*512+x)*4], Math.Min(m_ElevationData[(y*512+x+1)*4], Math.Min(m_ElevationData[((y+1)*512+x+1)*4], m_ElevationData[((y+1)*512+x)*4])));
return (max-min < 10); //10 is the threshold for now
}
First step in the final step of enabling lot buying will be to throw this onto the server!