0 Favourites

Dynamic way to cut sprite in half?

  • Is there a dynamic way to cut a sprite in half? Meaning, WITHOUT using either of the following:

    • Manually cutting them in half and creating animation frames
    • Piecing two halves together using the pin method, then using unpin to cut in half
    • Create a 2 new sprites, each containing one half and create it on top of the original sprite

    Is there any method, like dynamically copying part of an image onto another sprite?

    I have about 100 vehicles/sprites already created for an RTS game--when a unit is destroyed, I want to create an animation of the vehicle breaking into 2 halves. But to go back and create a "splitting animation" sprites for all 100 vehicles would probably take another month. Is there a faster, more dynamic/run-time way to do this?

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • If the collision mask is not important and all you need is to split the graphics, you can use a mask object.

    Create 2 mask objects (color the unwanted parts in black the rest leave transparent) and set the blending mode to Destination out

    On the layer settings where the object is on set:

    1. Transparent YES

    2. Force own texture YES

    Now create 2 instances of your object and the 2 masks and pin them to the object.

    If the mask is the same on both sides you can just mirror the same mask.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
0 Favourites
Sprite Font Generator - v3
368 112,386
RetroDaddy's avatar
RetroDaddy
Unread hot topic
107 13,195
LeuNoeleeste's avatar
LeuNoeleeste
Unread hot topic
86 28,723
St4rDu57's avatar
St4rDu57