Slam Jam Bakery: Post Mortem + Devlog

Posted by (twitter: @DragonXVI)
April 21st, 2015 4:17 pm

Another weekend burnt at the altar of Ludum Dare, another 48hrs of furious arting, coding and swearing at physics engines. Interested to know how development of SJB went? Read on!

I think it needs more particle effects…

Day 1


Humble beginnings

SJB is a sort of fusion of two very rough ideas I toyed with for potential previous LD themes that didn’t make it. Namely, using jam/liquid as a weapon, and destroying a large airship from inside then escaping before it crashes.  Combining these two ideas pretty quickly, I spent the first part of day 1 furious pixel arting up some tiles for basic ground and bits of airship.


The sprite sheet used for the level maps. With a bit of space to spare… Spot a few unused assets such as the electricity box and the horizontal engine thing.

After that I spent a ridiculous amount of time animating up the main character.  For some reason I’d decided to give sort’ve tweening, skeletal animation a go, instead of a quick 4 frame walk cycle.  Sile, the character you control, is therefore made up of various bits I can move about to create animations.  She’s only got 4 animations in the end – Idle, Walk, Jump and Fall, with her right arm being entirely controlled by the game input for aiming.


Dismantled Sile in all her sci-fi blue-skinned slightly-Goth-baker glory.

The Jam + CRT Effects

The jam was a surprisingly quick and dirty effect which has been documented all over the place.  The idea is you have lots of little physics rigidbodies using circular colliders, like this.


Lots of circular blob sprites tumbling about in Unity’s 2D physics

The gun spits these ‘particles’ out and they’ll grow big, hang around for a bit and eventually shrink down and disappear again (so the jam doesn’t stay around forever which would very quickly kill the game)

You render just those blobs to a screen-sized texture, where you can apply post processing to it.  In this case, we blur ’em , fiddle with the colours and add a darker layer behind it for a bit of an outline, and get this:


And that’s all there is to it!

So that’s the jam effect. You can play with the friction and bounciness, lifetime etc. of the jam and get all sorts of fun effects.  Up the bounciness to create some kind of liquid rubber, or have it float slightly and make it red/orange to create a kind of flamethrower effect.  (I know it doesn’t exactly behave like sticky jam, but that would’ve been even fiddlier to get to work in the time frame :p I’d end up with a room full of jam physics and no game!)

The CRT effect (You can read up on the method that I was inspired by but didn’t strictly follow on this site here) just uses a collection of basic texture layers & Unity image effects.  We  take a 256×224 render texture (The basic resolution of the SNES, for those interested) and draw our game to that so all the pixels look correct.  Then we add a few things like subtle noise and vignette.


Granted, doesn’t look much different from the last one.

We then take this output texture and draw it to a big quad, and shove some scanliney-pixel texture in front of it, and a highlight.


Oh great now I can’t see anything.

Yeah, that’s a bit dark.  So the last thing we do is add some color correction to boost brightness and saturate it a bit (for that harsh, retro look), add some bloom…


Hmm. It’s missing something…


Fisheye lens for the ‘curved monitor’ display

Here’s another early shot of progress on day 1, with more fiddling of the CRT effect (I had to change the background color in the ship because it was waaaay too dark).


Looks a lot more alien and less cartoony at this point


The Levels

I use the 2D Toolkit  for some features such as basic sprite animation & Tilemap functionality.  As with many assets and libraries, it ain’t perfect and it does a lot of things I don’t like, but didn’t want to spend the time writing m’own tilemap editor in Unity when there’s plenty available elsewhere :p And it held up mostly ok apart from a few little niggles.


Level 1’s overall layout

Each scene consists of two maps.  The “World” (The ground you run along initially) and the “Titan” (The airship) which moves along the screen towards the left edge. The big box around the airship represents a volume where, once inside, you’re considered part of the titan and attach to it so you can slide along with it and the physics works properly.  The only thing that doesn’t do this is the jam particles, which is why they slide left when you’re inside, because they’re staying put while the ship moves left.  It’s also why if you stand in the top area, or behind the ship, the game still thinks you’re inside and will slide you along.

A fairly rubbish way to do this :p But I needed a quick solution and this worked well enough.  Remember, a good jam game’s code is held together with hacks, ducktape and the dreams of kittens.


Level 2’s ridiculous map, complete with shortcut at the top right that unlocks when you destroy the gears by the door in that area.

Level 2 introduces the new mechanic of the conveyor belt.  I wanted to add a few kind of typical arcadey elements to the game such as moving floors and crushers, but I just managed the conveyor in.  These are RIDICULOUSLY buggy for various reasons, and after a lot of fighting with Unity’s physics (Oddly the Surface Effector which ideally does this sort of thing for you worked fine outside the ship but broke when inside the ship) I got them sort’ve working.  You’ll notice they never push you off a platform, as each edge ends with a solid tile – This is because they have no collision on the left or right sides.  And you stick to them too when the collision volumes get stuck on the edges.



Day 2 & The Boss








Well I figured I’d get another massively additive-blended laser beam in here 😛

The original concept was you’d destroy some kind of ‘core’ which would trigger a self destruct.  Wasn’t really sure what such a thing would look like so went for a sort of high-powered laser weapon – The idea being this is the main thing it’ll use to destroy your bakery, and if you overload it with jam it’ll cause a chain reaction and destroy the whole ship.

Its logic is pretty straightforward.  It has 5 states:

  1. Idle
  2. Targeting player (When you get close enough and it’s idle)
  3. Charging laser (After N seconds of targeting)
  4. Firing laser (After N seconds of charging, then go back to Idle)
  5. Detonating. When destroyed.

Simple logic.  Shove its weakspot (Supposed to be rotating gears, it’s not as obvious as I’d like. The original idea was a big glowing red gem but that made no sense to fire jam at so changed it) on its backside so it’s naturally tricky to hit, and there we go.

The Escape

The escape was a fun section.  Create random explosions, and when you detect the player has ‘left’ the ship volume, trigger a massive explosion and slow the game’s timescale down to create a slow motion effect.


Unity’s scene view at the point of a completed level. The explosion is a massive additive-blended sprite that slowly scales up, filling the screen, while the camera shakes violently.


Worked surprisingly well!


Music was done in FL Studio, and uses various soundfonts, basic drum loops, and the Shreddage 2 virtual instrument for all the geetars. The music I did around the end of the first day.  The title track was when I was trying to go for a sort’ve retro console idea, so it uses a few Megadrive/Genesis synths with a bit of heavy guitar.  It took 30 minutes to whip together.

The main in game music took 1hr 30mins to create and was a bit heavier.  At this point I pretty much skipped the Megadrive aesthetic for just whatever sounded good at the time, and ended up with some kind of heroic, symphonic, synth-metal thing, using just the basic 4 chord pattern we all know and love.

You can find ’em both on my vacant soundcloud here: complete with the silly names I gave ’em :p


Post Mortem

  • The Good
  • Game turned out ok!
  • An actual animated character instead of some kind of vehicle or spaceship!
  • Two whole levels! And a boss!
  • Jam effect actually kinda neat and fun to use. Something I hadn’t done before.
  • Pixel art’s getting… slightly better, but still need to properly work with decent palettes and styles instead of jamming a bunch of vibrant colours together into some vague ideas.
  • Quite like the music for this one, even if thematically it’s all over the place.
  • The Bad
  • Input logic’s still really buggy. Need to get better at this as had the same problem with my last LD game.
  • Still end up fighting a lot of with quibbles of Unity’s physics. Still need to figure out how to do a few things cleanly without hacking round it.
  • My menu screen and victory/game over screens are still terrible.  They’re always done last, and end up a big messy mess.  Keep ’em simple and light instead of trying to jam in nasty art. Same goes for the big tutorial dump I always have – I’d hoped to use the first level as a kind of tutorial, but that didn’t make the cut – Which is a shame as a few folk have told me they didn’t get the ‘Jetpack’ feature immediately.
  • I seriously need to maybe ease off the particle effects :p
  • The Strange
  • There’s no actual bakery at the far left :p I didn’t have time to draw it, so it’s kind’ve implied.
  • She’s not wearing a chef’s hat

A few things to take away here.  I might not use 2D Toolkit again, unless I’m missing a few things, but it was missing a few key parts to its tilemap generator that made it a little faffy to use.  Need to master a few more of Unity’s systems to make sure everything works correctly, like physics ‘n input.  Also could do with brushing up m’pixel art a bit and work with a more coherent style & colour palette instead of’s default palette which is why everything’s kinda spectrum colours :p

Hey you made it to the end! Here’s your reward! In classic 90s retro PC game style, have a MIDI of the main title screen :p

Hope everyone had fun this time. See ya’ll next LD!


Jam on!

– DragonXVI

3 Responses to “Slam Jam Bakery: Post Mortem + Devlog”

  1. bazld says:

    Thank you – thats a very interesting devlog/postmortem. ++ Really great game!

  2. TwiiK says:

    Great writeup. I think this is the game I’ve rated the highest so far. Astonishing feat to make all this in just one weekend.

    But I think you were the one who noted you used 42 hours on the game so you practically did use the whole weekend. :p

    I winged this Ludum Dare with no real experience with creating a full game. I also struggled with a lot of the the same things as you. My plan for the next Ludum Dare is to make a few solid controllers beforehand. Like a 2D platform controller, 3D first person controller, 2D top down controller etc. With rock solid input, collision detection etc. And I’m also working on a Unity boilerplate project. The plan is that this project will include everything you need or want in a game jam game or any game for that matter. Things like a menu screen, audio settings, graphics settings, credits screen, about screen, rebindable controls. Anything that just makes your game easier to play and more approachable for people, but has nothing to do with the type of game.

    I know the Ludum Dare compo rules state everything has to be created from scratch (even though I seriously doubt most people follow that rule), but just having experience with all these things beforehand would be such a massive help. When I started my game I immediately realized I had no proper 2D character controller and the official Unity ones are just plain terrible. To the point where they should be ashamed that they released them. So I just took a terrible 3D character controller I had and began removing features from it. It was such a mess and I wasted so much time on it. It was the same with nearly every other feature I tried to implement. :p

    Did you plan on spending 42 hours on the project? Did you have a proper design document before you started and knew circa how long it would take? I had no clue, but for the next one I’m planning on a 10 hour game, max. That way I’ll have plenty of time if something should happen and I won’t have to go through the absolute terrible stress I went through this time. :p

    • DragonXVI says:

      The ’42’ hours thing was a bit of a typo, I meant ’48’ but I probably spent less :p For both Sat/Sun I started around 9am and finished around 11pm, with breaks for food and a few hours break Sunday noon when my eyes started hurting :p Slept absolutely fine in between.

      I do think any programmer and hobbiest needs to create a little library of handy code and I’d doubt that’s really against the LD rules so long as it’s not created specifically for the game but more general purpose stuff like platform controllers, camera controllers and other stuff. Unity actually ships with a lot of these things as examples, but they might not be 100% what you’re after as you say. I’ve a few things I reuse (like the additive-blended sprite shader which Unity doesn’t come with by default) but mostly I rewrite everything for the game I’m working on. Might whip up some basic general menu screen framework so I can make ’em better in future :p Unity already provides a massive headstart against anyone not using a game engine though, but then this is about makin’ games, not engines or frameworks 😛

Leave a Reply

You must be logged in to post a comment.

[cache: storing page]