A couple of weeks ago I participated for the fourth time in Ludum Dare, an 48 game jam run by the awesome Mike Kasprzak. Go support him on Patreon!. The result was Vac ‘n Smash, a game about vacuuming up junk, shooting robots, and recycling.
I’ve organized this post-mortem as a running commentary, interspersed with some playable progress snapshots from the game. These were generated by winding back to selected moments in the project’s Git history and building the game as it existed at that point in time.
- NOTE If you are using Chrome, the Unity plugin has been affected by some recent changes in Chrome and will no longer function by default. A workaround is to enable NPAPI plugins in your Chrome settings. Click or Copy/paste this URL in to a tab: chrome://flags/#enable-npapi
Day 1 (+0 hrs): Theme announced
The theme for this jam was ‘An Unconventional Weapon’. I had looked at the 20 shortlisted themes the night before and made some notes about possible game ideas, but hadn’t considered this one at all. Unfortunate! Spent about an hour trying to think of a good game concept. Tentatively settled on a ‘randomizer gun’, a cross between a poker machine and a weapon. The gun would have 3 dials, each controlling a different aspect of behaviour. For example, the first dial might have entries like ‘Mighty, Slow, Tiny, Huge’, the second ‘Double, Bouncy, Reflecto’, and the third ‘Rabbit, Baseball, Tomato, Vortex, Cat’ etc. So by pressing the Random button you might get a ‘Mighty Double Cat Cannon’ or a ‘Tiny Bouncy Tomato Launcher’. The player would get powerups that would let them press the Random button. Well, that was the idea at least. I hadn’t really thought about how much work that would mean.
Day 1 (+7 hrs): Basic player movement
The first thing I did once I had a basic game idea was to paint a hero character, then sliced it into pieces and created a spritesheet. Next was putting everything back together by building a 2D animation rig in Unity. Once the rig was assembled, I started coding up a player controller script. This converts control inputs from the player into forces that are applied to the character’s physics simulation. I continued to play around with player movement for a few hours, implementing jumping and tweaking physics settings. It’s surprisingly difficult to get a good control feel when you drive player motion using the physics system.
Day 1 (+12 hrs): Parallax Background
After a while I tired of messing with the player and decided to add some more graphics to get motivation levels back up for the next day. I was really keen to try out 2D parallax scrolling, and ended up spending a number of hours creating a moving background layer. This stage was a lot of fun, but I think I got tired and spent too long here. I ended up using a perspective camera and placing the background elements at various (+Z) distances from the camera. This technique gave a nice convincing parallax effect, but was a bit inconvenient to edit. Called it a night about 1am local time.
Day 2 (+22 hrs): Vacuum Gun
Woke up the next day and realized the Randomizer Gun concept was probably going to be too much work. I ended up deciding on a Vacuum gun instead, can’t remember why though. Perhaps I thought it would be nice and simple to implement.. :) I guess that was it, as the basic gun system didn’t take too long to get up and running.
I implemented the Vacuum gun by taking advantage of Unity’s 2D physics system. For Intake mode, all that was required was to identify nearby objects by casting a circle away from the gun’s muzzle, then applying appropriate forces to those objects at each physics simulation update. I made the applied forces diminish over distance, which gave a nice feel to the gun. A circular trigger area at the gun’s muzzle detected when objects entered it, and ‘captured’ those objects by hiding and disabling them, adding them to an internal tracking stack. Exhale mode was a pretty straightforward projectile setup - pop an object from the stack of captured items, place it at the muzzle’s position and give it a large initial velocity to kick it towards the target. There was a fair bit of tweaking to do after that, but the basics were in place to smash stuff up!
Day 2 (+26 hrs): Breakable Robots
The Vacuum gun was pretty fun to play around with, but there was nothing to shoot at yet. This is when I came with the idea of robots that you could smash into parts by firing junk at them. You could then use the robot parts as more ammo for your gun! Seemed like an interesting plan, but I wasn’t sure how fun it would end up being.
The initial implementation used 2D hinge joints to tie everything together. This gave nice results when breaking the robot into pieces - simply destroying the joint component did the trick. However, there were a few issues that forced me to try a different approach. Firstly, I couldn’t easily make the robot change it’s facing direction from left to right. For the player I just flip the rig’s X scale from +1 to -1 when they face left, but doing this to the robots made all the hinge joints completely freak out. Secondly, it looked like it was going to be tough to animate - I would have to apply torques to joints at appropriate times to make it move properly. I ended up ditching joints and directly animating the robots, same as the player. Bit of a shame, but it saved some time.
Day 2 (+32 hrs): Music
Once the first robot was up and running, I whipped up some music in Garageband. This is one of the highlights of the game jam for me, as it’s a rare opportunity to get away from coding. Of course, I almost immediately started feeling worried about all the stuff left to do, and rushed through the music creation process as quickly as possible. I would like to allocate a bigger budget for this phase next time around.
I started by messing around on the keyboard looking for a catchy hook, added a few drum layers, then a bit of subby bass to thicken things up. That was pretty much it! I usually go with 120 bpm because it makes setting up seamless looping super easy. Also, visual effects set to run at 1Hz or 2Hz feel properly synchronized with the music.
Day 2 (+36 hrs): More graphics!
Fatigue was seriously setting in at this stage. I decided to relegate all remaining gameplay stuff to the final day, and focus on getting some more 2D artwork ready to go. This was nice and relaxing - just set some music blasting, gulp down endless cups of tea, and paint away. Not too much brainpower required!
Day 3 (+43 hrs, T-5 hrs): Victory condition
When the final day dawned, I realized that most games have a victory condition and a failure condition. This one had neither, yet. After a brief panic session, I decided to make the game about recycling! I mean, who doesn’t like vacuuming the house and collecting up trash? I quickly whipped up some recycling dumpsters, then coded up some logic around collecting the robot parts and shooting them into the dumpsters. Job done! In the final frantic rush, I neglected to add clear instructions about how to win the game. Oops. I did add some signs to that effect, but in hindsight they are too subtle - most players seem to treat them as background art and filter them out. A lesson for next time - always put clear instructions in the game!
Day 3 (+48 hrs): Submission
This one went right down to the wire. There was a last minute problem with exporting the Web player build, probably due to a beta version of Unity. Managed to get around it by installing Unity 5 and building from that instead. Luckily the automatic project upgrade went very smoothly. I created a quick logo in the dying minutes and captured a few screenshots, uploaded to itch.io, and crossed my fingers. The Ludum Dare site stayed up throughout submission hour - big props to Mike Kasprzak for his recent work there. When the game was finally submitted, I crawled into bed in the middle of the day and promptly fell asleep. Good times!
I really enjoyed the jam this time around, and am pretty happy with the end product. There are still a lot of things to work on though:
- Coming up with a solid game idea up front, and taking time to explore the design space.
- ‘Snappy’ control feel (it still eludes me!)
- Allocating enough time for level design.
- Spending more time on music.
- Teaching players how to play directly in the game.
Oh well, should be fun next time around. See you then..