Silverforce wrote:Each bullet has to check against enemies, each enemy has a separate left & right shield which when depleted, the collision is ignored and checks if it collides with the hull afterwards. Drones also check for collision to enable/disable some movement.
Colludium wrote:@Silverforce - I had about the same - the On-Collision has a massive and surprising overhead to it. I would certainly use Overlap / Trigger Once if the situation allows; however, if you need to know whenever a collision happens to a new object, while another similar object is overlapping, the On Collision trigger seems to be the simple way to go (although I'm sure that you could use Overlap with an array for a much better result in situations like this). I'm pretty sure that Ashley said in another thread that the two methods in that example are essentially identical - but that clearly isn't the case!
TiAm wrote:FYI to everyone: debug readings are not to be trusted. If you really want to run comparisons, make a spritefont readout and populate it with fps/cpu/objCount/etc.
Anyway: When I experimented with this back a few months ago, my impression was that 'on collision' and 'is overlapping' tended to be similar to each other vis-a-vis CPU usage. However, when pushed really hard (bullet hell shooter with thousands of bullets), 'is overlapping' had pretty consistent performance, whereas 'on collision' seemed to cause more instances of stutter and slowdown, even if the average CPU/FPS was the same.
Users browsing this forum: No registered users and 6 guests