The classic snake game has a limitation nobody talks about. Four directions. The snake moves up, down, left, or right. Every turn is a 90-degree angle. This constraint makes gameplay predictable after a while.
I wanted to break that pattern. What if the board used hexagons instead of squares? What if the snake could move in six directions instead of four?
Hexagon Snake was my experiment with non-traditional game grids. A mobile game where geometry changes everything.
What It Does
The game follows the same core loop as the original snake. You control a snake. You eat food. You grow longer. You avoid hitting yourself.
But the hexagonal board changes how you think about movement. Instead of four possible directions, you have six. Each hexagon connects to six neighbors. The snake can turn at 60-degree angles instead of 90.
This small change has big consequences. Escape routes multiply. Traps become harder to create. The game feels more fluid but also more complex.
The Hexagonal Grid
Building a hexagonal grid is harder than a square one. Squares tile perfectly. Their neighbors are obvious. Hexagons require more thought.
I implemented the grid using an offset coordinate system. Each row alternates slightly to create the honeycomb pattern. This approach made neighbor calculations manageable without complex math.
The coordinate system tracks positions using two values. Moving between hexagons requires different offset rules depending on whether the row is even or odd. The game logic handles these differences behind the scenes.
Movement Mechanics
In a square grid, turning right from “up” gives you “right.” Simple.
In a hexagonal grid, turning right from any direction gives you one of two possible angles. The snake can make sharp or shallow turns. I mapped these to intuitive swipe gestures on mobile.
Swipe right for a shallow turn. Swipe hard right for a sharp turn. The gesture recognition needed tuning to feel natural. Too sensitive and players make accidental turns. Too loose and the snake ignores valid input.
Collision Detection
Collision detection on a hexagonal grid posed unique challenges. The snake body consists of hexagonal segments. Each segment occupies a single cell.
The head checks its next destination before moving. If that cell contains a body segment, game over. If it contains food, the snake grows. Otherwise, it moves forward and the tail follows.
The boundary check was trickier. The grid has edges, but hexagonal edges are not straight lines. I defined valid coordinates and rejected any movement that would place the head outside bounds.
Mobile Touch Controls
Touch controls needed careful design. The game uses swipe gestures for direction changes.
The control system detects swipe direction and magnitude. Small swipes mean minor course corrections. Large swipes mean sharper turns. This analog input maps to the discrete six-direction movement system.
I added visual feedback for touch input. When you swipe, the intended direction appears briefly. This helps players understand what the game interpreted from their gesture.
Visual Design
Hexagons have a natural aesthetic appeal. The honeycomb pattern creates a clean, geometric look.
The snake body segments fit neatly into their cells. Each segment has a slight overlap with its neighbors, creating a connected appearance. The head segment has a distinct shape for orientation.
Color choices aimed for high contrast. The snake stands out against the board. Food items pop visually. This matters on mobile screens in varying lighting conditions.
Unity Development
Unity made sense for this project. The engine handles 2D games well, and C# is comfortable to write. Mobile deployment works out of the box.
The hexagonal cells are prefabs instantiated at runtime. The grid generates when the game starts based on configurable dimensions. This keeps the scene file clean and makes level variations possible.
Game state lives in a central manager that coordinates the snake, food spawning, score tracking, and collision handling. Each frame, the manager updates positions and checks for events.
Challenges I Faced
The hardest part was wrapping my head around hexagonal geometry. Square grids are intuitive. Hexagonal grids fight against years of grid-based thinking.
Drawing the hexagons correctly took several attempts. The flat-top versus pointy-top orientation decision affects every other calculation. I chose pointy-top because vertical swipes felt more natural for forward movement.
Touch input tuning required extensive testing. Different phones have different touch sensitivities. I ended up with adaptive thresholds that adjust based on the first few inputs.
What I Learned
This project taught me that small geometry changes create ripple effects. Switching from squares to hexagons touched every system. Movement, collision, input, rendering.
Game feel matters more than technical correctness. The swipe controls went through dozens of iterations. Each version was technically functional but felt wrong. Finding the right response curves took trial and error.
Constraint changes drive creativity. The four-direction limitation in classic snake seemed arbitrary until I removed it. Six directions made me rethink strategies that I took for granted.


