Adding GIF's (or already existing animations) in a project

Greetings,

is there a way of inserting an already existing animation to a project in Defold?

I have tried adding a GIF file, but it does not accept it.

Tried converting that GIF to a set of PNG frames and then adding them to the project - getting the Heap OutOfMemory error - I guess it occurs because it tries to generate all the added images to the grid. Also, if I add them while it’s in “text” mode, it actually loads up all the images in a set but later fails when opening the grid. (worth mentioning that, when I insert ten-ish frames it loads them up and works perfectly - but it isn’t enough)

Tried with APNG format, but it also does not recognize it.

It’s kinda funny because the GIF file is around 8mb (also the exported PNG’s, same size, around 190 frames), just has a rotating element. Idea was to have an interesting intro to the game.

Maybe worth mentioning that the wanted resolution is 1920x1080… but still the file size is, I suppose, quite small.

So my question is, as I wrote on the beginning of the topic, is there (an easy) way of solving this “problem”?

Cheers,
Andrija

1 Like

You are probably trying to use an insane amount of memory if your texture size is 1920x1080 per frame of the animation even if it’s mostly empty space.

What’s the rotating thing? There’s probably a better option.

You can include 3d objects in Defold projects. So you could have the model and textures in game directly to save on space and memory.

Spine scenes are also an option for animating intros.

I have an unreleased OGV video player extension that could probably work better if you did want to use the frames.

3 Likes

It’s a tesseract… Because of it’s complexity, I thought it’d be easier to just import an existing element.

I was hoping that I could use this animation for I can’t extract the element - but I guess I’ll just redesign it and use a clean 3d object.

Thanks!