A DEN Postmortem #5 : Diary of the devs

Here is the fifth and last article of the series devoted to the creation of DEN.

This one is witten by Lucas Curci, director of Kilosaurus and main developer on the game, right after the end of the Ludum Dare #38 Game Jam.

This article is dedicated to the development of the game.

Den postmortem #5 : Development

The concept was to have a character that moved like a snake, with a large body and compression mechanisms. Like a long softbody which compresses itself in tight spaces and expands when there’s enough room.

Rig

We quickly agreed on a procedural rig made in Unity. A set of Gameobjects linked together and moving according to the head.

At first we tried a mechanism based on physics, using physics joints. But the feeling was not there, the bones logically didn’t following the path of the head but were just dragged like a rope. So we choose to register past positions and orientations of the head, and make every single bone take that path one after another. We enqueue previous positions based on displacement distance.

pm51

The white dots are the bones of the beast in this pic, and the video here illustrate the past data saving.

In every grey dot of the video, we saved position, rotation, velocity and pass time of the head. The positions and rotations of the bones of the beast are then linearly interpolated between the past data points. Interpolated because we needed the bones to be placed at any custom distance of the head, due to the design of the beast.

Beast body compression

We wanted the beast to have a pseudo-soft-body reaction to its limited space, to emphase the closed space.

Before the final beast design was acted, when the beast was still composed of a few large body parts, we created the body compression by scaling the sprites. Every single bone were using raycasts, like antennas, to seek the dimensions of the space forward and determine how much a body part should shrink. This solution was dropped when the final design made of multiple small independent round parts came out.

To get the final compression and decompression effect, we finally attached every part of the beast to one of a procedural bone of the rig by using slider joints.

We could then play with the system 🙂 . And sadly for me the giant snake fox dragon didn’t make it to the final game 🙁

pm52

You can watch a video of the result here

Den-Title screen