i just noticed that my game is going very slow, and I think it’s because of the amount of sprites in it. Can someone tell me what can I do to improve the FPS?
Thanks!
Game if you need it
To see if it’s the sprite count giving you trouble, turn on stats.
- While your game is running, select Menu.
- From the pause menu, move to Show Stats. Press A.
- Move to Close (the big red X). Press A again.
- You’ll see both a FPS and a sprite counter on the screen.
I’ve let your game run for a little bit without any obvious sprite overload, but I haven’t played it for very long. Keep us posted and let us know if you’re still having difficulties.
well after I place down a certain amount it starts to lag maybe make a limit?
One idea that comes to mind is when 2 Projectiles overlap Make one deleate then change the damage value of it so i still acts as 2? it would be small but it could work
another is the peashooters checking if there is somthing in there lane im not sure what the code looks like for that but if you made it so the whole lane was checked at once insted of each plant it could also remove some lag it wouldnt fix the spirte count but im not sure what could