How do I avoid using an animated GIF?

0 favourites
  • 10 posts
From the Asset Store
With this template you will learn how to use the GooglePlay Games native plugin
  • I know that you can import a GIF by dragging it onto the editor and that works fine but the GIFs I'm wanting to import are large cinemagraphs and waste a ton of memory. I also know that I could import a single frame for the unmoving parts and make a strip sprite for the small moving areas and just overlay them.

    That's would all work, but I want to be able to import user cinemagraphs dynamically at run time, so there is no opportunity to manually edit them. Does anyone know of a plugin (or code that could be worked into a plugin), that can identify the moving parts and go through this process automatically (sounds like mpeg encoding to me)? Or does anyone have another suggestion for keeping the (potentially terrible) memory and processor load down?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Can you upload your gif ?

    Maybe there a way to make it with events.

  • This is just a random example GIF but it shows the type of image size I'm expecting.

  • So you're expecting full color, short looping animations with a large resolution?

  • The best way is to make it in 2 parts: 1 background image "Girl".

    A small animated part of the hair.

    I think this will work fine.

  • A0Nasser - he's asking for a way to do it dynamically, based off-of user-submitted content. It is clear that that's the "easiest" way to do it, but by hand. Figuring out how to do that via code is a whole new ball game.

    I think we are moving into computer vision territory - if you were coding this you could probably get some API for that, but here, in C2 - well, unless someone makes a very specific plugin for that...

    I believe linkman had some info on this topic on his blog: http://thebananaboat.net/2014/12/advent ... nervision/

  • Thanks guys. Unnatural20, yup, that about covers it. A0Nasser, yeah that's what I need to do, but programmatically by the app.

    Somebody, you nailed it. I thought it was asking a bit much but folks here have done staggering things. Maybe I'll get by with just using big animated gifs, since I only need one to be loaded at any time. But that brings me back to another problem: C2 will do the animated gif splitting when you drag and drop the file onto the editor, but it seems like the runtime is not able to do the same trick. Am I understanding that right? If I am then what I now need is some code to turn an animated gif into sprite frames so that the runtime can treat them just like any other sprite (albeit huge)?

  • JethroNull Could you use a separate program? There exists, for example, http://download.cnet.com/GifSplitter/30 ... 87995.html

    btw, I like your username. It's very clever. <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • Unnatural20 - again - he wants to do it in runtime - no programs, no extra steps - load the file up and C2 should analyse it and make an optimal version. Which, to be honest, is beyond what C2 can do (at least natively). You can split sprite strips and such using plugins like Paster, but I don't think anything has the ability to load GIFs frame by frame. Even if something did you would have to guess or limit the amount of frames, etc.

    Best bet is a custom plugin, but that's some crazy work.

    Overall it sounds like JethroNull is trying to make an app using C2, which isn't a bad idea, but perhaps a hard one for this task.

  • Unnatural20, yes, it might be possible to do the splitting/conversion at the webend but it would still need to be 'live-ish' and automated. Thanks for the compliment on the username - I'm always worried that it'll show my age!... and now yours!... Unless you are an agricultural history buff, in which case I apologize;)

    Somebody, yeah, I'm trying to create an app. Just one loaded with gamey type graphics and visuals so I'm trying to squeeze it into the game builder world rather than an app-builder one. I really like C2 so I'm trying hard to make a square peg fit a round hole. The trick is making the square peg small enough.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)