
How I Built a Prison Escape Game in One Week with Unity NavMesh
I never planned on building a prison escape game. It started as a weekend project to mess around with Unity's NavMesh — but one week later I had a full stealth-survival alpha with reactive guard AI, a noise system, and an inventory. Here's how it happened. The Idea CLAWED puts you in the role of a prisoner trying to escape a maximum-security facility. Simple concept. But the moment I asked "what makes guards feel smart?", everything got complicated. Building the Guard AI The core of the game is a 4-state finite state machine for each guard: Patrol — follows a waypoint path, checks line-of-sight every 0.3s Suspicious — heard a noise or caught movement; turns toward source, plays alert animation Chase — full sprint using NavMeshAgent, broadcasts alert to nearby guards via event Attack — triggers caught sequence if player is in range The hardest part wasn't the state transitions — it was making the AI feel believable. Guards would teleport-turn to face you. The fix: lerping ro
Continue reading on Dev.to Tutorial
Opens in a new tab

