• Hey! Guest! The 37th GMC Jam will take place between May 28th, 12:00 UTC and June 1st, 12:00 UTC. Why not join in! Click here to find out more!

Android / Amazon Fire [SOLVED] How can i baypass FPS limit ?

Kasra_n

Member
Hi there, i had been optimized my rts game and now it should be run something about 95 FPS on my 2015 samsung j5, but the game locks at 60FPS, how can i baypass this limmit ? is it possible ? iam using gms 1.4, thanks for reading
 
Im confused on what you mean honestly, if you want to increase room speed that's as easy reffrencing room_speed. If you want frames per second to go up but not increase the speed of everything in your game the best way is to make everything into delta time, which is a pain to implement later in your game if it wasn't added originally, essentially if you vary the frame rate, you first figure out how many frames you want something to move per second. Example if your game runs at 60 and something moves at 3 frames per step that's 180 frames per second. Now in this example instead of x+=3 in step its x+=180/room_speed, this allows you to change the room_speed without effecting the speed the character moves. So if you wanted to increase room_speed for faster computers every hardcoded time related thing in your step event has to be recalculated like this. Fun note this is why fallout and skyrims physics freak out if the frame rate varies too much, its not really going to be super beneficial in a rts to go above 60 fps clicking unless like you said you just want to increase everythings speed not just less latency, in which case once again its just increasing room speed.
 

Mert

Member
  • Set the room_speed to 9999
  • Calculate everything with delta_time
  • Create a script, name it as deltaTimeCalculator, put the below code inside of it
Code:
return argument0* ( delta_time / 1000000);
Since you increased the room speed to a big one, there'll be more steps per second in your game. This will ensure that every calculation in your game is done according the real world time.

CREATE EVENT
Code:
clock = 0;
STEP EVENT
Code:
clock += deltaTimeCalculator(1);
//The clock variable is increased by 1 every second!
 
Top