Challenge your mind with this collection of JavaScript puzzle games. From classic sliding tiles and Sudoku to logic-based challenges and number games, these interactive examples are great for learning game development or just having fun — all crafted using HTML, CSS, and vanilla JavaScript.
3 JavaScript Puzzle Games
Rotating Puzzle
A complex puzzle where each image fragment can be flipped or rotated in any direction, challenging the player’s spatial reasoning to reconstruct the original picture.
See the Pen Rotating Puzzle.
Sliding Puzzle with GSAP Draggable and Tailwind CSS
An implementation of a sliding puzzle using GSAP Draggable - featuring a custom snap function for grid alignment and onThrowComplete logic that uses hitTest to determine move validity and trigger the swap animation.
See the Pen Sliding Puzzle with GSAP Draggable and Tailwind CSS.