GAME DEV ยท NOV 2025
Bomberman Classic
Unity recreation of the classic Bomberman with single-player and multiplayer modes (1 to 4 players) and AI opponents.

At a glance
- ROLE
- Everything: gameplay, AI, levels and UI
- TEAM
- Solo
What I built
- AI pathfinding with breadth-first search over the level grid.
- AI state machine with Moving, Escaping and Waiting states.
- 4 power-ups: Extra Bomb, Blast Radius, Speed Increase and Push Bombs.
- Chain reaction explosions between bombs.
- Prefab-based level design with Unity Tilemap, destructible and indestructible blocks.
- Several control schemes for 4 simultaneous players.
Technical decision
An AI that bombs its way to the player
The AI finds the shortest path to the nearest player with a breadth-first search over the grid. Destructible blocks count as walkable on purpose, so the route can cross them. The AI walks to the cell before the first block, drops a bomb, retreats to a safe cell and plans again. Deciding on a timer instead of every frame keeps it cheap and lets it react when the map changes.
AIController.cs
IEnumerator DecisionLoop()
{
while (!isDead)
{
// Only make decisions if we are not expecting an explosion.
if (!isWaitingForExplosion)
{
target = FindClosestHumanPlayer();
if (target != null)
{
Vector2 start = RoundToGrid(transform.position);
Vector2 goal = RoundToGrid(target.position);
List<Vector2> path = FindPath(start, goal);
if (path.Count > 0)
{
currentPath = path;
currentPathIndex = 0;
// Find the first destructible box along the way
firstDestructiblePosition = FindFirstDestructibleInPath(path);
if (firstDestructiblePosition != Vector2.zero)
{
// Find the position prior to the box
Vector2 positionBeforeDestructible =
FindPositionBeforeDestructible(path, firstDestructiblePosition);
if (positionBeforeDestructible != Vector2.zero)
{
targetPosition = positionBeforeDestructible;
isMoving = true;
isEscaping = false;
hasPlacedBomb = false;
}
}
else
{
// If there are no boxes, move directly towards the player.
// full path for continuous movement
isMoving = true;
isEscaping = false;
}
}
}
}
yield return new WaitForSeconds(decisionInterval);
}
}