Projectile sprites stay counted as sprites after lifespan ends

hey!!! hello!!! hi!!!

i’m making a vampire survivors clone themed around soggy cat. in playtesting, i noticed that after a few minutes, the game lagged like crazy. looked into it more, and found out it was because of the projectiles you shoot.

they keep counting as sprites after their lifespan is up. why does this happen, and how do i fix it?

link to game (i removed enemy spawns temporarily)
remember to turn on sprite counter

3 Likes

Set the projectile’s auto destroy flag to true when you create it.

3 Likes

oh thanks, i didnt know what that did. i thought it would destroy when lifespan was up

2 Likes