battlecode / battlecode-server-2017

Official Battlecode game engine.
http://www.battlecode.org/
GNU Affero General Public License v3.0
23 stars 10 forks source link

Use JSI as a spatial index in ObjectInfo #268

Closed nmccoy closed 7 years ago

nmccoy commented 7 years ago

It seems like there should be a more efficient solution than giant arrays of HashSets and Integer autoboxing, but it currently works.

kazimuth commented 7 years ago

I've been doing a bit of profiling, and ObjectInfo queries are currently taking up approx. 90% of our runtime. This can vastly improve our performance.

kazimuth commented 7 years ago

See https://0fps.net/2015/01/23/collision-detection-part-3-benchmarks/ for some information on collision detection... in javascript, but it might give us some pointers. See also: http://www.dyn4j.org/ http://www.jbox2d.org/

kazimuth commented 7 years ago

https://github.com/aled/jsi Is what we want, we should integrate it.