BUBBLES

Posted by Ben Thomas on December 31, 2019

It’s been a tough couple months since I released the prototype for Nectar of the Gods (NotG). Sometimes life just comes at you fast and you gotta take care of yourself at the expense of your hobbies. With the holiday slowdown I’ve finally had some time to get back to tinkering with NotG. I really want to focus on injecting some delightfulness features now. I spent a lot of time focusing on getting the bare minimum functionality needed to publish a prototype.

Everyone knows that BUBBLES are delightful. NotG is a game on a grid. All the action takes place on 64 squares in the center of the screen. But that doesn’t mean some environmental flourishes won’t go a long way to immerse the player. In hearthstone the cards battle on the battlefield, but different maps offer different flavorful interactions on the corners of the board that go a really long way! This is a picture of my old side panel:

staticSodaSidePanel

It’s a soda themed side panel, one of the choice sugary drinks the beetle brigade is slurping. I think it looks really nice for my abilities. It’s got a minimalist color palette, a simple soda can, and textured background with bubbles in the foreground. But as I playtested my prototype I felt myself craving something more dynamic. Something that evoked the sense of “aliveness” games can create. I decided I wanted to animate the BUBBLES to rise up from the soda can’s opening! This proved much more difficult than I imagined for my animation abilities.

The first thought is always going to be an infinite loop of bubbles. Bubbles that indefinitely rise. I created a Krita (free art software) file that was 15000 pixels high. The height of my game is 2160 pixels the pixel height of a 4K screen. My plan was to copy my giant vertical bubble stream into my side panel art file and raise the stream slowly taking animation snapshots along the way. It was extremely tedious raising the image like 50 pixels, saving the panel, then duplicating the panel, raising 50 pixels, etc. Once I got to the end I tried to connect the bottom of the bubbles back to the top to create the infinite effect. But after driving myself crazy and staying up way too late I could not figure out how to do it without an ugly “jump” in the animation ruining the smoothness. Basically I had to infinitely keep chopping up the giant bubble file and try to align everything perfectly each frame to arrive exactly where I started. And it was not working for me.

My next thought was to generate individual bubble GameObjects in Unity. A bubble could be created each second with an upward velocity and some jitter. I think this would be pretty easy to do and look the best for sure. But in my head it just seems like way too much engine/compute resources dedicated to a non gameplay element that I could just make a spritesheet animation for.

So I just settled for my looped bubble animation that’s not infinite. Which might be better than infinite bubbles because they have some space to breath. I uploaded all the pictures to giphy to create a gif for this post. Buut it compressed everything and changed colors to hell but it’s still the jist. Pretty happy with how it turned out. Check it out in gif below and the real deal in the next Nectar of the Gods update!

bubbles

This is the most helpful Krita animation tutorial I found on Youtube: "Krita Animation for Unity 2D tutorial"