The static grid from my last update has come alive.
When I last wrote about the Gamma Project, we had a board and some random balls. It was a start, but it wasn’t a game. Today, I’m happy to report that the core soul of “Lines”—the mechanics that keep you clicking for “just one more turn”—is fully implemented.
Turning a grid of colored circles into a playable game required solving three distinct logic puzzles: how to move, how to find matches, and how to reward the player.
In Lines, balls don’t just teleport. They travel. And they can’t jump over other balls. To implement this, we used the Breadth-First Search (BFS) algorithm.
When you click a ball and then an empty square, the game calculates if a clear path of empty cells connects them. If the path is blocked by other colors, the move is forbidden. It adds that crucial layer of strategy: you’re not just matching colors, you’re managing space.
The heart of the game is the pop. Aligning 5 balls of the same color should feel instantly rewarding.
We implemented a robust line detection algorithm that scans the board in four directions—Horizontal, Vertical, and both Diagonals—after every move.
If it finds a sequence of 5 or more matching balls:
We finally have a way to keep score! Sticking to the classic rules:
It differentiates a lucky save from a masterful 7-ball cross-clear.
What makes this project unique isn’t just the code, but how it’s being written. I’m working with Google Antigravity, an AI agent.
For the scoring system, our workflow looked like this:
It feels less like using a tool and more like pair programming with a tireless engineer who loves writing test cases.
The game is playable! You can move, score, and lose (when the board fills up).
Next, we need to polish the rough edges:
Play the latest build here and let me know your high score!
← Back to Home