Maintaining Constant Animation Speed Regardless of Global Time Scale

Hello @insein
Thank you for your suggestion! It worked perfectly. However, I noticed that when I set the time scale of the scene to around more than *4, the speed of the scene doesn’t seem to increase further. Do you know why this might be?

Thanks again for your help!

I’ve never had this issue. It could be some event that’s messing with the global variable SpeedCoefficient. Can you share a screen shot of your events?

1 Like

Hi @insein,

Thanks for your reply. To troubleshoot the issue, I’ve removed all events related to the SpeedCoefficient . The only action I’ve left is the Set the time scale of the scene to. However, the problem still persists.

1 Like

hey there,
I’ve never used that event before. However, it could be that your computer is not able to process the game running at more than 4x the speed (just a guess)

1 Like

Hi Reina,

Thanks for your suggestion. However, I don’t think that’s the issue because my PC has an i5 8th generation processor and the game is quite simple.

Hi, no problem!

There’s not much I can help with without more context and I don’t wanna keep guessing.

I suggest you check couple of things:

  • Test it on another project just to make sure nothing is wrong with your machine or version of GDevelop
  • Troubleshoot and disable other events until you find the cause of the problem
  • Put a “change timescale” action at the end of the project to override all events and see if it works
  • If you still don’t find the problem, then I’d need more context so I can see what’s going on and try to help you better.
1 Like

Hi @insein,

Thanks for your suggestions. Unfortunately, the issue still persists. I noticed that when I set both the time scale of the scene and the world time scale of the ball to a high value, the ball launched upwards doesn’t reach the expected summit. Instead, it turns back towards the surface and the speed does not seem to increase further.

For more context, I’m using a game template from GDevelop. Here’s the link to the template: https://gdevelop.io/game-example/free/spherez.

I appreciate any further insights or suggestions you might have on this issue.

Hi,

I tried the example and set both timescales to 20 and I got the same result as you.

I believe that the physics engine don’t handle a high timescale well, the gravity is being multiplied by 20, but other forces seem to not be calculated correctly. I also noticed that setting the timescales back to 1 (releasing the speedup button) makes the ball move very slowly.

Maybe that’s a bug in the physics engine and setting the physics timescale to a high number messes up all the calculations? I’m not really sure.

I tired setting the gravity of the ball to 0, which fixed the ball falling back down when sped up. BUT the problem of the ball slowing down afterwards is still there.

I think you don’t need the physics time scale for your example and only setting scene timescale to a high number works just fine. The physics seem to speed up / down without any problem.

1 Like

Can I ask why you want to adjust the time scale so much? Wouldn’t it be easier and better to leave the time scale and change the force and/or physics settings. It seems like the scene is a balancing act. It’s tring to maintain a frame rate while timing and syncing various things.

Im not criticizing it. I’m just trying to understand it.

1 Like

Hi @insein,

Thanks for your detailed response and for testing the game. I agree with your observations about the physics engine . However, I’ve noticed that even when I set the time scale of the scene to a value greater than 4, the speed of the scene doesn’t seem to increase further. This happens regardless of the physics timescale or the gravity settings.

Hi @Keith_1357,

I appreciate your suggestion. I’m still a beginner in using GDevelop. While I’ve tried changing the force and/or physics settings as you suggested, it has led to some bugs in the game. As a beginner, troubleshooting these bugs can be quite challenging. That’s why I’m experimenting with the time scale instead.

1 Like

That’s all good. I was curious. Have a good one.

1 Like


Trigger once?

1 Like

Hi @RMDB,

It didn’t work. Thanks for the suggestion.

Use a second layer for your object that has a custom time scale.
under conditions there is “Layers” time scale condition,
Use layered time scale and leave that trigger once there

1 Like

That didn’t work either


pls trigger once :books: :books:
you are creating without trigger once,also stop with phisical time scale if needed.

btw a mix of basics errors in the ss

1 Like

Hi @GameOn

I did some testing and I found the issue.

Turns out that the physics engine locks the speed of a moving object with max speed of 1200. Even when setting high timescale, the rest of the scene (animations or other non physics objects) move at the set timescale, but physics objects are calculated separately and never travel faster than 1200.

Since the example project shoots the ball at speed of 300, 1200 / 300 = 4. So the ball can never speed up more than 4x. It’s a limitation of GDevelop’s physics engine.

I think you only have these 3 options:

  • Accept that you can’t speed up more than 4x.
  • Shrink down the project to smaller resolution like 180x320 (1200 max speed will be 4x faster at this resolution) but you’d have to redo all the assets / fonts to pixel art and change the forces.
  • Recreate without using physics.

Note:
If the balls are moving at a very high speed, collisions might not work properly. The balls may skip the blocks and collisions wont be detected.

1 Like

I’m sorry, but I didn’t quite understand. Could you please clarify?

Hi @insein,

This limitation in the GDevelop physics engine could potentially hinder creativity. I’ll report this issue in the bug section of the forum. Thanks again for your help.

1 Like