Overview
Bubble Path Escape is a turn-based path-drawing puzzle game that tests your spatial reasoning and tactical planning under pressure. You guide a Happy Person from a starting bubble to an exit bubble by sketching a single, continuous chain of arrows through a network of circular nodes. A zombie relentlessly chases you using shortest-path AI, while a shark patrols a fixed route. Your path must weave through shifting danger zones, forcing constant re-evaluation and clever detours.
How to Use
- Drawing Phase: Click or tap adjacent nodes to extend a single path from the Happy Person's current position. Each click adds one directional arrow.
- Execute: Press "Execute Path" to start moving. The character walks one node per turn while enemies also move one step.
- Continue Drawing: When the character reaches the end of your drawn path, the game pauses. Extend the path and execute again — the character continues forward, never backtracking.
- Path Blocked: If an enemy sits on your next path node, execution pauses. Undo that step and draw a different route around them.
- Danger Warning: If a zombie or shark moves to a node directly adjacent to you and you have no more path to follow, a "DANGER!" warning appears. Extend your path away from the threat and execute to escape.
- Capture: If you walk directly into an enemy node, or if an enemy walks onto your node (which can only happen if you stay still with no path), it's game over.
- Win: Reach the golden EXIT node to advance to the next level.
- Reset: Press "Reset Simulation" at any time to restart the current level from scratch.
Technical Details
- Persistent execution pointer: The
execStep index survives across draw/exec cycles, so re-executing always continues forward.
- Adjacent-only zombie AI: BFS pathfinding with soft-goal — the zombie moves one step closer each turn but stops adjacent to the player, never landing on the same node.
- Two-tier threat model: (1) "Path blocked" — enemy on your next node, pauses execution so you can reroute. (2) "Danger" — enemy adjacent when you're out of path, warns you to draw an escape. (3) "Capture" — direct node collision, instant game over.
- requestAnimationFrame loop with deferred turn logic via setTimeout for sub-200ms INP.
- Sandboxed demo engine with deep-cloned state isolation and 50-second inactivity auto-trigger.
- Web Audio API synthesized sound effects gated behind user gesture.
Future Directions
- Level progression: More levels with larger grids, additional enemies, and obstacles (walls, one-way nodes, teleporters).
- Score system: Track steps, time, and near-misses for star ratings.
- Enemy variety: Ghost that phases through nodes, trap-layer that marks visited nodes as hazardous.
- Visual polish: Particle effects, screen-shake, ambient background motion.
- Mobile UX: Swipe-to-draw gestures, haptic feedback, landscape layouts for tablets.
- Level editor: Custom levels with configurable enemy routes, shared via encoded URLs.