-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement quadtrees for general use in game engine #358
Comments
Hey, I'm a new member looking to be an Archmage and this looks like a fun project. Is anyone already working on this? |
Nope! Want to take a crack at it? It would actually be really amazing to have soon, as we're limited in the levels we can build by the current implementations. |
Update: Unfortunately my school life has suddenly gotten very busy so I won't be able to contribute very much. I'm currently working off this example: http://www.mikechambers.com/blog/2011/03/21/javascript-quadtree-implementation/ |
That's understandable–school can take a lot of life force. If you can post any progress you do make, it'll be helpful. |
I'll look into this issue this weekend and see what I can do. Already heard couple of times about quadtrees, though never actually had a chance to implement it. |
That's what I've worked out about quadtree:
I've read 3 implementations and got the drift, going to write some code! |
@ItsLastDay Let me know if you make any progress on the quadtrees. Are you working on it in GitHub somewhere? |
@nwinter Currently I have only a concept of how I want to implement it, but later I'll do that on GitHub. |
This is now a student project for http://cdl.rosedu.org/ |
Here are some steps I'd take when doing this one:
|
We're running some O(m*n) algorithm performance bottlenecks where we have to compare all Thangs of one type against all Thangs of another type which may be nearby, and doing that with two arrays of Thangs isn't efficient since we're ignoring distance information. It gets even worse when we have to recalculate distances for each comparison, and when we need to include line of sight, then we're doing raycasting, and raycasting is terrifically slow. Good examples include determining whether Collectors can collect Collectables and which friends and enemies a Thang can see and hear.
It would be better to have a general quadtree implementation we could put Thangs in so that various Systems could perform faster. Quadtrees are a form of binary space partitioning and I'm sure many JS or even CoffeeScript implementations exist that we could adapt to our Thangs.
The text was updated successfully, but these errors were encountered: