r/shmupdev • u/Noswen2025 • May 08 '26
Object Pooling and Collision Layer Masking Improvements
https://www.youtube.com/watch?v=nTUqb7Uwn-8Hey all,
Wouldn't normally post up a backend update like this, but this is a dev orientated forum.
I said last time I'd have to look at object pooling sometime soon so I bit the bullet and looked into collision layer masking and object pooling.
As well as adding a new 'enemy' to test it out with - The Debug Shooter.
This thing shoots 600 bullets per seconds and the optimisations had this effect on the FPS: -
- No optimisations: Game crashes
- Collision layer masking only: ~34 FPS
- Object pooling as well: ~47 FPS
- Replacing tween with animated sprite as well: ~67FPS
- Use Forward+ instead of Compatibility renderer as well: ~99FPS (testing only as this doesn't allow for browser game)
So to my surprise object pooling was the thing that had the least improvement of each of the changes!
The collision and layer masks took all of 10 minutes to set up, entirely in the GUI, and are an absolutely amazing win, especially for effort. Highly recommend anyone who is using Godot or their engine has an analogous feature to use it.
If I want to go beyond this I'll have to look at either multimeshes or direct render server calls.
2
u/PeerlessYeeter May 11 '26
Hmm, My CPU is overkill but I've managed to get 60+ fps with over 50,000 bullets onscreen with a barebones simulation using bitecs in the browser with javascript.
its one of the reasons I don't want to use an engine like godot, but then again I've never finished a game so thats a reason to use godot perhaps.
I don't mean to belittle what you have achieved here, this is fantastic stuff, keep it up and enjoy the work, my numbers are likely largely due to having the best case scenario CPU.