Question about layered images

lobotomist

Active Member
Sep 4, 2017
907
879
So I was looking into RPG maker and using dragonbones for animation. But it ocured tobme that maybe, I could achieve a similar effect with ren'py's layered images if there is a possibility of looping trough the layers.

So... Is there a way to do something like that?
 

Epadder

Programmer
Game Developer
Oct 25, 2016
568
1,064
Yes, but the more layers, more frames, and the higher resolution the bigger of a potential performance impact.

To use animations in a layered image, you just use the Ren'py standard frame by frame animation.

Then use the the animations for the attributes of the layered image.

This is 14 frames of animation, at 1280 x 720, with about 7 layers and it's performance isn't the best.
Python:
image missionary_base_fast:
    "woman_missionary_base_0000"
    0.034
    "woman_missionary_base_0001"
    0.034
    "woman_missionary_base_0002"
    0.034
    "woman_missionary_base_0003"
    0.034
    "woman_missionary_base_0004"
    0.034
    "woman_missionary_base_0005"
    0.034
    "woman_missionary_base_0006"
    0.034
    "woman_missionary_base_0007"
    0.034
    "woman_missionary_base_0008"
    0.034
    "woman_missionary_base_0009"
    0.034
    "woman_missionary_base_0010"
    0.034
    "woman_missionary_base_0011"
    0.034
    "woman_missionary_base_0012"
    0.034
    "woman_missionary_base_0013"
    0.034
    repeat

### SNIP ALL THE OTHER IMAGE DEFINITIONS

layeredimage missionary fast:

    always:
        "missionary_base_fast"

    group maneyeandbrows:
        attribute man_eyes default:
            "missionary_man_eyes_and_brows_fast"

    group manmouth:
        attribute man_bite default:
            "missionary_man_mouth_bite_fast"
        attribute man_clench:
            "missionary_man_mouth_grinfrown_fast"
        attribute man_frown:
            "missionary_man_mouth_frown_fast"
        attribute man_smile:
            "missionary_man_mouth_smile_fast"
        attribute man_grin:
            "missionary_man_mouth_grin_fast"
        attribute man_talk_frown:
            "missionary_man_mouth_talk_frown_fast"
        attribute man_talk_frown2:
            "missionary_man_mouth_talk_frown2_fast"
        attribute man_talk_happy:
            "missionary_man_mouth_talk_happy_fast"

    group womaneyes:
        attribute woman_eyes default:
            "missionary_woman_eyes_fast"

    group womanbrows:
        attribute woman_idle default:
            "missionary_woman_brows_idle_fast"
        attribute woman_neutral:
            "missionary_woman_brows_neutral_fast"
        attribute woman_sad:
            "missionary_woman_brows_saman_fast"

    group womanmouth:
        attribute woman_bite default:
            "missonary_mouth_bite_fast"
        attribute woman_smile:
            "missonary_mouth_smile_fast"
        attribute woman_cute:
            "missonary_mouth_cute_fast"
        attribute woman_big_grin:
            "missonary_mouth_grin_fast"
        attribute woman_grin:
            "missonary_mouth_grin2_fast"
        attribute woman_moan:
            "missonary_mouth_moan_fast"
        attribute woman_ahegao:
            "missonary_mouth_ahegao_fast"
        attribute woman_talk_frown:
            "missonary_mouth_talk_frown_fast"
        attribute woman_talk_happy:
            "missonary_mouth_talk_happy_fast"
        attribute woman_talk_happy2:
            "missonary_mouth_talk_happy2_fast"
        attribute woman_talk_happy3:
            "missonary_mouth_talk_happy3_fast"

    group womanetc:
        attribute woman_blush:
            "missionary_woman_etc_blush_fast"