Apply Force performance Issue

I can’t reproduce too, it’s very fluid on my pc.

The PlayerHitBox object use forces and platformer behaviors, if you can try to choose one of them not both if possible.
But I’ve seen a strange thing, everywhere is used PlayerHitBox, and all forces are applied on it, except once, you add a force directly on Juliette01.

Why here specially? You add a force on the sprite, instead to add forces on the PlayerHitBox like usual.

This wiki page can learn you some tip and tricks for optimize a bit more the game.

heey, i didnt notice that. thanks, i’ll fix it.

and @Gruk, about the glitch, its gone from my preview as well, on my pc it runs butter smooth, but in some yourube videos its still not working, and it keeps happening on my Asus Zenfone 5, Redmi note 8, Redmi note 9, Samsung A01.

And the game doenst even run on LGK10 and Samsung galaxy J7

thats my older game that has the same problem

I can’t download that one, no compatible device. Is that one HD resolution as well?

Do you get the issue in network preview and in the default Web export?
Also, you could try setting a higher minimum frame rate, check if there’s any change.

I’m still noticing the issue. That’s so frustrating. I triple checked my code, changed every misplaced thing. Followed all the tips you guys gave me. There is something wrong with apply force. Definitely

I understand the frustration. :confused:
Unfortunately, unless we can reproduce on our side…we’re kinda stuck.

Also, did you try a minimum frame rate of 60? or a max of 30?

PxiJS has been upgraded in the latest GDevelop release. Who knows if it might help? :slight_smile:

You should also try this build: https://www.dropbox.com/s/gxymf3zfs6njo7n/gdevelop-plateformer-fix-2021-04-25.7z?dl=1
It seems it fixes some weird conflict of forces. It might help.

thanks man, gonna try right now

This build is nightly or something else?

didnt notice any changes @Gruk the issue is still happening. Its really some kind of rendering lag

I think this is Davy’s build trying to fix some oddities in Platformer behaviors.

1 Like

Oh, only the main character is plat character. And the walls are platforms (turned into jumpthru when immunity gauge is full)

Enemies are just sprite objects with apply force.

The issue happens in the credits too. It’s less noticeable but it happens. And there’s almost no event on credits.

You can still change force action by simple position action.
Only where you didn’t use trigger once.

image

For example

Change to

thanks! gonna try this with the credits, and also with the enemies. lets hope it works

1 Like

Well, it didn’t. There’s still something very wrong and I can’t find what it is. I don’t know how forces work, but if I had the same problem with this position*timedelta alternative, its more like a rendering problem than a applyforce problem.

I cracked my head and coudn’t find another way to fix the issues. I’m almost 1 million downloads, so theres a lot of people with lower spec cellphones having this issue very often. That kinda sucks, I never had this problem with games that are not infinite runners.

Just wandering why don’t you just add a Tween behavior to the credits Object then just use
Tween from start Y to new Y position?

I can try it for the credits. But i think it would be a little harder for the monsters, right? once that they keep changing the direction and speed, and also, i always thought that tween behavior is a very heavy behavior. is that wrong?

Well it is a bit heavy, but you can always trigger the Tween then after finish remove the tween, sometimes destroying the Object where the Tween was applied and sometimes just remove the Tween only.

I use it all the time for a text object that display enemies damage when the player attack on them so I create a text at enemy position with a Tween to move from enemy.X(), enemy.Y() to up.
Something like this.

1 Like

And if you add a gradual fade on top, it’d make for a nice looking effect :smiley: