Comments (2)
I created a new example for many-to-many checks
https://timohausmann.de/quadtree.js/many.html
from quadtree-js.
This way we only loop through the players once and each one is checked against all bullets and the previous players already inserted so all player to player checks are covered.
From my understanding this wont check all players against each other but only - like you say, too - against previously inserted. So e.g. the first loop execution won't have any player in the Quadtree. I'm afraid you need two loops, one for inserting and one retrieving, and test the retrieved IDs to prevent self-collision.
Haven't thought about many-to-many yet and I cannot say if this is the best method. Let me know if this works for you or not.
from quadtree-js.
Related Issues (18)
- Insert / Retrieve seems to be wrong HOT 3
- how to build quadtree? HOT 2
- Rounding sub quad bounds HOT 1
- update elements? HOT 3
- TypeError: t is Undefined HOT 4
- Adding support for more primitives checks HOT 9
- retrieving node from object HOT 2
- Adding a licence file HOT 1
- It just doesn't work? HOT 3
- is the width and height from the center or from a corner? HOT 3
- The Problem of Continuously Inserting Large Area Rectangles HOT 1
- Modify and remove objects from quad-tree HOT 3
- Infinite loop issue HOT 5
- hello,i'm chinese,My English is very terrible.I want to how to use this quadtreejs in nodejs HOT 2
- retrieval of object out side the node HOT 6
- This visualization looks good, but there are too many objects on parent node HOT 3
- Quad Tree should only store objects on leaf nodes HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quadtree-js.