Commit Graph

2 Commits (61af068b8020edf56ee76e88c8f6b9de0f40666c)

Author SHA1 Message Date
Noah 61af068b80 Load Balance Collision and Actor Loop Across CPU Cores
* Add sync.WaitGroup to some parts of the level collision detection
  function and Canvas.Loop() to speed up the frame rate by load
  balancing some work in parallel across multiple cores.
* Improves FPS from 30 to 55+ even for busy scenes with lots of mobile
  enemies walking around.
* Before the level collision optimization, framerate would sometimes dip
  to 30 FPS simply to move the player character on a completely blank
  map!
2019-05-06 17:06:40 -07:00
Noah f8a83cbad9 Detect Collision Between Actors
* Move all collision code into the pkg/collision package.
  * pkg/doodads/collision.go -> pkg/collision/collide_level.go
  * pkg/doodads/collide_actors.go for new Actor collide support
* Add initial collision detection code between actors in Play Mode.
2019-04-15 19:17:25 -07:00