Farfromhomefish
Wanderer
UO Client programming: 'order' of drawing map, statics, mobiles
I'm working on a UO client - not anything I'd ever release, more sort of a personal hobby project. So far, I have map0 displaying, with the appropriate textured 3d landscape and all the statics, and the client runs around as a naked dude with a diablo2 style of movement (the 'smooth' movement style is only clientside).
However, I don't have the tileengine set up to draw things in layers. Right now, the client iterates through each tile visible on screen, and draws that tile in its entirety (starting with the map tile, then drawing the statics and mobiles in order, bottom to top), then moves on to the next tile.
Here's my question: how should a UO client draw the tiles on screen? Obviously drawing a tile-at-a-time isn't ideal, as this leads to graphical artifacts. One alternative would be to draw the map by altitude layer... so first I would draw everything at an altitude of -128, then -127, then -126... up to +127. But iterating 256 times through the draw loop would take a tremendous amount of resources, so obviously this isn't an ideal solution. Right now, my client runs at ~80 fps in the middle of a 3-story building filled with statics, on a 800mhz computer. I'd like to keep it that speedy. =)
Could someone point me in the right direction as to drawing order? Does anyone know how other third-party clients handle this?
I'm working on a UO client - not anything I'd ever release, more sort of a personal hobby project. So far, I have map0 displaying, with the appropriate textured 3d landscape and all the statics, and the client runs around as a naked dude with a diablo2 style of movement (the 'smooth' movement style is only clientside).
However, I don't have the tileengine set up to draw things in layers. Right now, the client iterates through each tile visible on screen, and draws that tile in its entirety (starting with the map tile, then drawing the statics and mobiles in order, bottom to top), then moves on to the next tile.
Here's my question: how should a UO client draw the tiles on screen? Obviously drawing a tile-at-a-time isn't ideal, as this leads to graphical artifacts. One alternative would be to draw the map by altitude layer... so first I would draw everything at an altitude of -128, then -127, then -126... up to +127. But iterating 256 times through the draw loop would take a tremendous amount of resources, so obviously this isn't an ideal solution. Right now, my client runs at ~80 fps in the middle of a 3-story building filled with statics, on a 800mhz computer. I'd like to keep it that speedy. =)
Could someone point me in the right direction as to drawing order? Does anyone know how other third-party clients handle this?