Game Development Community

Reducing the size of a dif's BSP tree

by Jim McCann · in Torque Game Engine · 06/21/2006 (7:20 pm) · 0 replies

I've been attempting to get a rather massive dif to work in torque, but I've run into a most horrid problem:

The high bit of a bsp node's 16-bit index is used as a flag. No warnings are issued when difs containing bsp's of more than 2^15 nodes are loaded -- though, inevitably, a traversal will wander into the high index nodes and mistake one for a leaf. This almost certainly means that (e.g.) scanZone_r will return an invalid zone index, leading to a crash.

Any reccomendations as to what I can do to avoid this problem? (I don't think that rewriting the bsp code to use larger indicies is the way to go, both because of the inevitable performance hit and because it isn't the sort of code I really want to monkey with too much.)

My thoughts:
1) Zoning. Will zoning the level reduce bsp cuts (I somewhat doubt, but I figured I'd ask)?
2) Split up the source map into smaller chunks and create seperate difs. (Is this a 'good idea'? Will there be collision problems along the seams?)

--Jim