First-time contributor to the forum here
I am trying to play gif animations on makecode arcade.
- I found a gif
- I used ezgif to resize the gif to 160 x 120 pixels.
- I used the arcade asset tool to convert each frame to the hex code and painstakingly copied each frame in
4 - The problem) I know I can do this by simply repeating the one step I have shown in the picture below; but I’d like to…
a) Make an empty list
b) For each new frame, add it to the list
c) for each frame in the new list, add that to the animation on the sprite
I hope this is clear enough! Would greatly appreciate some help on indexing the lists here
I have been able to do it manually by grabbing each frame, dropping them into an array, then play the animation as shown. This works fine but would be faster in future to index the frames properly. Compiling this, however, there are problems if you use more than 20 frames at 160x120 resolution. Is that because there seems to be a limit of 1MB on the compiler?
Tom and Jerry?
It might be faster for you to manually loop over the images and set the background image yourself.
Using the sprite, I get about 150FPS. Using my background method, I get about 1100FPS.
Thanks for this. Looks great! Although, when I hit ‘Download’ (my hardware is a Meowbit) it says that it can’t compile correctly? Do you get the same error?
Your way works: with fewer frames (for me).
It fails to compile for Meowbit on my end but compiling for a PyGamer works.
Thanks! Good to test this!
I not sure on the specs, but the Meowbit does not have enough memory to store all the images; while the PyGamer has more.
Talking about memory space, do you know if gogamer has a decent amount of it?