RTS unit handling

Posts: 1,487
Joined: 2002.09
Post: #16
DoG Wrote:That hashing algorithm claims O(n), which would be fantastic, but I can't quite believe it. Has anybody got a simple explanation of that claim? As far as I read so far, I didn't really get it.

Probably because with the spatial hashing, you are only comparing the object against other objects in the same cells. Where as with trees you are comparing them against everything that has a common tree path. That seems like it would be a slightly tighter bound to me.

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Posts: 916
Joined: 2002.10
Post: #17
Microbian: Fighter (far from a a RTS, I know(I hear I will release it one year)), uses a very bizarre quad tree with a constantly moving pivot point. While on the one hand I had to rebuild the tree every frame, it brought about a 5-6x speed increase in collision handling.

I'm definitely interested in this spatial hashing and wonder how much speed increase it could bring. If it is as nice as it sound, that means I can have EVEN MORE objects in my universe, BWAHAHAHAHAHAHA! Ninja

(for those that don't know, my games are prone to "zomg that's a lot" syndrome. I love massive amounts of things happening at one time)
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  CB Key handling skyhawk 6 5,010 Aug 12, 2003 10:13 AM
Last Post: kelvin