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

HTML5 image_speed not working

J

JSON

Guest
Hi, it seems that image_speed does not apply when exporting to HTML5 nether does setting the frame rate on the sprite itself. Works fine when exporting to Windows.

Please advise, I really like that feature and use it a lot!
 
Also having this exact issue. Sometimes the animation is stuck on the first frame, and in other cases it plays at one image per game frame, regardless of image_speed or sprite speed. The same projects work fine on Windows and Android.
 
J

JSON

Guest
I am using Chrome on a Windows 10 Machine. The sprite changes frame once per game frame no mater what I set it to. It happens to all of my projects no mater if I am in debug mode or host the build on my web server. I have tried setting the image frame rate in the image editor as well as using image_speed = 3; in the create event of the object that uses the sprite. I have also tried the image_speed = 3; in the step event of the same object with no results. I checked Chrome's console in the developer tools and there are no thrown errors. When I change the build target to windows image_speed works fine.
 

chance

predictably random
Forum Staff
Moderator
That's odd. I'm not seeing this. My tests show that image_speed works the same in HTML5 as in Windows. I normally use Firefox. But I just checked in Chrome (on a Win 10 machine), and it worked as expected.

I have "one frame per game frame" selected in the sprite editor. And I set the value of image_speed in the Create event. Works as expected in HTML5.

My first thought was that you have some parenting issue, or maybe you're resetting image_speed to 1 somewhere else. But that would affect a Windows test as well. So I'm afraid I can't offer any insight. Perhaps someone else can.
 

gnysek

Member
I've remember an issue, that if sprite have 10 frames, and you write a code like "image_index = XX" and XX is >= 10, then it will break animations (as maximum value should be 9 in this case, cause we start from 0).
It may be this issue, as Windows have no problem with this.
 

rwkay

GameMaker Staff
GameMaker Dev.
without a project sample to comment on, it is very difficult to tell - I would file a bug with the project attached so we can see what is going on

Russell
 
J

JSON

Guest
Ok I made a small sample project that only has three sprites and three objects. It looks like image_speed is working but setting the speed via the image editor doesn't work on html 5 export but does work for windows. On the sample project the left most cube was set to 3 via the image editor the middle cube was left at default and the right cube was left at default but image_speed was set to 0.3 in the create method. I have put a link to the test project.

http://codechomper.com/GameMaker Games/TestImageSpeed.yyz
 

Bee

Member
Did anything ever happen with this? I'm experiencing the same issue. Image speed isn't used in HTML5 when I set it. Also, I noticed when I set an object so when the animation ends, it should stop and stay on the 1st image_index. But it's not... it keeps animating.
 

Mike

nobody important
GMC Elder
should be fixed in the next release. I've not seen anyone report the 1st image thing though. Try again once the new version is out.
 
Top