Tower Blocks in C and Raylib: Falling Blocks [Episode 4]

Опубликовано: 31 Август 2026
на канале: Let's Reinvent the Wheel
148
6

Welcome to Episode 4 of the Tower Blocks series!

In the last episode we animated the UI by scaling the score and fading overlays. This time we are diving deeper into game feel by adding one of the most satisfying mechanics: *falling blocks*. When your placement isn't perfect, the chopped off piece now tumbles down with spin and gravity - giving mistakes real visual feedback.

We also replace our rigid camera movement with a smooth-following camera that gently tracks the stack height. It's a simple change with a huge impact on how the game feels.

🎮 What you'll learn in this episode:
How to spawn and simulate falling blocks
Adding gravity and rotation using simple physics
How to use `Lerp()` for smooth camera motion
Organizing logic with a clean `FallingBlock` struct

This episode is all about polish and reaction. Tower Blocks is starting to feel like a real game.

📺 Full Tower Blocks series playlist:    • Tower Blocks in C and Raylib  
📖 Companion Blog Post: https://letsreinventthewheel.github.i...
🧠 Source code: https://github.com/letsreinventthewhe...

💬 Got questions? Drop a comment.
👍 Like what you see? Hit the like button.
📌 Want more projects like this? Subscribe and stay tuned...

00:00 Episode's goals
00:54 Fixing camera (smooth movement)
02:30 Introducing FallingBlock
03:52 CreateFallingBlock
06:25 Spawning falling blocks
12:36 DrawFallingBlocks
21:17 UpdateFallingBlocks

#gamedev #coding #programming #raylib #cprogramming