problems with mutiples bullets

I’m making a shooting game on gdevelop and I have a big problem that has no solution for me, when a bullet collides with an object, the bullet is destroyed, but when there are too many bullets, the game engine simply does not process the collision and the bullet simply
cross the object as if it didn’t exist!

I did for each instance of the bullet object and established these conditions: “if the distance between the bullet and the object is below 10 pixels, delete the bullet” and I used “if the Bullet collides with the object, delete the bullet” and It doesn’t work anyway when there are a lot of bullets in the scene, I tried doing both conditions together, then I tested each one separately and neither worked.

I saw an example of a project called: Sordid Doll (Fire bullet) that uses the same action requirements that I am using in my project and in this project it works, I don’t know if the creator of this project configured the memories or the CPU to be able to do this.
I noticed that when there are many objects on the screen in this project the frame rate drops a lot, but in my project there is no frame drop, just collisions being ignored.

Sordid Doll (Fire bullet):

My project:

If anyone helps me I will be very grateful :slight_smile:

Hi, here is a topic that shows a solution. There are more discussions with similar suggestions in the forum.

Basically you set your collision as the main condition and the ‘for each’-block as a sub-event to make sure that all your bullets are properly registered.

Your event cannot work because you are checking distance and collision between your objects at the same time. All conditions in an event-block have to be true to trigger the actions (unless you are using an OR-condition), but in your block only one of the conditions can be true (it will be the distance condition).
You have also added a ‘Trigger once’-condition in the ‘for each’-block. This is not working as you probably think (in the working example you have given above there is also no Trigger once - condition).