parkm / oldbpm

A JavaScript game where you shoot at bubbles.
0 stars 1 forks source link

Faster Collision Testing #25

Closed parkm closed 10 years ago

parkm commented 10 years ago

Instead of looping through every single object in state we should try and divide them based on id or something else.

So if we have bubbles and they check for a pin collision it'd be much faster to loop over just the pins in the state. So we should maybe use a hash map for objects or just keep track of pins separately for level states.

dgpt commented 10 years ago

We can also explore memoization and caching as well.