Posted December 04, 2017 by mkosler
##postmortem ##ludumdare ##ldjam ##ld40
A new quarter, a new Ludum Dare. They seem to sneak up on me these days, with how hectic the world is. Luckily I follow quite a few gamedevs and past Ludum Dare participants, so eventually the word broke through about Wednesday of last week.
# Framework
I had been going back through Programming in Lua, 3rd Edition, because I really wanted to look into creating my own little engine. Even though I probably could have rushed to put some simple API together, the thought of having to debug both the game logic and the engine logic in the middle of the competition was terrifying, so I juggled a few different options:
I ended up using LÖVE simply because of familiarity.
# Idea
I loved the theme this time, and pretty quickly got together my idea. It started off as paint mixing. You were given an order for a certain color, and you had some amounts of primary colors to mix together to try and get that color. I ran into a couple of problems with this.
So, even though I had cool idea, the actual game behind the idea wasn't panning out. So, at about 8 AM Saturday, I switched out some key pieces. Rather than something so abstract as colors, how about you are a cook in a soup kitchen? I've been eating a lot of phở (Vietnamese noodle soup) lately, and you end up adding your own accouterments to the soup after it comes to your table. Drop in a few basil leaves, some bean sprouts, a splash of lime, some Sriracha and hoisin sauce. It takes the same concept of the paint/colors idea, but makes it more relatable. Additionally, the balancing colors mechanic was proving too difficult to nail down, and impossible to generate on the fly, so I switched it for levels that would decay over time rather than by use of other seasonings.
I ended up settling on a few other things about halfway into Saturday: I had with the colors idea six different primary and secondary colors: red (0xff0000), green (0x00ff00), blue (0x0000ff), yellow (0xffff00), fuchisa (0xff00ff), and aqua (0x00ffff), and was going to translate that to my soup idea, but I ran into a snag. I only wanted to choose 3 out of that selection, but ran into issues getting the generator to guarantee full representation of the spice categories (spicy (red), salty (green), and acidic (blue)). Even when I fixed the generator, the secondary options (yellow, fuchisa, and aqua) felt unnecessary. So I scrapped the secondary options and just went with the primaries.
# Development
Once I settled on the idea, it ended up being incredibly simple to implement. Mouse movement for controls. Point in polygon detection. Super simple. So I decided to spend more time working one of the things I always neglect: a proper tutorial. It makes sense most of the time. You need all of the weekend just to develop and put together art for the game, and at the end of the competition, you slap a few screenshots together, write some controls in your submission post, and hope that does the trick. But if the game concept isn't immediately apparent (a platformer, a shooter, something like that), your game suffers greatly. People just give it about 10 seconds and then move on because there's so many games to rate.
I wanted the tutorial to actually walk you through the game, so I ended up integrating it heavily with the actual Play game state. Luckily, there's a fantastic set of libraries for Lua called Hump (http://hump.readthedocs.io/en/latest/) that has a stack-like gamestate. So basically would push the Tutorial gamestate on top of the Play gamestate, register a bunch of Tutorial signals to replace the normal Play signals, and then work from there.
# Conclusion
I really think I made a nice, simple, but fun, game this weekend, and hope you all enjoy it.