Compiled game taking pauses

Now I have made a small sample file of my main game file. It’s kind of a demo. Now I want you to check for two problems. 1 take one or two diamonds in electric and fire power mode and select fire power mode and throw flame by pressing O+J and use all the fire power and still hold it for a while even when all the fire power is used. and then switch to electric power by using “1” or “q” and use electric power by O+J and you will notice no vfx appears but the power is used and also if the enemy is near they act like they are colliding with the vfx object.
2. second problem is that when you take few diamonds and punch J or K or U or if you make move by S+O+K (have to collect some diamonds) or specially if you make the finishing move by S+O+U, In a compiled game you will notice that game take huge pause. I don’t know Why it is taking huge pauses.
Here is the link to the Gdevelop file and assets file … s.rar?dl=0

put all the assets in assets folder (create it), where you are keeping bug file.

I don’t know exactly what is the problem, only guessing.
By looking at your project seems like the thief is “flying away” when it dead and it become dead when it health is <=0 and it health decreasing when it colliding with the VFX. But I can’t find it how and when do you hide or delete the VFX Object when it not used or out of charge and you check only collision between the VFX and the thief.
So my guess is, the VFX is still there even though it not visible and the thief is still colliding with it.

My suggestion is, make sure when the thief is colliding with the VFX, to get damage, the VFX also must be visible, must be active must be playing the animation that is actually you want to cause damage to the thief not only collision.

Also the VFX is recharging even though no crystals is picked up, and cause damage to thief as soon as it got a little charge.
Maybe the VFX got not enough charge to play the full animation, but it still active as it got a little bit of charge and that could be also a reason why it causing damage even though it not visible.
My suggestion is, before the VFX able to cause damage, make sure it charged at least 20-30%.

I have experienced huge pauses even if I was doing nothing but walk around :confused:
To be honest I don’t know what is causing this problem, I have also experienced such problem my self but it a myth to me, maybe 4ian and Victor should take a look at this project. It also load in to the editor and compile really slow :confused:
One time even caused GDevelop to freeze.

The only suggestion I can give you is to always need to make sure you don’t use unnecessary variables all over the place, and trigger every single condition and action only when it needed and as many times as many times needed but such pauses always happens, so I think it would be worth a look in to this by the devs.

There is no such problem as you are describing. the only problem is when you use all fire power and switch to electric power and try to use it… well just do it you will know the problem. 2 is that the compiled game is taking pauses. put all the assets in assets folder where you are keeping the bug file.

What I’m saying is this:

You checking only collision between the VFX and Thief and this could be a problem since I can’t find the events that is used to delete the VFX when it is not used. If you don’t delete the VFX from the scene, it could be a problem the way I have described. But really, it hard to tell, in the future you should use more comments in your project so it easier to see how it works.

And regarding the other problem, As soon as the project start, just hold O+J and VFX causing damage to thief time to time even though it almost empty and it is recharging slowly without crystals but again, it hard to tell without any explanation and comments how everything supposed to work. :laughing:

So what I’m saying is, the bug we are experiencing, could be because of the combination of these two things:
-checking only collision between VFX and Thief to cause damage to Thief
-VFX able to cause damage even if it got only a very little charge

Leave it man. I have designed the event, I know what I am doing, it is perfect. This is no such problem (You checking only collision between the VFX and Thief and this could be a problem since I can’t find the events that is used to delete the VFX when it is not used) it is perfect. problem is when i use fire power all of it by pressing O+J and switch to electric power and press O+J the animation is invisible why is that so!!! the vfx is invisible even if i press O+J unless I shift to other powers like air or ice, that is the problem…

(recharging slowly without crystals) perfectly fine this is what I want (unless I feel, that he become unbeatable by this)

Take it easy, man, he is trying to help you, and your manners are wrong from the beginning:

This was not a way to ask for help, come on. And this is not a way to answer to somebody who take the time to check your project, which is not a small example to say something :slight_smile:
I want to note too that, since something is wrong with your project and you are asking for help, be so sure that this or that is perfect is not a good answer, since you don’t explain him why there is not such problem. Again, your project is huge, so don’t expect everybody will know how it works :wink:
And please, stop about using so many exclamation marks, I hope you don’t mean you are yelling :confused:

No worries, I was misunderstand what is the problem :smiling_imp:
I though he is talking about the VFX causing damage even if it not visible but he was talking about the VFX is not visible when it causing damage :stuck_out_tongue:

This piece of event is in relation with the problem:

Whatever I was trying to do with this, even if I have solved the problem with the Electric Power, it was causing problems somewhere else with the other powers.

Finally, I decided to force the VFX to be deleted if no power is used and create VFX if power is used and make sure to set the animation to Electric power if the power switcher is on electric power:

Seems like it works, but since I have not changed or removed any of the original events to keep everything else (sort of) functioning, it would surprise me if this solution is not breaking anything, but it works as far as I can tell.

Good luck.

First of all i don’t yell and M not rude, at least not to CG friends, except for that one time, that was embarrassing. Problem is when people meet me in real life, they don’t feel like M rude, and I though it was this girl, who I used to text, who thinks that I am rude on text, and I used to ask her how you can read expressions and yelling in the texts. Well I guess she is not the only one. and Why I am not preferring deleting because all the other VFX that are created and are deleted, seems to me, are basically causing the pausing problem. Because any move (even small ones) that create vfx objects are making the game pause for some while. And if the pausing problem is solved I will leave this issue, maybe.

Ok, I just wanted to note some things I found out of place, so no problems? :slight_smile:

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.