Mike Chambers

code = joy

Archive for the ‘quadtree’ tag

JavaScript QuadTree Implementation

with 11 comments

Last week I was playing around with a little EaselJS experiment which required me to do collision detection against all items on the screen. This worked fine with a small number of items, but of course, the more items I added, the slower everything became.

I knew that I needed to optimize the code, and pare down the number of collision checks. I have done this before with a grid (even held a contest for it) and was going to port that AS3 code to JavaScript. However, Ralph Hauwert suggested I look at implemented a QuadTree, which should be more efficient.
Read the rest of this entry »

Written by mikechambers

March 21st, 2011 at 9:24 am

Follow

Get every new post on this blog delivered to your Inbox.

Join other followers: