Thereby I’m shooting’em’up

2014 06 08

Shooting. Working on bullets, dots, collisions, optimization, and fighting some bugs of course…

Advertisements

Obviously

2014 06 03 b

I’ve got a 8x8x8 dots cube. My ship can hold 128 bullets flying to this target. That’s already 8^3 x 128 = 65,536 possibilities for collision detection.

Let’s imagine 8 cubes/enemies and, let’s say 64 players.
8 x 8^3 x 128 x 64 = 33,554,432… per frame.

x60 FPS we reach 2,013,265,920 raw collisions cases per second in this simple example. I shall take a little time now to build, and optimize a clever collision system, since even with common solutions it would drain too much CPU time.

edit: yep, for curiosity satisfaction I have tested a “raw collision test” without further optimization. Using 2014’s CPU that’s instantly a drop to a 2 FPS result. I would have predicted worse. But that’s still unusable.