realFPS is only 32 frames

skofrant

Member
tries to set the game animation smooth.
my game has slowed down a bit , probably because there were some new objects in the game.
realFPS is currently at 32 frames a little bit.

GML:
minFPS, maxFPS, avgFPS
-32, 1474, 264
and I have room_speed set to 30 everywhere
when I set it to 60, the game is artificially accelerated ... then it looks like everything is running in accelerated pace

what to do to make the game run smoothly? how to force it?
I try to optimize the game on an ongoing basis.
 

Binsk

Member
If you designed your game to run at 30fps, then it will run at 30fps. If you designed your game to run at 60fps then it will run at 60fps.

If you are half-way through making your game and you want to change things from 30fps to 60fps to make it smoother then you will need to go through all your code and modify your movement speeds, acceleration, friction, and so forth to run slower to compensate for the faster frame-rate. Increasing the fps (aka. room_speed) increases the game logic speed and thus why everything will appear to 'run faster' until you fix it. This is why it is important to decide how you want to handle frame-rate before you start your game.

In the future you can solve this by designing all your movement around delta time rather than static numbers but the project has to be designed around it from the start. Regardless of what you choose to do, if you are changing the frame-rate then you will need to adjust all the physics in your game to compensate.
 

skofrant

Member
I wrote above what do I want to achieve
probably need to use delta timing
once again in short
I want to set room_speed everywhere in the game from 30 to 60, because now the game is slowing me down.
and now yes .. when I set the room_speed value to 60, the game behaves very quickly and it looks unnatural the movements of objects and the player.
my game is a platformer genre, I would like to get very smooth gameplay without stuttering animation and vez artificial unnatural accelerated animation

If you designed your game to run at 30fps, then it will run at 30fps. If you designed your game to run at 60fps then it will run at 60fps.

If you are half-way through making your game and you want to change things from 30fps to 60fps to make it smoother then you will need to go through all your code and modify your movement speeds, acceleration, friction, and so forth to run slower to compensate for the faster frame-rate. Increasing the fps (aka. room_speed) increases the game logic speed and thus why everything will appear to 'run faster' until you fix it. This is why it is important to decide how you want to handle frame-rate before you start your game.

In the future you can solve this by designing all your movement around delta time rather than static numbers but the project has to be designed around it from the start. Regardless of what you choose to do, if you are changing the frame-rate then you will need to adjust all the physics in your game to compensate.
thanks..that's what i mean, so i need to implement it throughout the game code ..
I want to adapt the game to room_speed 60.
where do i need to start?
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Divide all movement speed by 2. So if you have set the player to move at x += 3, then it should be x += 1.5. If you set a path_speed to 5 then it will need to be 2.5. Etc... So, you'll need to go through all your code and make sure that anything that sets speed or friction or gravity or anything else like that is halved, since you are doubling the game speed.
 

TsukaYuriko

☄️
Forum Staff
Moderator
The output you posted says that the minimum FPS that was ever recorded during your game's entire run time is negative thirty-two FPS and that the average FPS is actually 264. Therefore the answer to "realFPS is only 32 Frames" is no.


If you want to double the game speed, you'll have to cut all movement speed in half, double the duration of any alarms, etc. Stuff like gravity isn't as easy to pinpoint as you don't have linear progression there, but a function.

Note that if you think your game is slowing down and losing performance, increasing the room speed will only serve to make things worse. You'd be doubling the amount of processing power required by a game that's, according to your analysis, already having performance issues. First verify whether your game actually has performance issues and track them down using the debug mode's profiler.
 

skofrant

Member
what do you think about gmlive and gmedit?
isn't that more convenient than the built-in debugger in gms?
 
Top