Different Max FPS on different platforms

If I want my game to be ran up to 200 FPS while it’s being played on PC, and 60 FPS while on mobile, that wouldn’t actually be possible, would it?

The only way is to create 2 GDevelop projects, one version for PC with its 200 FPS cap and one version for mobile.

Is that correct?

Thanks im advance.

It most definitely is. You can use TimeDelta() to get the same movement speed regardless of the framerate of the device the game is running on.

Instead of moving an object by, say, 10 pixels per frame, work out how many pixels you want it to move per second and multiple that by TimeDelta() every frame.

So, say for example you want an enemy to move at 80 pixels to the right per second, you’d have an event to add 80 * TimeDelta() to the enemy’s X position.

1 Like

Ah, I got that part, no worries there.

But I’m asking about the change of the framerate itself based on the platform, not the movement of objects that is based on the framerate.

The thing is, PCs are generally stronger and tend to handle higher framerates better. When I tried my game on mobile with the 200 FPS cap, the FPS wavered significantly, from 120 to 60. Those variations are an unpleasant viewing experience, so I’d want to set the cap to 60. As far as I know, I can’t really do that inside the project, so I think I should create 2 different projects to accomplish that.

I hope this clears it up a bit.

If I understand you correctly, you’ve set the Maximum FPS to 60 in the project properties yet it still fluctuates between 60 & 120?

1 Like

No no, there’s a misunderstanding. I’ll try to explain it differently.

I have my GDevelop project with my game, but I want it to run at high FPS when it’s being played on PC, and run at lower FPS when it’s being played on mobile.

That’s why I would like to set an FPS cap of e.g. 200 when it’s being played on PC, and an FPS cap of 60 when it’s being played on mobile.

But (as far as I know) that is not possible by using events, I can only set the FPS cap in the project settings, but then that cap is in effect when it’s being played on PC and mobile, which is not good because I wanted the caps to be different for each platform.

That’s why I said I need to have 2 GDevelop projects, one for when it’s being played on PC, where I can set the higher FPS, and one for mobile with the lower FPS.

I hope this makes sense.

Each platform needs a different build. Would a solution be to change the project’s Maximum FPS for each platform just before you build it?

2 Likes

That could count as a solution, but it’s still a shame if I export it to gd.games with a 200fps cap, when played on PC it will do good, but if someone runs it on mobile it’s still the same problem.

Is there any chance the GDevelop development team will add this FPS setting in the future, so we can use it through events?

What problem would you have on mobile? FPS cap is a limit… it only comes into play if your device could do more. Phones are not going to suddenly be forced into trying to render at 200fps if that is your cap.

2 Likes

But they will try to do the max they can, which results in massively fluctuating FPS. The FPS needs to be constant for the ideal experience

1 Like