March Updates

March was full of Nanoreno 2018 awesomeness, and we got our game done! Whale’s Waldo is available for your downloading pleasure, now.

I had the pleasure of working with six other amazing people, and also learning a lot of new RenPy things in the process, like ATL and transitions and getting more experience with screens (some of which I’ve detailed on this blog).

The best part was probably working with people that approach writing and gamedev in such a different way than I do. It made me think a lot about my own writing, and the kinds of things I tend to focus on, and I think it’ll make me a better writer and gamedev in the future.

As far as YAGS goes, March involved getting Jake’s final sprite into the game, and getting awesome Dan inks from my sprite artist @stollcomics. Hopefully we’ll have his final sprite soon, so I can push a new game build.

I’ve also been continuing my series of YAGS fics. There’s been a few pieces this month that I particularly like (including the background fic of Chris coming out to Janet), although the theme has seemed to be more around pre-game-timeframe backstory fics. In April, I want to divert more back into the few remaining in-game backstory fics.

Other than that, the current plan for April is to actually get work done on At First Sight. It’s going to be a busy month IRL, so we’ll see how much progress I make there.

Codes: Location Transition Screen with ATL

Another thing I added for Whale’s Waldo is transition screens. Basically, whenever you first arrive in a new location, we show the name of the location with an image of the city before dumping you into narration/dialogue.

This was my first real introduction to ATL within screen language, and it’s actually straightforward to understand.

First, we define two transforms and a style for the text:

transform gui_locdecor_background:
alpha 0.0
pause 0.2
linear 0.5 alpha 1.0
pause 2.3
linear 0.5 alpha 0.0
transform gui_locdecor_bottom:
alpha 0.0
xalign 0.5 ypos 967
xoffset 200 yoffset -400
pause 0.4
parallel:
linear 0.5 alpha 1.0
parallel:
easein 0.5 xoffset 0
pause 2.0
parallel:
linear 0.5 alpha 0.0
parallel:
easein 0.5 yoffset 0
style gui_overlay_loc:
font gui.advname_font_face
size gui.advname_font_size * 0.8
color Color(color=gui.advname_font_color,alpha=0.75)
kerning gui.advname_font_kerning * 1.3 text_align 0.5
xalign 0.5
yoffset -15

The first of the transforms will be used for a background behind the text, so that the text shows up nicely against any background. This simply fades in the image over 0.5 seconds, shows it for 2.3 seconds, and then fades it out again over 0.5 seconds.

The second of the transforms is for the text, so it scrolls in from the right, shows for a few seconds, and then drops down the screen as it fades out. You can follow the AT directives pretty straightforwardly, except note that any parallel lines will execute together. So, in this case, we linearly move it left and fade it in over 0.5 seconds, pause 2 seconds, and the linearly move it down and fade it out over 0.5 seconds.

Next, we define the screen that will actually be showing the information:

screen location_info(locname):
fixed:
at gui_fade_inout
fixed:
xpos 0.0
xanchor 0.0
ypos 0.5
yanchor 0.5
at gui_locdecor_background
add "gui/place_background.png"
frame:
xsize 1200
at gui_locdecor_bottom
text locname:
style "gui_overlay_loc"
timer 3.5 action Hide("location_info")

Nothing too complicated here. place_background.png is just a semi-transparent strip that matches the rest of our GUI. Note, though, the at directives applied to each, which reference the transforms we’d defined above. Also note that the screen will hide itself 3.5 seconds after we first show it.

Finally, all we have to do is actually use the screen in the game:

scene bodo_background with dissolve
show screen location_info("Bodo, North Norway, Norway")
$ renpy.pause(3.5)
hide screen location_info
scene first_bodo_location with dissolve
"Here we are in Bodo."

The only interesting here is the explicit hide screen location_info. This is technically optional, but without it, the only way for to hide the location name is by waiting for the 3.5 second timer. This means that if the player manually clicks through the screen, or is using the skip functionality, the screen will bleed over into the dialogue, because screens are not automatically hidden on scene changes. Explicitly hiding it takes care of these cases.

And… that’s it! A super simple example, but I think it actually turned out looking quite nice.

Codes: Drawing a Flight Path

One of the things I had to figure out for Whale’s Waldo was how to animate a plane flight from one location to another. With RenPy’s powerful ATL language, this is surprisingly easy, and you can even draw the actual line without having to make a new image each time!

First thing’s first: Let’s define the RenPy displayable that will represent the actual flight line. You can do this by creating a custom Displayable class:

init python:
class FlightLine(renpy.Displayable):
def __init__(self, startloc, stoploc, **kwargs):
renpy.Displayable.init(self, **kwargs)
self.startloc = startloc
self.stoploc = stoploc
def render(self, width, height, st, at):
render = renpy.Render(1920,1080)
canvas = render.canvas()
canvas.line("#f00", self.startloc, self.stoploc, width=10)
return render

Now that you have the class, you can reuse and define instances of it for each trip you need to make. So let’s define the images for our flight from, say, New York City in the US to Bodo in Norway.

First, we need images for our plane, and a background image that is a map. Then we find the pixel coordinates on the map where we want to start and end our flight. Let’s say it’s (89,720) to (1739,150).

image plane = "plane.png"
image map1 = "map1.jpg"
image flightoverlay1 = FlightLine((89,720),(1739,150))

Now, we have all the components we need. As part of your RenPy script, simply show the necessary components with appropriate ATL transforms.

scene ny_background with dissolve
"Ready for our flight?"
scene map1 with dissolve
show flightoverlay1:
xpos 0 ypos 0
crop (0,0,88,1080)
linear 5.0 crop (0,0,1740,1080)
show plane:
xpos 89 ypos 720 xanchor 0.5 yanchor 0.5
linear 5.0 xpos 1739 ypos 150
$ renpy.pause(6.0)
scene bodo_background with dissolve
"Now we’re here in Bodo."

The interesting part here is the “linear” commands, which tell RenPy to animate, linearly, from the existing set of display criteria to the new set. We crop the display representing the flight path, starting with none of it and then showing all of it, and we move the plane from one location to another in a straight line.

And… voila!

This can easily be reused for other flights by defining new map and flghtoverlay images.

If you’re not a fan of red lines, you can easily change the line color within your defined Displayable, or even make the color one of the arguments to the class.

Also worth noting that the Canvas object is capable of drawing more complicated shapes as well, so if you have simple shapes and images, you might want to let RenPy draw them for you instead of making new images each time. Details can be found in the Canvas object’s documentation.

What is Whale’s Waldo?

Reblogged from http://whaleswaldo.tumblr.com/post/171844761918

Whale’s Waldo is coming along smoothly, and we wanted to bring you an overview of the game and each of the guys you’ll meet. (All character art is in progress.)

You play as Ocean (renameable protag) who has recently returned home to New York City after an extended time away thanks to a stress-induced mental breakdown.

You and your childhood friend, Waldo, have always communicated with each other via lovingly handwritten letters where he details his adventures during his world travels. However, your hopes of learning about his latest exploits are dashed when you find that he hasn’t sent a single letter during the entire time you were away.

Resolved to learn what’s happened to your friend, you decide to travel to the location of his last letter – Bodo, in Norway – to see if you can find him. As your search reveals no leads, you continue to retrace his steps to the Philippines and then back to the United States, to see if he’s either returned there, or if any of the locals there happen to know what may have happened to him.

During your travels, you’ll meet and potentially befriend a wide variety of animals. With some luck, and if you play your cards right, you may even find someone – and somewhere – to settle down.

Waldo (the Sperm Whale)

Waldo is your childhood friend, and you grew up together in Rochester, New York. A little more than a year before the game starts, he left to travel the world, claiming that he just needed to see new sights, experience new things, and see if he found a place he thought he fit in. You’d always suspected there’s more to it than that, and after you return home to find that his usual letters have stopped coming, you set out to find him.

Stein (the Sea Urchin)

Stein is a cold, obnoxious urchin you meet on a ferry in Bodo, Norway. He has a secret passion that he may share with you, but he can also be a bit oblivious at times. If you manage to work your way through his hard exterior, he’ll warm up to you, and you might find that his punchy candidness is exactly what you’ve been missing in your life.

Octavio (the Blue-Ringed Octopus)

Octavio is a serious, uptight octopus who has grown distrustful of foreigners and visitors. He runs a hotel in Anilao in the Philippines. If you can show him that you’re responsible and considerate, you may find that he opens up to you.

Leonard (the Leaf Sheep Sea Slug)

Leonard is a small, cheerful slug who finds the positives in any situation, but wishes that his size didn’t make him so dependent on others. Despite being forgetful, he turns out to be an excellent guide to the city of San Francisco, California. If you manage to make enough of an impression on him, he may discover that you’re exactly what he’s been missing.

Jacob (the Great White Shark)

Jacob runs a bakery in Colorado Springs, Colorado, and would like nothing more than to fatten up bring joy to all humans with his delicious treats. If you manage to avoid his more forward advances and befriend him, you may discover that you’ve found someone you can share the rest of your life with.

February Updates

Sorry for the relative silence here. Figured I’d dump a general status post here before February is over.

March is nanoreno, and I’m signed up to work on the sea life dating sim Whale’s Waldo, which should be a lot of fun, but won’t leave me much time to work on other projects, like YAGS. 

Which is probably for the better anyway. YAGS itself is basically finished, minus assets (backgrounds, sprites, and music). If you’re been following the tumblr, you’ll notice that I’ve been writing a series of backstory fics while I’m waiting on assets. My goal is to post one fic a week for as long as I can… either until I run out of things to write about, or I start ZAGS development in earnest. I’m hoping nanoreno won’t interfere with this goal too much.

And speaking of assets: There’s not much progress to report there. Jake is complete, and will be added to the game at some point, but my musician has run into personal issues, so staging music will be further delayed a bit. Sprites and backgrounds otherwise are ongoing.