Install this theme
Xumbra: shitXumbra: what have i doneXumbra: i think i created shadow rubyXekstrin: I AM THOUKing_ofMemes: Xumbra I know 98% of the fandom has been working to make characters darkerKing_ofMemes: But i think you took it too far

Xumbra: shit
Xumbra: what have i done
Xumbra: i think i created shadow ruby
Xekstrin: I AM THOU
King_ofMemes: Xumbra I know 98% of the fandom has been working to make characters darker
King_ofMemes: But i think you took it too far

This is a test for dynamic sprite brightness.

In the beginning of Act 2, Ruby, Yang, and Glynda are traveling across the desert to Beacon. As you may have remembered in a previous test, the desert background loops infinitely. This time around, we’ve made the loop last for three minutes, or 180 seconds.

While we were looking at the test again, we realized that the sprites remained bright while the background was dark. It looked a bit weird, so we thought we could find a way to have the sprites go dark while the background was depicting nighttime.

Our approach was to define two sprites with brightness at -0.25 and -0.5 (the maximum brightness is 1, default brightness is 0), and dissolve between them (brightness 0, -0.25, and -0.5) as time passes. Normally we would just dissolve between 0 and -0.5, but with the way we display our background we start somewhere near sunrise, which calls for a “halfway” brightness.

Here are the definitions of the different brightnesses (that sounds so weird):

image ruby hooded standard brightness_n025:
    im.MatrixColor(
        im.Flip("images/sprites/ruby/ruby_hooded_desert_standard.png", horizontal=True),
        im.matrix.brightness(-0.25))
image ruby hooded standard brightness_n05:
    im.MatrixColor(
        im.Flip("images/sprites/ruby/ruby_hooded_desert_standard.png", horizontal=True),
        im.matrix.brightness(-0.5))

And here is how we dissolve between them:

image ruby hooded standard varying_brightness:
    "ruby hooded standard brightness_n025"
    "ruby hooded standard" with Dissolve(45.0, alpha=True) # Brightness level 0
    45.0
    block:
        "ruby hooded standard brightness_n05" with Dissolve(90.0, alpha=True)
        90.0
        "ruby hooded standard" with Dissolve(90.0, alpha=True)
        90.0
        repeat

Note that the delays (45, 90, and 90) are needed because without them, Ren’Py complains that we’re trying to run an ATL with an infinite loop and raises an exception. Which is weird because that’s exactly what we’re trying to do, but whatever, we have to make Ren’Py happy somehow.

Obviously the next step is to do more tweaking and apply this technique to Yang and Glynda, but this is a great start.

Background is illustrated by frumpgrump.

You should not trust me with a computer.

Leftover Summer Rose Court business cards that we were handing out at Anime Expo 2014!

Art by Xuunies

Leftover Summer Rose Court business cards that we were handing out at Anime Expo 2014!

Art by Xuunies

This is a test for infinite background scrolling and walking.

There are many ways to do infinite scrolling, but one way is to use a composite image to piece together two images side by side, and simply pan over time while resetting the x position after it makes a loop. Below is the code to make this happen.

image continuous_desert:
    im.Composite((9600, 600),
        (0, 0), "images/bg/continuous_desert.png",
        (8000, 0), "images/bg/continuous_desert.png")
    block:
        xpos 5.0
        linear 60.0 xpos -5.0
        repeat

Background is illustrated by frumpgrump.