How “Writhe” was made/Post-Mortem

Posted by (twitter: @DragonXVI)
August 28th, 2015 1:12 pm

Squidward Tentacles

So, 48hrs from scratch… How? And what went wrong? Answers inside!

Initial Faff

The “You are the Monster” theme wasn’t my favorite of the bunch out of the last themes, but I quickly thought up two ideas.  One where you play a Dragon flying about an overland, burning down towns, eating things and generally mucking about.  The other some kind of squiddly tentacle monster that can only navigate by grasping onto parts of the level and pulling themselves closer.

First thing, as always with Jams, was thinking about the actual design process while whipping up some pixel art for the level.  Quickly spitting out some basic pixel art is something I’m still learning, but reasonably competent enough to get results I’m ok with quick enough. – Always room for more practice!


You can tell you’re in space because everything glows

In fact, here’s a slice of most of the tiles in the game:


Note the ‘Burp’ effect which I didn’t get time to implement. It’d appear shortly after eating a scientist for a bit of comedy


I’ve recently been experimenting with Rotorz Tile system for Unity in order to help speed up level design (at least until Unity gets proper Tile system support).  So far it’s been a doddle to use with only a few minor annoyances, but for whipping up retro style Jam stuff it’s fine.  This time, I also plugged in a number of Unity’s basic features, in this case the lighting engine (Done by simply making Unity ‘Sprites’ use a material that supports lighting or writing a custom shader) and the ambient occlusion for the solid wall edges (To give a bit more definition between the walls and background) – done by adding this component to the camera and simply having ‘depth’ between layers, like so:


The actual Unity Scene layout in 3D

( For better examples of 2D pixel art with modern lighting in it, check out Anton Kudin’s MegaSphere & Whole Hog’s Full Bore and probably loads more )

The Tentacles

I’ve also been lookin’ at some decent ‘rope physics’ setups for various side projects, and figured I’d use something like that for the tentacles.  The idea is fairly simple for anyone familiar with Box2D or Unity’s 2D Physics (Or even 3D):

  • Create an object, representing the ‘Anchor’ of the ‘rope’.  Give it a rigidBody2D component (optionally mark it as Kinematic if you don’t want it to move)
  • Create several ‘nodes’ and on each, attach a rigidBody2D & a springJoint that connects each node to the previous node’s rigidBody.  You can tweak the spring values and distance & also the rigidBody’s mass & physics values based on the characteristics of the ‘rope’.  The more ‘nodes’ you use with less length between, the more smoothly defined the rope.
  • This creates the physical representation of the rope which will swing about when you move the anchor around.
  • To render it, simply use Unity’s LineRenderer and have a vertex position at each ‘node’ of the rope’s transform.Position.  For the tentacles, the endWidth is thinner than the startWidth so that it tapers to a point.
  • To get the ‘Writhing’ effect that each tentacle has in the game, each node simply adds a randomised directional force to itself so it wobbles around.  The tentacles also have different masses & gravity values so some tentacles spread upwards instead of down.  Similarly, when overlapping the lasers, a larger force is pushed on to the nodes so that the tentacle shakes away from the source like it’s just been burned.
  • The ‘Grabby’ tentacle works the same way, but effectively just positions the last node kinematically instead of letting it dangle based on it being shot out a set distance from the player.
  • In the source, you’ll find all the meat of the ‘rope physics’ type in the JamChain component.

Here’s a representation of what this all looks like in game.


Each node shown here connected to each other and with a CircleCollider2D attached. The red blob at the top is the ‘Anchor’

Note the nodes use CircleColliders, which causes the problems of parts of the tentacle getting stuck between the nodes like on level corners and in geometry.  A better solution would be to more accurately model the shape of the tentacle with boxes/edges or a custom mesh, but the circles were a good enough quick result going forward.

The ditching of the initial concept

The original idea was you’d only be able to move by reaching out your tentacle to grab and haul yourself.  After prototyping this and trying it for about 3 seconds it became pretty annoying, so I ditched it in favor of just simply moving around in 4 directions.   I might’ve tried doing it so you grab a tentacle and then ping it around like some kind of elastic crazy-golf obstacle course, but that would’ve probably been just as annoying :p

The simple movement mechanics meant I had quite a bit of time to add various features to the game, so over the two days the idea of eating scientists and avoiding various cliche platform game obstacles took shape.


Early version of level 2. Note the ‘Tiles’ material actually uses an emissive channel, but only for the edges of the ‘hot’ surfaces and some of the Antigravity panel glow.


The Boss


The lovechild of a Timberwolf Battlemech and a Giant Squid.

Because of the simple nature of the game, most of the content was whipped up quickly with the levels.  I had a bit of time to create a simple Boss enemy that would act as the finale.  In my last jam game the boss of each level was similar to the laser turrets in this game, and indeed this boss has a few similar simple logical states (Track player -> Charge weapon -> Shoot weapon) because they’re conceptually easy to do.  This guy has a few more states though, which’re simply:

  1. Wobble up and down few N seconds (Speed of wobble determined by remaining health)
  2. Shoot turret laser in the direction of the player (Rate of fire determined by remaining health)
  3. Charge up Missile launcher
  4. Fire Missile at player (Speed of missile determined by remaining health)
  5. Wait for Missile to be destroyed
  6. Back to 1

The missile logic simply has 3 things.  If it hits the player, you die.  If it hits a wall, it’s destroyed.  If your tentacle hits it, it turns around 180 degrees and marks it as ‘flipped’, at which point it can now collide with the Boss.  When it does, it destroys itself and reduces the Boss health by 1.  After 5 hits, the boss is destroyed and the GameLogic treats this as the Player having reached the teleporter, which in turn ‘Loads’ the next level, which in turn ends the game.


The Music

I’ve had plenty of practice of whipping up music quickly now in FL Studio that getting some quick loops in the game wasn’t too difficult.  Eagle…ear’d (?) listeners might spot some Super Metroid instrument samples snuck into the music.  Given the idea of an alien creature sneaking about a station devouring everything I figured it was nice reference for anyone that managed to catch it :p  There’s also a lot of B-Movie Theramin-esque stuff going on too.


What I’d Change for next LD

  • This one was fairly ‘safe’ – movement was basic, and it didn’t really hit any innovation points.  As a straightforward ‘game’ it’s got a fair bit of content to it but I wonder if it’d be better to have aim for more original quality > quantity.  This game’s unique mechanic (The wobbly tentacle grabbing) lent itself to setting up some fun grabbing/pushing physics puzzles, but there’s none to be had.
  • Despite saying “No physics this time!” I’ve done yet another 2D-With-Physics game and still hit the same problems :p




  • Visual Style wise I seem to end up somewhere between “Low Poly pixel art” and “High rez particle effects” which often looks a little abrasive.  Take the above shot: The objects and background tiles use only a few colors, but the particles and the space background use much more.  While I’m unlikely to reach a Managore or Deepnight level of visual style any time soon, I should aim to try a bit harder at consistent art design, particularly when aiming for a more retro look.
  • I’m tempted to do a dev stream next time, but it’s literally staring a code for 2 days… Maybe a Timelapse is a happy medium?
  • Instant Death Pixel Perfect obstacles? No, just no to all of that.
  • I haven’t made a rhythm game for LD yet? I should fix that immediately…

Overall feedback so far has been pretty positive (Yay thanks everyone! 😀 ) and folk’ve managed to complete this one despite my awful level design that’s full of impossible pixel-perfect instant-death obstacles.  Always room to improve!

Anyway.  Next jam I’m likely to do is the lovely #ProcJam – It’s a bit more experimental, and last time I made a procedural murder mystery.  After that, might give Dec’s LD a go if I haven’t melted into a puddle by that point.  Till then!

  • DragonXVI

3 Responses to “How “Writhe” was made/Post-Mortem”

  1. zuurr says:

    looks cool. i also went for a tentacle effect this time (plug: ), which ended up looking similar, but it sounds like we went for totally different implementation techniques (and gameplay)…

    you are better at art than i am, and have much richer backgrounds. i suspect your enemies look better too but cannot see from these photos. i also like that your tentacles collide with the walls (mine do not, largely because i wasn’t sure how to best handle the gameplay, although i do not know if i would have had time even if i did).

    i’ll reserve all judgement on anything else though until i can play your game (i am at work now, but have bookmarked it so that i can play it when i get home).

  2. adamwoolridge says:

    Brilliant and useful write up! Thanks, and great work!

  3. massivegame says:

    We loved your game. Can you teach us how to make a laser like your game or post your source code to download?

    Thanks in advance.

Leave a Reply

You must be logged in to post a comment.

[cache: storing page]