Clouded Writings - On coding and animation


Hi! This is a postmortem to this tiny little project I did for O2A2, and my first ever submission for any jam ever! I wanted to do this post to let others know about my experience making this game, particularly focusing on code and animation! Spoilers for the game ahead!

My main animation for this project was the one allowed sprite, so I decided to spruce it up by giving some life to it. Welcome Astiom, the deity of Fate - five separate layers with fully drawn graphics underneath each element, so that during animation no corners stay uncoloured/unfinished. I popped the PSD file into Dragon Bones Pro and started assigning bones and physics and animating the figure!

[Astiom's sprite with all the separate layers moved and contoured with red to show separation. On top of its sprite I drew a carcass of what I wanted the animation points/bones to look like. The writings on the image say, "36 frames, 24 fps, different layers, bones are marked as triangles with a small circle at their base"]

Of course, I also added a white gradient so that the transitions to falling down the clouds would look more natural. In the long run, it also made Astiom seem more ethereal-looking, the aerial perspective working delightfully well on itscape.

At first, I wanted to go overboard and have it gesture with animation and have a grandiose full fledged animation, but the file size started reminding me of my goal of not making this game too big. So 36 frames it was, and the sharp movements didn't make sense anymore, so I cut it to smaller gestures and its features and clothes reacting to the environment. Here's the results!

[GIF image of Astiom's sprite moving, 24 fps, 36 frames, on white background]


I exported the files as a sequence and was faced with a problem - in Ren'Py, you specify animations by making a small pause between two or more frames, and I was a bit puzzled until I figured it out - just divide 1 by 24! (pause 0.42 between frames was the perfect fit!) The process of writing in a sequence was tedious, and involved lots of copying and pasting, but it was the only process I knew from the documentation and videos, so I had to persist.

Happily enough, I'm glad I did an animated sprite! But it was only the first of the graphics I did for this jam. The second one was the allowed object, and I had to make it a paper! A manuscript of sorts, where Astiom would write the story with the player.

Animating it took several tries, as I had to gauge where should I put it with xpos and ypos statements, but after that, it was only a matter of putting an animation statement and having some linear/eased movements on the y-axis. (It now gently flows up and down!)

Another challenge was the "Brave Story" ending, where the paper is supposed to transport the player into the world of the story they made. I had fun figuring this out, because I was already familiar with the "zoom" transform, and reloading the game tens and tens of times to see if I aligned the paper just right to cover the entire screen was way too much fun!

[The code block I wrote states that the paper eases and enlargens (zooms) a bit, moves to the center via xpos-ypos manipulation, and then does another animation where it zooms x24 and adjusts just a bit to fill the entire screen. Works well!]

Last but not least in the coding department - endings! While working on another project of mine - Directive 66 - I discovered the screens feature and immediately replicated the same effect in this game. But the problems came in when I wanted to tell the player how far along they are in the gameplay. Namely, I wanted to count their endings, without doing so twice if the ending was already received. I knew of the sum() statement, so I used it at first, but the problem was that it didn't update when the player received an ending. Instead, the sum would go up only in the subsequent playthrough.

I combatted it at first by adding a +1 to the endcount whenever a player received an ending so that it would count it, but when I got the same ending, I saw that my approach was flawed and took a different direction. I created an endcount that was persistent, and only increased when the ending was obtained for the first time.

[Having a persistent endcount seriously improved my understanding of how the variables work and the fact that I really need to have variables if I want to do a specific thing. It is an endcount, after all, and it does its job well.]

And that's how this project came to be. I learned a lot from this simple thing, which turned out a bit more advanced than I'd expected, noting that I'm only a beginner at coding.

If you've read this far, congrats! This is the ending of this postmortem. I urge you to play Clouded Writings yourself and see if you could obtain all the endings :) Thank you for reading and goodbye!

Files

Windows Version 48 MB
Jul 28, 2023
Mac Version 53 MB
Jul 28, 2023
Linux Version 41 MB
Jul 28, 2023

Get Clouded Writings

Leave a comment

Log in with itch.io to leave a comment.