My friend and I are making our first game. He says that a sprite's speed (in frames per second) needs to be a multiple of the number of the sprite's sub-images. For instance, a sprite with 7 sub-images would need to have a speed of 7, 14, 21, etc. Is this true? The sprite seems to work just fine in the game if i choose a non-multiple (e.g. speed of 10 with 7 sub-images) for the sprite's speed, but I don't know if there's some reason behind this that I'm not aware of. Is there any benefit to doing this?
View attachment 19407
If could be any number you want, in fact making it seven would make it slightly uneven
That speed basically says
After every room_speed/speed steps, increment the frame
So if your speed is 7 and your room speed is 30
The frame increments after every 4.285714 steps.
If your speed was 10, it would increment after every 3 steps.
You can tell which one would produce a more even effect
The only advantage to making the speed a multiple of the amount of frames is that it would make the whole animation run in terms of seconds.
If your speed was 7, the whole animation finishes in one second
If your speed was 14, the whole animation finishes in half a second
If your speed was 21, a third of a second
Unless you want the animation to run based on seconds, making the speed a multiple isn't advantageous