I don’t think creating and deleting objects itself would causing such a serious pauses. On my PC I can create and delete thousand of objects in GDevelop without any problem. As I have mentioned, I do experience serious pauses even if I do nothing but walking left and right. Seems to me, it pauses when the enemies are moving and colliding.
It definitely something wrong with the way you handle enemies, because when I run the preview I can see enemies on the bottom of the screen trying to move in to the screen to the player. Maybe you should redesign the way you handle the enemies because it doesn’t seems right.
But also, because I don’t experience pauses in preview, it could be a problem with the way GDevelop is compiling the project.
To find the problem, break your project in to pieces, and put them back together piece by piece and see when you experience the pauses.
The other thing you can do is to make sure you are using the Triggeronce condition and sub events to make sure things are running only when it needed. Sub event are there not only to make events nice and tidy, but also to make sure certain events are triggered only if the main ones are true. This way your project not using resources unnecessarily and require less resources to run
Also, pixel perfect collision is resource hungry, if not necessary don’t use it, instead use collision shapes.
If you don’t want to delete the VFX1, you should redesign from scratch the way you control VFX1, because whatever I’m try to do, if I don’t delete the VFX1 it causing all kind of problems, such as the electric power appears even if the power switch is on something else, or the VFX just hangs in the middle of the air it not disappear or stop playing it animation…
Something, somewhere just keep screw up the animations of the VFX1.
I suggest to do something like this:
Unfortunately I don’t have time to look through your project line by line to see how things are connected and what effecting what, maybe somebody else will but the only thing I can recommend is to start from scratch.
From my experience, if you find a bug and you don’t know how to solve it, probably even you don’t understand how things works, because you don’t, otherwise you would know where the problem would be and how to solve it, simple as that.
So, if even you don’t understand what’s going on, it always better to delete everything and start from scratch.