I think I have come up with a way to increase performance with collision checks, but need some help to implement it OR if it works only by checking all instances simultaneouly, I would like to know that as well anyway.
So, what I want to acheive is, check collisions per instance (unit/object) against all other map objects/instances but, add a specified time (variable) between checking collisons for each instance.
For example: tick 1; instance 1 checks for collisions. tick 2; instance 2 checks for collsions. tick 3; instance 3 checks for collisions.. reapeat X amount of times, X = amount of instances on map. Currently I beleive the collision checks happen for all instances per tick or per X seconds (if set).
Once the above is implemented, I'll then add this: If the amount of instances is greater than (variable) OR alternatively the total time required to check for collsions (variable) has passed variable amount, then add next instance to tick 1/first collision check.
For example: instance no. 25 is set to check on tick 25, however, instance 26 is then set to check on tick 1, repeat until no more new instances are available to check.
Currently the amount of instances on the map (> 400) reduces fps considerably, I hope to get it up to 2000.