Ludum Dare 44
I've been wanting to write about my second ludum dare game since the jam was over, but laziness got in the way. Looking at the bright side, talking about it now gives me an opportunity to review the code and game after forgetting all the specifics. The theme was "Your Life is Currency", which in my opinion is a trash theme.. I guess that's the curse of actually being invested in and voting for themes. I didn't want to take the obvious route of tying a characters health to purchasing upgrades, so instead I tried to make a game about someone whose life is all /about/ money. As usual, I used the one and only pico-8.
Design
This idea lead me pretty quickly to the main gameplay concept of balancing multiple types of funds. Originally this was themed around the stock market where you would lay down different stocks that would attract different traders, kind of like a tower defense game. Honestly, looking back now I think that idea has more "fun" potential than what I ended up with, but time constraints of making it work made me switch to the simpler idea of giving the stocks directly to the person.
This gameplay change didn't jive as well with the stock market, so I decided to shift to something we all love.. taxes. I like to base my game around a "thesis statement", so I eventually landed on..
As a government worker you live by the dollar. more specifically, you live to blindly give that dollar to any person who falls out of the sky!
Try not to read too much into the political nature of this, it's meant to be pretty tongue and cheech. The story serves the gameplay, right?
Code
The core gameplay was honestly pretty simple to program, so that gave me time to add some nice "juice" to the game. I'm particularly proud of how the civilians fall from the sky and hit the game board with a satisfying thud (I used the screen shake method described in my last ludum dare blog).
Unlike my first LD game, this one has full animations. I used this animation function to get that done.
o={ as="idle", -- state sp={ -- head idle={64,65,65,64}, run={64,64,64,64}, }, sp2={ -- body idle={80,81,82,83}, run={80,66,80,66}, }, t=0, -- tick f=1, -- frame s=4, -- step } function animate(o) o.t=(o.t+1)%o.s --tick fwd if (o.t==0) then o.f=o.f%#o.sp[o.as]+1 end end
It's actually pretty expressive for how short it is, allowing multiple animation states and adjustable animation speed. I "hacked" in multiple tiles per character by tying the animation of sp2 to the state of sp1. Looking at the code now I would expand the =animate= function to handle any number of sprites lists with unique length, something like this object:
-- UNTESTED!! o={ a={ -- animation state s="idle" -- state f=1, -- frame s=4, -- step spl={ -- sprites lists idle={ { -- head f=1, sp={64,65,65,64}, }, { -- body f=1, sp={80,81,82,83} } } } } }
You can check out the games source code for yourself here.
Music and Art
For the music I tried to recreate the feel of elevator music, because it just felt right for a game about a guy holding a briefcase. I wrote 2.5 songs, one for the title screen and one for gameplay with a short game over fanfair. Although I'm really happy with how all the music turned out, I think only the gameplay track actually captured any of the Bossa Nova feel of elevator music.
As for the art, it was pretty par for the course for me. If I had had more time I would have liked to revisit the main characters run animation, and the currency display UI on the left.
Last thoughts
I'm already looking forward to the next Ludum Dare.. Though I hope we can pick an actually good theme for once! Some goals I have are
- Enhance the animation function I talk about above
- Plan out the memory management of the sound effects and patterns ahead of time
- Make more art! (I used barely half the available sprite memory)