Setting colors to sprites for strategy game

0 favourites
  • 3 posts
From the Asset Store
Color all tiles with the same color in 22 moves or less!
  • In strategy games, be it turn-based or real-time, you might have 2 or more teams fighting each other using the same units. Each unit has its team color.

    So I was looking around the forums with the keyword "palette swap" or the like, turned out I found the following:

    scirra.com/forum/palette-manipulation_topic52691.html : posted almost a year ago, and leaded to the plugin here: scirra.com/forum/behavior-recolor-sprite_topic51640.html But it's not for a single sprite...?

    scirra.com/forum/effect-color-replace_topic40462.html : but this is for C1

    So do we have this feature in vanilla C2 yet?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You basically have 2 options:

    1. Manually recolor each sprite in Photoshop or something, then save these as individual animations for each unit.

    PROS:

    -Works everywhere.

    -Little negative performance impact (provided you are within memory limits).

    CONS:

    -Extremely laborious.

    -More laborious the more colors you want

    -Not very maintainable

    -Uses up a lot of graphics memory.

    2. Use a WebGL effect (Adjust HSL or Tint)

    PROS:

    -Easy to do

    -Uses little graphics memory

    -Very maintainable

    -More color choices than you will ever need

    CONS:

    -Doesn't work everywhere, only works where webGL is supported.

    -Shader effects are hard on the GPU, especially at high resolutions

    I would roll with the second option, but if mobile development is important to you that may not be an option (although option 1 won't be very viable either as phones have very limited graphics memory).

  • Another solution might be to keep the units looking the same, but add a token or flag or some other item to the unit base (eg: a platform) or something indicating what team they are part of. Lets say you had a tank, and it was sitting on a red circle. That circle would be much easier to deal with changing its color than re-coloring the actual unit. So you could approach it that way as well.

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