Sour Situation — Postmortem


Woo! I finished my first jam game on time!

For a moment there I didn’t think I’d have enough time to finish it and almost gave up but I persevered and got it done.

One Week To Go

The Black & White Jam was a two week affair which I started thinking about a week before the submission deadline.

I started designing an on-rails shoot-em-up but it didn’t take long for me to realize that the four page design document meant I had blown the scope way out of proportion.

I also wanted to do something that I hadn’t already done before and Robots, Attack! already fills that shoot-em-up genre.

So I scrapped that idea and sought out a new one.

Four Days To Go

Spoiler Alert!

I’m going to go into some detail about the game so if you haven’t played it yet, I’d encourage you to do so. It’ll only take 3 minutes.


At this point I really only had two days of actual time to work on the game so I needed something I could finish quick.

My mind went to running a lemonade stand. There’s just something about the idea of a lemonade stand that hits me just right. Back when I had drawn a short comic series one of the main characters briefly ran one only to be squeezed out by a vicious girl scout, Little Suzie.

It’s a tough gig.

What makes it tougher is a cup of lemonade classically goes for 25 cents a cup, which would be difficult to make a profit with even if it was made with powder and watered down. It’d be impossible if it’s made from scratch.

Behind the Scenes

I’ve been doing my initial design on a sheet of computer paper attached to a clip board with a pencil in hand.

I started doing this when I was making the latest cover art for Robots, Attack! and I like the free form style it provides.

Bullet lists in text files can’t do images and using a drawing program seems like overkill and forces me to be tethered to my computer.

If I don’t like an idea I just move to another sheet of paper. I always save the discarded ideas (right now they’re in a pile next to me but I’ll probably move them to a folder for later use). I may destroy them later but no real need to do that now.

Best of all, I won’t lose it in some weird directory deep within the recesses of my computer’s file system.

Anyways, I figure it would be a cool idea to show of my entire design process as best as I can.


At the end of a hard day’s work of making lemonade you’d be presented with a tally of all the lemonades sold and how much they cost, only to find out it costs way more to run a lemonade stand and a quarter a cup was way to low.

So I had the theme covered. Which was great because my first idea would have ignored it.

Originally I had thought about using the mouse to direct the action as I wanted to have the player mimic the process of cutting, juicing, and mixing real lemons.

I sketched out a flow-chart of the process of making lemonade.

I was considering two types of juicing, the citrus reamer or a lever style. I preferred the citrus reamer because that what I think of when making lemonade but felt the lever style would have been easier to understand if the idea was to replicate the motions with the mouse.

However, due to the time constraints I was under, I went with simple keyboard controls, a decision that I think worked out for the better.

Granted, at the time, the whole driving force for finishing this game was to tell a joke, so I didn’t think the way the game controlled mattered much.

Getting to Work — Animation

With the idea in place, I needed to see it come to life. I started by animating cutting the lemons.

At one point in my life I’d start by obsessing over each frame until my eyes went crossed. Luckily I’ve learned. I knew if I spent to much time perfecting each frame before the animation was complete, I’d be spending most of my time redrawing every frame.

To top it off, there’s a good chance I would have tried to make a frame work even if it didn’t look good because I had spent so much time on it already.

By working rough, I could quickly see if the lemon being cut was behaving properly.

More importantly I quickly finished the rough animation and was able to move on with the rest. I’d knew I’d come back to it, but even if I wasn’t able to, it was good enough.

You may have noticed this, but when I rotate the juicer to pour out the juice, I do two things that if I had more time I would have fixed.

First, the jaggies!

I simply took the rotate tool and spun that thing around. I only spent a little time fixing the rotated juicer when the juice is pouring out only because it’s on screen for more than one frame.

Of course in the shipped version of the game the animation stops on one of those super jaggy frames that I never cleaned up but c’est la vie.

Second, the juice’s gravity is towards the juicer until its fully rotated. In the animation, it’s only like that for a few frames and it doesn’t even look that off, but that’s not how physics works.

Of course, the more I think about it, I might have not bothered fixing it even if I did have the time. It ended up not looking out of place. It’s just really noticeable when you’re working frame by frame.

By skipping animating proper juice physics, I know I saved quite a bit of time that would have had marginal returns.

I eventually went back and fixed the roughness of the cut lemons. That was much more jarring. But if push came to shove and I had to choose between releasing the game before the deadline or having a much cleaner animation, I would have chose to release any day.

The entire game consists of this single animation that took up most of my time working on this project. Which if I were to guess was about 8 hours.

Of course, here it is in all its glory.

Coding

The code for this game is actually really simple. The animation does most of the heavy lifting.

The core game play consists of pressing the correct button to advance the animation. That’s it!

I personally love how simple it is because I could have seen myself create a much more convoluted solution at one point in my life. I would have made it a programming problem when it really was just an animation one.

I had to update my animation library (which is a cleaner version of the one I used in Robots, Attack!) to only play the animation through once and stop. When it stops, it flips a flag to let me know so I can display the next arrow.

Before I added the flag it was possible to skip to the next animation before it fully played out. Not only was it jarring, it would have broke the game entirely.

The arrow itself is an animation with each direction a different frame. I could have simply rotated the arrow, saving a few kilobytes in the process, but it was much more elegant to use an animation. More on that soon.

To manage the states I created a table that had the input key in the odd indices and the animation in the even indices. I kept a pointer that pointed to the next command and incremented it by 2 each time a correct key was entered.

Here’s an example:

local moves = {
	"right", "get_lemon",
	"down",  "cut_lemon",
	"down",  "plung_1",
	"left",  "twist_1",
	"right", "twist_1_2nd",
	"up",    "remove_1",
	---snip---

Back to the elegance I mentioned before, it was a simple matter of taking the input value and plugging it into the arrow’s animation update function and taking the animation value and plugging it into the lemonade’s animation update function.

Bam! Done.

It could have been quite easy to just smash the keys and get the right one by brute force so I added a check to ensure there was only one key press per frame. More than one would discard all input.

I had considered adding feedback and a penalty to pressing the wrong or multiple keys, but skipped it, again, due to the lack of time.

All said and done, it took me about three hours to finish the core game loop with another hour or so to add the intro and game over screens.

Packaging

Oh my…

With only a half-hour left, I couldn’t get the game to run for release.

For releasing a LÖVE game, it should be as simple as zipping up the source code and assets and combining it with love.exe.

Except that didn’t work…

It was unable to find my source code if it was in any folder other than the root folder.

I’m still not exactly sure why it didn’t work. As far as I could tell I followed the same process as when I released Robots, Attack! and that worked just fine.

In the end I zipped up only main.lua, leaving the rest bare in the directory.

No biggie really. It would have been nice to add all the files to the zip file to clean up the directory but it wasn’t a deal breaker.

I’ve been considering different approaches to how I release my LÖVE games so maybe I’ll tackle that sooner rather than later.

Submitting

With 13 minutes left, I quickly created a project page and submitted the game to the Black & White Jam.

Hooray!

I finished my very first game jam!

It was quite the rush and I’m certainly looking forward to chasing that dragon.

I did go back and add a cover image and some screenshots.

Eventually I decided to add the full animation to the page since that has been one of the more consistent positives mentioned about the game. I’m still on the fence about this one but I’m just going with it.

What’s Missing?

I would have loved to add some sound effects and some music. It’s the only thing I regret not adding to the game.

Otherwise, I got everything important that I wanted to add. I had a scene in mind where you see people lining up to get the lemonade and would have made the prep space much more detailed, but after all is said and done, it wouldn’t have made the game any better.

Lessons Learn

This was a huge accomplishment for me. I conceived, designed, animated, and programmed a game in just a few days.

I learned I could throw together a short animation.

I learned I could go from an empty project to a playable game in only a few hours.

I learned that I could do it.

If I was to take one lesson away from this experience it would be to know what to work on and what to ignore.

I’m still learning how to accept work that is good but not perfect. Purposely leaving in mistakes (that I may or may not get back to) has been helpful. I’ll approach something with the goal of making sure I leave it complete but unfinished.

When I say complete I mean it’s done and can be used. It might not be pretty but it gets the point across.

If it’s really ugly, I’m more likely to get back to it (like with the rough lemon cutting animation).

The jaggies of the rotated juicer made it unfinished, but at the end of the day it didn’t matter. Even if I publish an update, I will very likely leave the jaggies in because there’s bigger issues I’d rather spend my time fixing.

What’s Next?

This game certainly has potential but it scratched the itch I had.

Apart from a lack of audio, the game is complete.

I’ll tentatively say I’ll work on an update with sound effects and music, but that’s not a definite.

For now, I’d like to take another shot at a short game.

I want the experience of something completely new.

Spending so much time, spinning my wheels on one game, had put me in a rut. At the very least, I owe it to myself to push outside my comfort zone and tackle some different game play styles.

Get Sour Situation

Leave a comment

Log in with itch.io to leave a comment.