Spent four days recently smashing my head right into a brick wall. Why, you ask? Because I wanted our animation system to be 10% better.
Warning: Coder geekspeak ahead.
By default, Renpy has no transition between emotional states. Character is happy, one frame later, character is sad. It’s a hard cut, a jump cut. But I wanted a little soft dissolve between changes in emotional states… not much, maybe even a quarter of a second, but something to smoothly transition rather than leap from state to state.
And Renpy provides! There’s a configuration setting for a default emotional transition. But… it also pauses the entire game while that animation plays. Causing the namebox, side image, and text to all disappear for that split second while it’s busy doing the soft dissolve. The whole UI flickers while it goes about its business… and that negates the entire exercise (a smooth transfer between emotions) with a distracting visual glitch.
At first I figured: This can’t be right. Maybe I’m just overlooking a setting, a trick, or something other Renpy authors know. But nope, after scouring the community for help, it seems this is just how Renpy works — transitions always halt the game engine for the duration.
This would not stand.
So I spent four days trying to figure out a way around it. I studied other visual novels… all of which either used hard cuts, or swallowed the glitch. But one, a free VN called Juniper’s Knot, worked exactly how I wanted my game to work. And on studying it, I figured out why.
The trick? Every time they change emotional states, they hardcode a soft fade between two frames of animation, the original state and the new one. It’s clunky, but it works, it tricks Renpy into doing the shift in the background.
But doing this requires you to tailor an animation for every single shift, noting the two states by hand, rather than rely on a subsystem to do it for you. And try as I might, I could not code a subsystem to auto-detect the original state and shift to the new one. After four days, I was DONE with this mess, and decided to just use the hardcode.
TL;DR, the final results…?
…look damn good. Takes a lot of work. And retrofitting scenes takes a lot of work, so the November build will only have a bit of this work done. But in the end… this subtle effect adds a lot to the experience. And we’ll endeavor to apply it across the whole game, workload be damned.
It’s only 10% better, sure… but that’s a critical 10%. And I made up my mind ages ago that my first game would not be a timid little thought experiment, or a low-risk outing. I would go all out, and do my absolute best.
One day, I’ll get business cards reading “Fiction Factory Games: We Have No Idea What We’re Doing But We’re Doing It Anyway (Because It’s Fun.)”