Skip to content
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

Hit Detection Optimizations #181

Open
alujs opened this issue Jan 20, 2014 · 1 comment
Open

Hit Detection Optimizations #181

alujs opened this issue Jan 20, 2014 · 1 comment

Comments

@alujs
Copy link
Contributor

alujs commented Jan 20, 2014

Problem: Each bullet inserts itself into the update cycle which causes the system to bog down when many shots are fired. Furthermore, we have heavier client load due to occulus rift and newer features such as bots / AI logic. This issue is no longer an optimization but a necessity.

Solutions proposed:

  1. Do the right thing - use spatial calculations to tag things that could possibly be hit and check against those rather than every object in the game. R-trees/Quad-trees + ray casting is the preferred way.

  2. Use a single bullet rather double shot .

  3. Use phasors/lasers/instant or near instant hit weapons - give it an offset to help with detection.

@lazd
Copy link
Contributor

lazd commented Aug 24, 2014

This is fixed in Satellite-Mobile by using Cannon.js. You can fire the shit out of bullets and it's still ~50FPS on a 3rd generation iPad under iOS 8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants