drhayes / burrowdefender

A game prototype in which you play a bunny that can dig and build.
MIT License
1 stars 0 forks source link

Add eventer to mob and make it fire events about moving #2

Closed drhayes closed 14 years ago

drhayes commented 14 years ago

This way the spatial hash can subscribe to those events and remove the mob if necessary when it crosses bucket boundaries.

This could potentially really suck: if the mob doesn't change buckets, we'll be removing and adding it all the time as it moves. Might want to add caching to the mob from the spatial hash, maybe a list of keys that the mob is in right now so if it is still in one of those buckets it's a no-op.

drhayes commented 14 years ago

Nope, don't really need this.