Hello everyone!
I’d like to share my latest Phaser project: Smart Dots Reloaded, a modern version of the timeless Dots & Boxes game, built entirely with PhaserJS.
Features
-
Progressive boards: from 2x2 up to 8x8
-
Modular HUD system (score, level, etc.)
-
Smooth line drawing animations
-
Square capture animations, one by one, to avoid “starvation” issues
-
Local 2-player mode (planned, not yet released)
Insane Mode (Minimax AI)
I also implemented a minimax algorithm to power the CPU opponent in Insane Mode.
The AI simulates up to 3 moves ahead, ranks possible outcomes, and always picks the optimal path.
This makes the computer extremely challenging to beat — it almost feels like you’re playing against a human who can foresee your traps.
Development Notes
One of the most fun challenges was dealing with turn starvation when multiple squares were closed at once. I solved this by animating them one at a time, controlled by a simple state machine:
-
WAITING_FOR_PLAYER_MOVE -
ANIMATING_MOVE
This made the flow much more readable and responsive.
The HUD was also built in a modular way, with separate classes for score and level, making it easy to extend in the future.
Libs used
Font Awesome for Phaser
Phaser-hooks
Screenshots & Gameplay
Play it now
Play Smart Dots Reloaded (Smart Dots Reloaded - Play Online for Free - Cassino.dev)
Feedback is more than welcome! I’d love to hear your thoughts on gameplay, animations, or code structure.




