60 FPS on all mobile devices?

I think I just realized I made a mistake.

I am developing a tower defense game where I do not move enemies, bullets, etc based on time. I base everything on frames (i do not use Time.deltaTime when calculating their next position). I do this because I record the exact frame of animation the user places a tower... when the game ends I send all their actions to the server and I replay the game in memory on the server to validate their score.

Since the game is not run on time I can be certain both the server and the clients gameplay would be identical.

I set my game to run at 60fps. I am aware that older mobile devices may not be powerful enough to run at 60 fps... so their enemies and bullets will move slower.... but I was fine with that...

However, I think I read today that some phones/devices cannot run at 60 fps... they are capped at 30 fps...

If that's true that means my game at best will run at half the speed I intended it to be run at....

Can someone confirm if this 30fps cap is true? My hopes of this cheat detection system might not work now :(

Relying on frame rate for game execution is a horrible idea, since you have no way of controlling that or even accounting for it in your application.

Maybe I'm missing something, but why can't you just record timestamps at key periods (game start, various events, etc) and validate based on that?

Well, I am checking for cheaters.

I assume if i add logic to move a bullet towards an enemy based on time, the bullet on the server could sometimes hit the enemy at a different frame of animation on the server (the clients machine could be slow and the bullet took 1.4 seconds to reach the target whereas on the server it took 1.3). They would then be awarded gold at different times and then could build new towers at different times.

In a perfect world, the server simulation and the actual gameplay would be identical... which is why I was basing everything on frames (moving a bullet 1 unit a frame on the server and on the client would reach the target 10 units away at the same time).

You're not going to be able to guarantee any FPS because you don't have control to shut off all other services which might slow down the device temporarily.

I understand your intent, but there's got to be a simpler way, right?

1 Like