Tuesday, July 7, 2009

Tiled Mesh Progress



Looks like the tiled mesh is getting quite a bit more complicated than the regular static one. Especially the polygon Ids a getting a bit tricky. I'm using salty-handles to reference the polygons so the system is able to delete a tile and the user will then need to react to that when using the data. I general I prefer this method as it does not kill the cache with random callbacks when something changes.

So far I have implemented dynamic tile generation, tile stitching and polygon queries. In the demo the user can create, delete and recreate tiles of navmesh by clicking around the level and then use the usual tools to find path or locate nearest polygons.

There are a bit too much indirection in the data when following the neighbour polygons. The code currently accesses first the 'from' polygon then a portal, then another portal and then the 'to' polygon. By some clever misuse of the salt-handles I might be able to leave the portal out of the equation completely. One thing that will cause indirect accesses is that when following a salty-handle, I need to check if the tile where the handle points to exists. Well, once I get the first implementation ready it is start to fire some profiler.

I try to get a rough version into SVN as soon as possible, so I can start to polish it and finally make a release.

No comments:

Post a Comment