Apply Force performance Issue

A couple days ago I opened a topic abou a performance issue that I tought it could be my colision tests. After a deep refining of my code, compressing png and sound, I still kept having this weird wobbly glich (sprites moving back and forth a couple pixels very fast ocasionally) on mobile devices (tested every family member cellphone). I triple checked my code and everything looked fine so I had an idea, deleted every single event not related with the aplly force and ONLY the apply force (no collisions, no variables, nothing but create an object and apply movement) and the problem keeps ocurring. My game shows about 20 objects on screen MAX and 10 MIN. its not a lot

I set up an action to check framerate and its 50 all around (when I use 1.2 time scale) and 60 when im not, which seem correct to me, but the problem keeps occuring. The game runs smooth, its not an fps drop, it looks like a rendering lag.

I know absolutely nothing about coding, so could anyone please check if theres something wrong with aply force actions of if theres any way its rendering or performance could be improved?? (I tried instant without trigger once, permanent with trigger once, angle and XY)

Thats my second game and the same weird thing is happening, thats frustrating

Share a project or APK demonstrating the issue, because “weird wobbly glitch” doesn’t help us much. :slight_smile:

I think it might be the subpixel rounding issue, I’m not sure if it has been fixed yet.
Are you using the lerp math function?

my game is published on Google Play

I think you’re going to notice the problem while playing, If you touch the yellow icon on the top right side, you’ll be able to see the that the FPS is butter smooth but the problem still occurs

I haven’t noticed any issue. :confused:

I also just downloaded and could not see any issues. Fun game though even if I can’t read it :stuck_out_tongue:

Thats pretty odd to me. I tested it on several cellphones and I notice the weird wiggle on the enemy sprites very often

I don’t understand why a “weird wiggle” would be a performance issue though, especially if the FPS doesn’t drop.
If you can share some video or screenshots demonstrating the issue, it might help us understand what’s going on.
I ask you again, do you use the lerp ?

Share the project can be very useful !

no, I didn’t use lerp anytime. I’ll try to record the issue

@Bouh @Gruk @convictedweirdo, this channel recorded a gameplay of my game, in the video is perfectly clear to see the issue i’m talking about. You dont need to watch the entire video, the issue occurs very often.

If you slow-mo the video, it looks like the sprites all take a step back in their movement (it’s the best way I can describe it), before resuming. It’s like they’re on a particular trajectory, and then reverse for a split second before continuing on.

But, it doesn’t happen to the background. It makes me wonder if you are doing your camera position update at the end of the frame, after all the character position updates have been done. So that it’s the very last action of all the events.

I may be wrong but it looks like the camera is stationary and the background and objects are moving from right to left. I also noticed the interval of the wiggles seem to happen around every 12-15 seconds?

Do you have any complex events (while, loops) that execute on a timer?

Unfortunately without a project file it’s going to be hard to help but I hope we can help you get to the bottom of this.

Yeah, that’s how it looks, but making games it’s about creating an illusion. The best method of parallax scrolling is to have stationary backgrounds on multiple layers and pan the cameras at different speeds, thereby moving as few objects as possible. If the OP uses this method, then it would explain why the background doesn’t glitch - because it’s not moving.

If you can reproduce the problem in a blank project with the bare minimum we can all take a look.
Trying to find an explanation is complicated and can be the source of too many different things.

I’ve already seen people clear the force before use it, it’s not recommended.
I mean that is useless, Stop action have no interest here:

Remove stop action, and reduce p/s parameter on the forces.

The problem is quite visible on the video, but I still don’t see it on my phone.
During jumps, the player goes up/down/up, which clearly shouldn’t happen and can’t be a side scrolling issue.
Aside from checking that all the sprites of each object are the same size, I don’t have much to suggest. :confused:
Does the issue occur at normal timescale?
What is your current setting for minimum frame rate? Try changing it.

Well guys, the game become huge with more than 500k downloads. And I need a lot of help to improve it.

Here’s a test build so you can check the project and look for errors or even event mistakes.

1 Like

i use 1.2 timescale, but the glich occurs even without it

sometimes i need the stop force because the movement has to change direction, unless you guys can help-me with a workaround on my event mistakes.

the game is not monetized because a don’n own Juliette’s rights, but if someday this changes, i’ll guarantee you, I’ll invest a lot on gdevelop. you guys rock!

Congrats :tada:

I downloaded the project, tried it in preview and network preview, I’m still unable to reproduce the issue. :confused:
Do you get it in preview as well, or only on mobile?

Maybe you can give us a list of the models and Android versions of the phones on which you noticed the issue.