• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Windows Delta time

Y

YupYup

Guest
I'm new to Game Maker 2.

Is sprite speed moving some pixels per Step the same on some game running 30fps and another running 60fps or in different hardware ?

Is Step function constant accross different hardware ? Will a sprite move 4 pixels per Step always have the same speed on different devices ?

Or should i use Steady Delta plugin and use (speed*delta_time) ?
https://marketplace.yoyogames.com/assets/1149/steady-delta-time
 

csanyk

Member
"Speed per step" will be the same, but if the fps is different, the number of steps per second will be different, so it will seem faster at higher fps.

GameMaker will try to achieve the fps called for by the Game FPS property (GMS2) or room_speed (GMS1.x and earlier) and if the hardware is capable of running the game at that speed, it will be the same. If the hardware can't keep up, it will slow down.

Delta time is an advanced concept which requires some deeper understanding, although certainly it's easier to work with if you have a plugin that does it for you, assuming it's well documented and you use the plugin properly.

I wrote an article on Delta Time not that long ago which is helpful to understand it if you're new to the concepts.

https://csanyk.com/2018/08/gamemaker-tutorial-delta-time/

Hope this helps!
 

Amon

Member
Sprite animation, no. Particle speed yes. You need to use it when anything needs to move i.e. a missile, a car, a cloud or particles; including rotations.
 
Y

YupYup

Guest
Sprite animation, no. Particle speed yes. You need to use it when anything needs to move i.e. a missile, a car, a cloud or particles; including rotations.
You mean particle moving on screen speed, or particles emitter speed parameter ?
 
N

NeZvers

Guest
Step is basically game frame. room_speed is frame limiter (no more frames in second than room_speed) meaning slower device will be too slow to reach room_speed if your game is too poorly optimized for it or some calculation will drop FPS.
So if you want character move 1px per step and you have room_speed = 60, that mean you want to move character 60px per second but if device slows down you have moved way less than intended.
 
Top