Anime

Anime is a feature to play layer-based animations via the anime tag.

Anime File

An anime file is a text file which describes sequences of layer transforms.

Sequence

To move the message box 100px right in a second, write the following sequence in an anime file.

# A block describes a sequence for animation.
# The name of a block can be whatever you like and it won't affect anything.
move {
    # This is a layer specifier.
    layer: msg;

    # These are time specifiers. (in second)
    start: 0.0;
    end: 1.0;

    # These are origin position specifiers. 'r0' means relative '0'.
    from-x: r0;
    from-y: r0;

    # This is an origin alpha specifier.
    from-a: 255;

    # These are final position specifiers. 'r100' means relative '100'.
    to-x: r100;
    to-y: r0;

    # This is a final alpha specifier.
    to-a: 255;
}

Layer Structure

The following is our layer structure in the bottom-to-top order.

Layer NameDescription
bgbackground
bg2second background (for seemless scrolling)
efb1 ~ efb4effect on back 1 ~ 4
chbcharacter at back center
chb-eyecharacter at back center
chb-lipcharacter at back center
chlcharacter at left
chl-eyecharacter at left
chl-lipcharacter at left
chlccharacter at left center
chlc-eyecharacter at left center
chlc-lipcharacter at left center
chrcharacter at right
chr-eyecharacter at right
chr-lipcharacter at right
chrccharacter at right center
chrc-eyecharacter at right center
chrc-lipcharacter at right center
eff1 ~ eff4effect on front 1 ~ 4
msgboxmessage box
nameboxname box
choose1-idle ~ choose8-idlechoose box 1 ~ 8 (idle)
choose1-hover ~choose8-hoverchoose box 1 ~ 8 (hover)
chfcharacter face
chf-eyecharacter face
chf-lipcharacter face
clickclick animation
autoauto mode banner
skipskip mode banner
text1 ~ text8text layer 1 ~ 8
gui-button-1 ~ gui-button-32GUI button ID 1 ~ 32

Scaling and Rotation

# Scale-up and rotate the `effect1` layer to 2.0x and 360 deg in 3 seconds.
test1 {
    layer: effect1;
 
    start: 0.0;
    end: 3.0;

    from-x: 0;
    from-y: 400;
    from-a: 255;

    to-x: 0;
    to-y: 400;
    to-a: 255;

    # Scaling and rotation origin
    center-x: 600;
    center-y: 100;

    # Scaling factors
    from-scale-x: 1.0;
    from-scale-y: 1.0;
    to-scale-x: 2.0;
    to-scale-y: 2.0;
 
    # Rotation (+ for right, - for left)
    from-rotate: 0.0;
    to-rotate: -360;
}

# Reverse.
test2 {
    layer: effect1;

    start: 3.0;
    end: 6.0;

    from-x: 0;
    from-y: 400;
    from-a: 255;

    to-x: 0;
    to-y: 400;
    to-a: 255;

    center-x: 600;
    center-y: 100;

    from-scale-x: 2.0;
    to-scale-x: 1.0;

    from-scale-y: 2.0;
    to-scale-y: 1.0;

    from-rotate: -360;
    to-rotate: 0;
}