Tower Blocks: Episode 4 - Falling Blocks

Published on

In Episode 3 we brought the UI to life with animated overlays and a popping score. It was our first step into polish and player feedback. In this episode we carry that momentum forward by giving physicality to failure: when a block is placed imperfectly, the overhanging part now falls, spins and disappears from view. We also improve the feel of the game by replacing the rigid camera jump with a smooth lerped transition that follows the growing tower naturally. The game now reacts and that makes all the difference.


What We Covered


Design Insights

Giving Weight to Imperfection

Previously, when you missed part of a block, it just disappeared. Now that it falls and spins, the player gets a satisfying visual response and the tower feels more alive.

This small touch reinforces:

Smooth Camera = Instant Polish

Hard-snapping the camera to new heights looked jumpy. With this change:

camera->position.y = Lerp(camera->position.y, targetY, speed);

…it feels like the camera follows the stack gently. It is a one line change with a massive payoff in presentation.


Implementation Highlights

FallingBlock Struct

We added a dedicated struct to handle active falling pieces:

typedef struct {
    Vector3 position;
    Vector3 size;
    Vector3 rotation;
    Vector3 rotationSpeed;
    Vector3 velocity;
    Color color;
    bool active;
} FallingBlock;

On Block Placement

If the block isn’t perfectly aligned, we calculate the chopped portion, spawn a FallingBlock and push it to a dynamic array.

Physics Simulation

Each frame:

block->rotation.y += block->rotationSpeed.y * dt;
block->position.y += block->velocity.y * dt;

Smooth Camera Movement

Instead of this:

camera->position.y = 50 + 2 * blockCount;

We now use:

camera->position.y = Lerp(camera->position.y, 50 + 2 * blockCount, 0.1f);

This gives the camera a smooth natural feel as the stack grows.


What’s Next?

In Episode 5 we’ll keep building on the polish:

We’re now well past the prototype phase. The game is becoming fun to watch and play.


Project Code

You will find the complete source code here: tower-blocks