Closed netgusto closed 7 years ago
In the real world, collision on a wall is just a brutal velocity reduction (and some damages but ignoring for now). I would use the same behavior.
For efficiency, I think we have to track spatial information in a Quad Tree.
Go packages candidates :
Quadtree not used, but R-tree; https://github.com/dhconnelly/rtreego
Done:
Left TO DO:
In the real world, collision on a wall is just a brutal velocity reduction
Yes, see https://gamedev.stackexchange.com/questions/32611/what-is-the-best-way-to-handle-simultaneous-collisions-in-a-physics-engine for how to handle it nicely
Verlet integration for in-motion object pair collision : http://lolengine.net/blog/2011/12/14/understanding-motion-in-games
Collisions to handle :
Likely place in code to handle these :
server.go::DoUpdate()
What happens on collision ?