Hiya,
I've been trying to make the physics world work within my game for about an hour now and I just... can't... do it! I have all the physics working at normal speed but when the player lags, the physics world slows down (which I know it should because of a lack of delta timing; it makes sense).
I know how to use delta timing, and that isn't the problem .. The problem is: how would I speed up the physics world on low FPS'?
I've tried using:
(120 is my game speed/room_speed) (global.delta is the variable from which the result of delta timing is stored)
However, it seems to make absolutely no difference; the physics world still slows down while the game world stays at a constant speed.
I'm not exactly savvy with the physics world quite yet.
Am I doing something wrong?
EDIT: I've found that setting my room_speed to the fps fixes the problem, but this is a bad idea.
If anyone knows how to fix this without altering the room_speed, that'd be great! QvQ
EDIT #2: I've decided to opt for:
Can someone who is more knowledgeable in how game maker functions below the bonnet tell me if this is a good/bad thing to do? Thank you!
I've been trying to make the physics world work within my game for about an hour now and I just... can't... do it! I have all the physics working at normal speed but when the player lags, the physics world slows down (which I know it should because of a lack of delta timing; it makes sense).
I know how to use delta timing, and that isn't the problem .. The problem is: how would I speed up the physics world on low FPS'?
I've tried using:
Code:
physics_world_update_speed(120*global.delta);
However, it seems to make absolutely no difference; the physics world still slows down while the game world stays at a constant speed.
I'm not exactly savvy with the physics world quite yet.
Am I doing something wrong?
EDIT: I've found that setting my room_speed to the fps fixes the problem, but this is a bad idea.
If anyone knows how to fix this without altering the room_speed, that'd be great! QvQ
EDIT #2: I've decided to opt for:
Code:
if ( fps < global.framerate_limit )
room_speed = fps;
else
room_speed = global.framerate_limit;
Last edited: