Our February community event is scheduled, and we made a short Ren’Py design snippet to hopefully make traveling around different locations faster to code up!

# Commmunity Event

Our Discord poll for determining the event time is CLOSED, and the verdict is…Saturday, February 13, 2021 @ 1800PST/2100EST! We’ll be playing some Pictionary with AG-themed prompts. Details and links will be posted in the #events channel, so make sure to come by and join in the fun!

# Ren’Py snippet for traveling

We are trying something new with the way we code in background changes. There are some common patterns when moving between locations (transition out of the current location to black, and finally to the new location), or even common positions within backgrounds (hanging out at the bar in the DMR saloon, or entering town and walking over to the Sheriff’s station on the right). We usually just copy and paste the snippet or grab a new crop location every time it’s needed, but after a long gap between last implementing images for DMR, we couldn’t remember any of the timings for location movement! So this time, we will try to encode such movements into reusable snippets. Hopefully it proves useful and a big time saver…

Define reusable sections/animations within a single location

image bg saloon_day_bar:
"bg saloon4"
size (1280,720) crop (164,565,1280,720)
image bg saloon_downstairs_day:
"bg saloon_day_active"
size (1280,720) crop (2560,0,1280,720)
pause 1.6
ease 1.6 size(1280,720) crop (789,509, 2263,1273) clockwise circles 1
image bg saloon_upstairs_day:
"bg saloon_day_active" with Dissolve(.6)
size (1280,720) crop(0,0,3840,2160)
ease 1.6 size (1280,720) crop (2560,0,1280,720) clockwise circles 1
Define transitions to go between locations that need various image compositions and scripted timing
label go_to_bar:
scene bg saloon2 with Dissolve(1.2):
size (1280,720) crop (164,565,1280,720)
show jed counter # fix jed counter sizing
show saloon_counter_day:
size (1280,720) crop (164,565,1280,720)
with Dissolve(1.2) # need to fix jed counter thing
return
label saloon_to_sheriff_day:
scene bg town:
size(1280,720) crop(1047,31,1865,1049) zoom 1.6
linear 6.0 size(1280,720) crop(2454,486,1280,720)
return
label black(trans=Dissolve(1.2),p=.8):
scene black
\$ renpy.with_statement(trans=trans)
pause p
return
Use in-script with call and scene/show!
call black(p=1.4,trans=glasswool)
scene bg town_saloon_day with w9
# play sound bird chirping
"He didn't say a word to me, and I had to hurry to catch up."
"I wasn't sure where I stood with him - or what kind of mood swings he was having - but I resolved to do my best to be professional."
"That way at least he couldn't have no complaints."
call saloon_to_sheriff_day