I was playing around with simple collision checks and performance. When i came across following strange thing:
I had 800x500 window size with 1250x1250 layout size. I had 1 player sprite, bullet and around 200 wall sprite. I spawned bullets while a mouse button was down and checked bullet overlapping with wall sprites to destroy them. I had CPU usage up to 60%+ and a lot collison checks.
But then i made window size 50x50, set layout scale 0.05. And did exact same thing i had almost 2-3 times better performance. So is there built in collision check range, which == window size . But is there anyway to set same collision check range/grid manually without setting small window size or adding events, as it seems to work nicely? Could not find any post about this.
Develop games in your browser. Powerful, performant & highly capable.
You're talking about collision cells. Here's the blog post Ashley did when he introduced this feature.
https://www.scirra.com/blog/ashley/6/co ... on-in-r155
However, I'm not sure if there is any reliable way to manipulate the collision cells.