Efficiently and quickly recoloring sprites?

0 favourites
From the Asset Store
A set of 10 pixel art animated magic effects with icons. 2 Fire, 2 Earth, 2 Wind, 2 Water, Portal, Explosion.
  • Ok so let me try and explain this.

    I draw my animations and make variants like so

    And then export the whole spritesheet like this

    and make the couple different color schemes

    and then inside construct, all of the spritesheet is a single animation with an animation speed of 0 or whatever it doesn'T really matter because you animate with events

    different animation means different color

    and so when you want to animate them you do this

    so basically what it does it it has a "animation length" variable, that'S like the maximum size of animations on a grid, and "animation variants", that'S like, different variations like, it could be like different pairs of wings or whatever, here i have put different clothes as an example because im pretty lazy and I'm not going to recreate my whole animation events here but you get it, and then there's an instance variable containing the variant and the animation index and the math basically makes it play the correct animation.

    The whole point of this is that you only have to export your whole spritesheet like, maybe 80 times or something , and your colors will be handpicked and pretty and it will animate and stuff, versus having to upload a thousand animations in the editor which takes like literal days.

    There is a small performance hit by doing things this way but it adds a couple features to your game, like you can accurately control frame data for online multiplayer games and stuff so that'S cool.

    not all your animations are going to be the same length obviously, so you have to choose the longest animation as the length and will have blank frames, but construct will deduplicate them when you export so it should be ok. If you don't like using indexes as the animations you can use objects or a data structure instead, and then store how many "used" frames each animation has and put that in the formula

    Anyways you get the idea, here's the file drive.google.com/file/d/1nM01IikxX-VVV_ZnrRP7pws73gdSBxWY/view

    Edit: commented and made some changes to the file, enjoy?

    edit edit: Tom some of the images aren'T displaying, any idea why ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • eleanorjmorel

    ok, I think I understand now. Thank you so much for the thorough explanation! I'll try this method out.

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