Another issue we have left out since years are those Z-Coordinate calculations. Somewhere on the forum and on our old Wiki I have posted how it is possible to calculate the Z-Coordinates of land and water of overland maps based on the PCX images inside the packed client data. It is not very complicated at all...
The question now is, how can we use this data inside DOL most effektively?
The raw Z Data as far as I remember can be stored as unsigned short (0-65535). If we store this data for each overland zone for both land and water it will sum up to: 256 * 256 * 2 * 2 = 262144bytes for EACH Zone. In my old TOA version we have around 82 overland zones ... resulting in
21.495.808bytes of raw Z data!
Well, this might not seem too huge to be held in memory for fast access, however it is much too big to be shipped with DOL on each release. I think this data can be compressed quite well and it should lead to something below 5MB of Data when compressed.
We could provide an additional Download for DOL with this Z-Data file (since it only changes when a zone changes or a new expansion comes out) which should be quite rarely.
Or we could provide a small utility which can take in a DAOC client's zone directory and generate the Z data file on the fly. I have written such a tool some time ago (just need to find it again...) that did exactly this.
Or we could build this into the server itself and make it possible for the server to fetch the zone-data from a client at runtime or at startup (generation of the Z-Data takes around 10 seconds as far as I remember)
And if it is installed in DOL it could allow the server to use a CalculateLandZ(x,y) and CalculateWaterZ(x,y) for each arbitary point in the landscape. This would also enable the server to detect "flying" characters as well as characters that use a map-hack to travel beneath the surface...
Well, if you have other thoughts about how we could compress the stream inside memory and still have somewhat fast access then please shout out aloud
For Dungeon and Buildings it is more complicated. We need to define fixed Pathpoints inside buildings and connections between those pathpoints. You can imagine it as sort of a grid being laid onto walkable places in dungeons and buildings.
Whenever a mob is near a pathpoint and his target is also near a pathpoint the mob will follow the route from pathpoint to pathpoint until he meets the pathpoint closest to his target. There he can leave the path and walk directly. This works in overland-building combination too, especially good if buildings are surrounded by a small circle of pathpoints.
Imagine this: A guard is at the top of a tower, a player is standing outside the keep. The closest pathpoint of the guard is where he is standing right now, the closest pathpoint to reach the player is a pathpoint right outside the keep wall. So, the guard will walk down the stairs, walk outside the keep door, walk around the keep (not through walls) and reach the pathpoint close to the player. He will leave the pathpoints there and head straight for the player using the overland Z coordinates... After killing the player he wants to go back to the tower, so he walks to the closest pathpoint which is somewhere around the base of the keep, walk along the path, throught the front-door, up the stairs and back to his tower position.
Sounds nice no?
Well the bad news is that I can not think of a real possibility to generate those pathpoints automatically since this would require reading the NIF files and a lot of surface calculations (eg. which point can be reached from which point).
So the only possibility is to manually define those pathpoints. Theoretically you could do this simply by making a custom script command eg. like our horse-route commands. However since pathpoints need to be interconnected and often one point needs to be connected to several other pathpoints this can get tricky... I have not come up with a solution on how to visualize those interconnections between points ingame really. If you have an idea, shout out here
Well thats it, just a small rumbling of me again. Not that I have time to spare, but just thought we should not forget this issue completely