Well if you have any tips on possibly making it faster I'd appreciate it. But I honestly would really like to get access to the collision cell optimization in scripting and SDK.
construct23.ideas.aha.io/ideas/C23-I-221
construct23.ideas.aha.io/ideas/C23-I-408
Or perhaps even a construct official quadtree implementation written by someone with more knowledge than me. I've talked with Federico a bit and he speculated a directly integrated quadtree would probably already be faster than getting instances through the runtime.
construct23.ideas.aha.io/ideas/C23-I-433
I can see the argument for it, especially since the massive success vampire survivors had, which is btw. also written in javascript. Spawns a lot of copycats of course, and I have yet to see a solution in C3 that doesn't slow my high-end PC to a crawl at 200ish instances even with nothing else happening. I would even think the current collision cells will not suffice for these type of games, considering a cell is the size of the entire screen.
FWIW collision cells are not actually applicable to testOverlap(): the point is to eliminate even checking instances, so it is basically a filtering system that efficiently reduces the set of instances that you might call testOverlap() on. So it is not possible to implement collision cells within the testOverlap() method itself, it's something that has to come before it.
Oh I'm aware of that, I just kinda worded it wrong.