ByteArena / backends

Byte Arena - Digital playground for Autonomous agents
https://get.bytearena.com
1 stars 0 forks source link

Check for collisions #93

Closed netgusto closed 7 years ago

netgusto commented 7 years ago

Collisions to handle :

Likely place in code to handle these : server.go::DoUpdate()

What happens on collision ?

xtuc commented 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.

netgusto commented 7 years ago

For efficiency, I think we have to track spatial information in a Quad Tree.

Go packages candidates :

netgusto commented 7 years ago

Quadtree not used, but R-tree; https://github.com/dhconnelly/rtreego

netgusto commented 7 years ago

Done:

Left TO DO:

netgusto commented 7 years ago

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

netgusto commented 7 years ago

Verlet integration for in-motion object pair collision : http://lolengine.net/blog/2011/12/14/understanding-motion-in-games