TIC-TRAP-TOE
Tic-tac-toe is a solved game. This isn't. Six boards, one rotating cube — the rotation takes away your ability to stall, force a draw, or even choose which game you're in.
Desktop Only — Requires mouse input for raycasting click detection on the 3D cube faces.
Why It Works
Normal tic-tac-toe ends in a draw every time against anyone paying attention — it's solved. The rotation breaks that. You can't stall, you can't force a draw, and the board you were about to win might spin away before your turn comes back. There is no timer and no forced turn order between faces. If you can see the cells, you can play them.
Each face runs its own independent game — its own board, its own X/O turn, its own win condition. At any moment you may be mid-game on two or three faces at once, each at a different stage. Knowing when to commit to a face versus letting it rotate away is the core skill.
How the Rotation Enforces the Rules
Three.js raycasting with FrontSide backface culling means you physically cannot click a cell that is rotating away from you — no artificial threshold needed. The physics are the rules.
As faces get claimed, the cube stops giving equal time to all six sides. When 3 or fewer faces remain, the rotation biases toward showing the unfinished ones — arriving faster, lingering longer. The fewer faces left, the stronger the pull. It never stops spinning; it just stops being equally fair to faces that are already done.
Adaptive AI
The computer starts at Rookie and gets smarter every time you win a face — across rounds. Win a match, hit Next Round, and the AI picks up at the difficulty you earned. Five levels: Rookie (70% random), Casual (40%), Focused (15%), Sharp (full heuristic), and Unbeatable (minimax — provably optimal, can never be beaten, only drawn). The difficulty only resets when you hit Reset Game.
Won Face Visuals
When a player wins a face: a golden 3D bar strikes through the winning cells, confetti bursts from the exact winning cell in world space (44 neon particles scatter along the face normal, arc under gravity, fade out), and the face surface shifts to a metallic white holographic overlay that color-cycles continuously. Winning marks glow red; losing marks go near-black. The score digit scrambles before landing.
On match win, the cube decelerates exponentially and fires a damped scale pulse — two sharp thumps, then stillness.
Project Type
Browser Game
Tech Stack
Three.js, Vanilla JavaScript ES Modules, CSS3
Role
Solo — Design, Game Logic, 3D Engineering
Status
Complete
Key Features
6 Independent Boards
Each cube face tracks its own board state, turn, and winner — play on multiple fronts simultaneously.
Rotation as Mechanic
The cube's spin is the access control. No timer needed — physics enforces which faces are playable.
World-Space Confetti
Confetti bursts from the exact winning cell in 3D space, scattering along the face normal with gravity.
Holographic Win State
Won faces shift to a metallic white overlay with HSL color cycling. Winning marks glow red; losers go black.
Adaptive AI — 5 Levels
Starts at Rookie, escalates with every face you win — across rounds. Tops out at Unbeatable: full minimax, provably optimal, can only be drawn with perfect play.
Multi-Round Progression
Win a match and hit Next Round — the boards reset but the AI keeps its difficulty. Only Reset Game brings it back to Rookie.
Adaptive Cube Steering
When few faces remain, the rotation biases toward them — drifting to unfinished angles faster and lingering there longer.
No Build Step
Three.js via importmap CDN. Vanilla ES modules. Open index.html and play.