How do I avoid using an animated GIF?

Get help using Construct 2

Post » Mon Feb 02, 2015 8:09 pm

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?
B
4
Posts: 5
Reputation: 210

Post » Tue Feb 03, 2015 12:45 am

Can you upload your gif ?
Maybe there a way to make it with events.
Image
B
60
S
10
G
10
Posts: 1,013
Reputation: 9,145

Post » Tue Feb 03, 2015 2:59 am

This is just a random example GIF but it shows the type of image size I'm expecting.
You do not have the required permissions to view the files attached to this post.
B
4
Posts: 5
Reputation: 210

Post » Tue Feb 03, 2015 7:55 am

So you're expecting full color, short looping animations with a large resolution?
B
11
S
4
Posts: 152
Reputation: 1,236

Post » Tue Feb 03, 2015 8:06 am

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.
Image
B
60
S
10
G
10
Posts: 1,013
Reputation: 9,145

Post » Tue Feb 03, 2015 8:43 am

@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/
B
19
S
6
G
6
Posts: 1,101
Reputation: 5,646

Post » Tue Feb 03, 2015 8:31 pm

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)?
B
4
Posts: 5
Reputation: 210

Post » Tue Feb 03, 2015 9:07 pm

@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. :)
B
11
S
4
Posts: 152
Reputation: 1,236

Post » Tue Feb 03, 2015 9:18 pm

@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.
B
19
S
6
G
6
Posts: 1,101
Reputation: 5,646

Post » Wed Feb 04, 2015 5:24 am

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.
B
4
Posts: 5
Reputation: 210


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot], mmercerc and 10 guests