smart storage of pngs

0 favourites
  • 7 posts
From the Asset Store
Unlock platyers earning coins, and save it with Localstorage
  • Hi! Again, I guess this must be somewhere in the forum since is not a small issue, but I can't find a reference to it.

    I've made a sprite with several animations. Some of those animations repeat frames that were used in other anims of the same char. I thought I was saving storage space copypasting frames from one animation to another, but when I turned de CAPX into a RAR and checked inside it I saw that the duplicated frames where there, twice, one inside every anim's folder.

    Is there a way to save space by telling the soft to use a sprite from another folder or something like that? anything that works for not having repeated pngs using space.

    I guess there must be a simple way to do this.

    EDIT: Well, I've checked that frames are saved 2 times even if they are repeated inside one single animation, inside the same folder. that's even worse! <img src="smileys/smiley11.gif" border="0" align="middle" />

  • each frame is it's own image. So no there is no inherit way in C2 to do this. you could make a custom plugin for custom animation and frame control rather than use the default.

  • oh, too bad.

    This should really be improved in the future. If you have a big character that has many animations but uses always the same 7 or 8 images you're wasting an awful lots of space.

    Shouldn't be too hard to implement.

    thanks anyway.

  • If you're already at a high data size you could also consider doing your own animations with events, if javascript to make your own plugin isn't a possible way for you.

    1) Add all frames in one animation of your object.

    2) Fill an array with the indices of the frames you want to use for an animation

    3) To animate, run through the array at a certain speed. There are various ways. For example,

    myFrame = (myFrame + 20 * dt) % walkArray.Width

    Set animationframe to walkArray.At(myFrame)

    will loop your custom walking animation with 20 fps

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • oh, too bad.

    This should really be improved in the future. If you have a big character that has many animations but uses always the same 7 or 8 images you're wasting an awful lots of space.

    Shouldn't be too hard to implement.

    thanks anyway.

    They already implemented what you are saying a while back: scirra.com/construct2/releases/r133

    On export, your images should be deduplicated.

  • They already implemented what you are saying a while back: scirra.com/construct2/releases/r133

    On export, your images should be deduplicated.oops <img src="smileys/smiley4.gif" border="0" align="middle" />

  • that's good news!

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