# Gif Animations

**URL:** https://forum.makecode.com/t/gif-animations/5196
**Category:** Arcade
**Created:** [December 22, 2020, 4:04pm UTC](https://forum.makecode.com/t/gif-animations/5196 "2020-12-22T16:04:53Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![WoodysWorkshop](https://avatars.discourse-cdn.com/v4/letter/w/ea666f/32.png) [@WoodysWorkshop](https://forum.makecode.com/u/WoodysWorkshop)
#### Post date: [December 22, 2020, 4:04pm UTC](https://forum.makecode.com/t/gif-animations/5196/1 "2020-12-22T16:04:53Z")

</div>

Hi everyone,

First-time contributor to the forum here 🙂

I am trying to play gif animations on makecode arcade.

1. I found a gif
2. I used [ezgif](https://ezgif.com/) to resize the gif to 160 x 120 pixels.
3. I used the [arcade asset tool](https://riknoll.github.io/pxt-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 🙂

Thanks  
Woody

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/3/31dd004f7f9a3f335adb3d7194f87fb8e7901771.png)

---

<div class="post-metadata">

### Author: ![WoodysWorkshop](https://avatars.discourse-cdn.com/v4/letter/w/ea666f/32.png) [@WoodysWorkshop](https://forum.makecode.com/u/WoodysWorkshop)
#### Post date: [December 22, 2020, 5:00pm UTC](https://forum.makecode.com/t/gif-animations/5196/2 "2020-12-22T17:00:51Z")

</div>

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?

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/6/6a78d1e933bb7def164c70f48456afd629244d65.png)

---

<div class="post-metadata">

### Author: ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)
#### Post date: [December 22, 2020, 5:12pm UTC](https://forum.makecode.com/t/gif-animations/5196/3 "2020-12-22T17:12:28Z")

</div>

Tom and Jerry? 😃

It might be faster for you to manually loop over the images and set the background image yourself.

---

<div class="post-metadata">

### Author: ![WoodysWorkshop](https://avatars.discourse-cdn.com/v4/letter/w/ea666f/32.png) [@WoodysWorkshop](https://forum.makecode.com/u/WoodysWorkshop)
#### Post date: [December 22, 2020, 6:29pm UTC](https://forum.makecode.com/t/gif-animations/5196/4 "2020-12-22T18:29:46Z")

</div>

Here’s the source

> **[Gif Animations](https://arcade.makecode.com/15432-15130-89850-13371)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

### Author: ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)
#### Post date: [December 22, 2020, 7:13pm UTC](https://forum.makecode.com/t/gif-animations/5196/5 "2020-12-22T19:13:07Z")

</div>

Using the sprite, I get about 150FPS. Using my background method, I get about 1100FPS.

> **[Gif Animations](https://arcade.makecode.com/56131-69609-36576-13690)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

### Author: ![WoodysWorkshop](https://avatars.discourse-cdn.com/v4/letter/w/ea666f/32.png) [@WoodysWorkshop](https://forum.makecode.com/u/WoodysWorkshop)
#### Post date: [December 22, 2020, 7:35pm UTC](https://forum.makecode.com/t/gif-animations/5196/6 "2020-12-22T19:35:28Z")

</div>

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

---

<div class="post-metadata">

### Author: ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)
#### Post date: [December 22, 2020, 7:45pm UTC](https://forum.makecode.com/t/gif-animations/5196/7 "2020-12-22T19:45:45Z")

</div>

It fails to compile for Meowbit on my end but compiling for a PyGamer works.

---

<div class="post-metadata">

### Author: ![WoodysWorkshop](https://avatars.discourse-cdn.com/v4/letter/w/ea666f/32.png) [@WoodysWorkshop](https://forum.makecode.com/u/WoodysWorkshop)
#### Post date: [December 22, 2020, 8:26pm UTC](https://forum.makecode.com/t/gif-animations/5196/8 "2020-12-22T20:26:49Z")

</div>

Thanks! Good to test this! 😃 😃

---

<div class="post-metadata">

### Author: ![cosmoscowboy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/cosmoscowboy/32/1718_2.png) [@cosmoscowboy](https://forum.makecode.com/u/cosmoscowboy)
#### Post date: [December 23, 2020, 5:13pm UTC](https://forum.makecode.com/t/gif-animations/5196/9 "2020-12-23T17:13:39Z")

</div>

I not sure on the specs, but the Meowbit does not have enough memory to store all the images; while the PyGamer has more.

---

<div class="post-metadata">

### Author: ![Agent\_14](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/agent_14/32/17567_2.png) [@Agent\_14](https://forum.makecode.com/u/Agent_14)
#### Post date: [December 24, 2020, 4:28pm UTC](https://forum.makecode.com/t/gif-animations/5196/10 "2020-12-24T16:28:34Z")

</div>

Talking about memory space, do you know if gogamer has a decent amount of it?
