• 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!

GameMaker [SOLVED] Strange Issue With Image Speed

T2008

Member
I created a torch with separate walking animation for the player. The image speed is completely normal when player is walking (all 8 directions) and when holding torch for directions N, NW, W, SW; but for the other 4 directions while holding torch, the image speed is way slower even though it has same code. The torch is independent and doesn't control image speed. The walking animation is just slightly different with the hand held out.

(I also have a separate suit that the player can wear. Image speed works perfectly for all walking and walking with torch directions. And I copied the no suit player code for this suit).

When I test and draw the image speed variable, it says image speed is .5 for all 8 directions when walking and walking with torch, even though 4 are clearly going slower.

I'm so confused. All 8 directions have some code (except says e,ne, etc). Any ideas as to why this is happening?
 
Last edited:
What is the speed of the sprites in the sprite editor? If I remember correctly, image_speed is applied against the original sprite speed in the editor. So even though the image_speed is 0.5, if one sprite is 30 and another is 60, they will animate at different speeds (one will by 15 and the other 30).

[Edit}: Yup, it is a multiplier against the editor value (from the manual entry for image_speed):
The speed value given is a multiplier, with 1 being the default value, and setting it to 0.5 will half the animation speed - as set in the Sprite Editor or Image Editor- while setting it to 2 will double it.
 

Yal

šŸ§ *penguin noises*
GMC Elder
image_speed is how many frames the animation is advanced per game step. An image with fewer frames usually has larger "jumps" between each subimage, so it will appear to run faster than an image with more frames and smoother transitions between each subimage if both are displayed with the same image_speed.
 

T2008

Member
What is the speed of the sprites in the sprite editor? If I remember correctly, image_speed is applied against the original sprite speed in the editor. So even though the image_speed is 0.5, if one sprite is 30 and another is 60, they will animate at different speeds (one will by 15 and the other 30).

[Edit}: Yup, it is a multiplier against the editor value (from the manual entry for image_speed):
Thanks everyone for the responses. You're right, this is the problem. I somehow changed the FPS value for some of the sprites. Is it best to set it to the default of 15 FPS? There's also a FGS setting too. Should I just leave these to default? My rooms are set at 60 fps
 

TsukaYuriko

ā˜„ļø
Forum Staff
Moderator
Thanks everyone for the responses. You're right, this is the problem. I somehow changed the FPS value for some of the sprites. Is it best to set it to the default of 15 FPS? There's also a FGS setting too. Should I just leave these to default? My rooms are set at 60 fps
Set the editor speed so that the animation looks "right" to you, whatever speed setting that requires. If you want to use an animation at multiple speeds, settle on one of them to define in the editor, then derive the others from that one.

If the editor's speed changed frames every 4 frames, and you want the animation to be twice as fast and therefore change every 2 frames, set image_speed to 2. If you want it to play at half the speed, set it to 0.5. It's a multiplier.

image_speed is how many frames the animation is advanced per game step. An image with fewer frames usually has larger "jumps" between each subimage, so it will appear to run faster than an image with more frames and smoother transitions between each subimage if both are displayed with the same image_speed.
Beware - this applies to GMS 1.x and earlier, but not to GMS 2. The base speed set in the editor did not matter back then and image_speed was absolute. Now it's relative to the base speed.

Or, in other words, back then, the (non-existent) base speed was 1, effectively making the default image_speed equal to the default base speed.
 
Top