Modern Pac-Man Arcade Engine
High-performance arcade recreation built with Next.js 14, TypeScript, and autonomous ghost AI state machines.
Interactive browser recreation of the classic arcade game Pac-Man built from scratch using Next.js 14 App Router, strict TypeScript, React Hooks, and Tailwind CSS. Features 4 distinct autonomous ghost AI behaviors, tile collision grid, wrap-around tunnels, and touch/keyboard controls.
4 Behaviors
Ghost AI Engines
<16ms
Frame Latency
0 External
Game Engines
The Problem & Intended Users
Recreating responsive 60fps retro arcade mechanics, tile collision grids, direction buffering, and authentic multi-ghost behaviors in modern React without depending on heavyweight external canvas game engines.
Architecture & Implementation Decisions
Implemented a custom game loop state machine (`useGame`) using pure React hooks and requestAnimationFrame, coupled with deterministic tile coordinate mathematics, SVG scalable vector sprites, power pellet timers, and distinct ghost AI states.
Technical Architecture Pipeline:
Next.js 14 App Router component tree (`Maze.tsx`, `PacMan.tsx`, `Ghost.tsx`, `ScoreBoard.tsx`) powered by custom state hooks (`useGame.ts`), TypeScript models (`types/`), collision utilities (`utils/`), and CSS keyframe glowing effects.
Source-Verified Capabilities
Measurable Results & Delivery
A fast, responsive, zero-dependency arcade game deployed live on GitHub Pages with authentic ghost pathfinding, mobile touch support, score tracking, lives management, and pause capabilities.
Verified Technologies & Tools
Looking for this level of engineering rigor on your project?
I architect clean, accessible, and high-performance web systems and automated AI pipelines tailored to production standards.