• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

General question about collision systems

W

WoNkY

Guest
So far my game is running event collisions to rectangle masks. Starting to throw in a few more enemies and about to do first power ups.

Should I be replacing the collision system now?. I'm guessing those 70fps checks will start to hit the fps as I throw more stuff in. I've seen there is system by Spalding commonly used, but haven't looked at the code.

Any advice welcome.
 

TsukaYuriko

☄️
Forum Staff
Moderator
Consider roughly how many collisions your game will max out at. If you're coming up with a figure that can reach thousands of instances checking for collisions with each other, you may want to research something like a quad tree collision system.
 

Yal

🐧 *penguin noises*
GMC Elder
If your game starts lagging on the lowest-spec PC you want to support, you should look into improving the code. You can use the debugger's profiling tool to see what the most inefficient parts of your code (e.g. what eats the most CPU time) is, it includes builtin stuff like collision events too. But don't optimize stuff until you KNOW they're actually a problem, it's a great way to do the same work twice :p
 
Top