Infinity Shuffle is a premium, professionally-engineered sliding puzzle game featuring AI-powered hints, dynamic difficulty levels, real-time scoring, comprehensive statistics tracking, and modern glassmorphism UI. Built with cutting-edge web technologies, it delivers an immersive gaming experience comparable to professional mobile gaming applications.
- 4 Difficulty Levels: Beginner (3×3), Intermediate (4×4), Advanced (5×5), Expert (6×6)
- Dynamically Adjustable Grid Sizes: All grids can be played with customizable difficulty
- Solvable Puzzle Generation: Mathematically guaranteed solvable configurations using random walking algorithm
- Smooth Animations: Professional tile transitions and visual feedback
- Keyboard & Touch Support: Full keyboard control (Arrow keys) and responsive touch interface
- A Search Algorithm*: Implements advanced pathfinding with Manhattan Distance heuristics
- Intelligent Hint System: Analyzes board state to recommend the most efficient next move
- Optimized Performance: Adaptive time limits based on grid complexity
- Visual Highlighting: Clear visual indication of recommended tiles with direction hints
- Countdown Timer: Each difficulty level has appropriate time limits
- Beginner: 2 minutes (120s)
- Intermediate: 3 minutes (180s)
- Advanced: 5 minutes (300s)
- Expert: 7 minutes (420s)
- Warning Indicator: Visual alerts when time is running low (< 30 seconds)
- Victory Animation: Smooth transitions and confetti effects on successful completion
- Game Over Screen: "Time's Up" modal with restart options
- Performance-Based Scoring: Points calculated from:
- Completion time bonus
- Move efficiency bonus
- Difficulty multiplier (1x to 3x)
- Real-Time Score Display: Live score updates in the header
- Highest Score Tracking: Global best score persisted across sessions
- Overall Statistics:
- Total games played
- Win rate percentage
- Average completion time
- Per-Difficulty Tracking:
- Games played per difficulty
- Win rate by difficulty
- Best time for each difficulty
- Best score for each difficulty
- Persistent Data: All statistics saved to browser's local storage
- Theme Toggle: Easy switching between dark and light themes
- Persistent Preference: Theme selection saved to local storage
- Professional Design: Both themes feature glassmorphism effects and modern aesthetics
- Glassmorphism Effects: Frosted glass aesthetic with blur and transparency
- Responsive Design: Perfect experience on mobile, tablet, and desktop
- Smooth Animations: Professional transitions and visual feedback
- Professional Typography: 'Outfit' font for clean, modern appearance
- Gradient Colors: Beautiful color gradients for primary elements
- Efficient Rendering: Optimized tile rendering and updates
- Smart Caching: Heuristic caching in AI solver
- Memory Management: Careful state management to prevent memory leaks
- Adaptive Timeouts: Algorithm timeout scales with puzzle complexity
- Offline Support: Full functionality available offline
- Service Worker: Intelligent caching strategy
- Installable: Can be installed as standalone app
- App Manifest: Complete PWA configuration
- Mobile-Ready: Optimized for iOS and Android
- Move Sounds: Distinct sound effects for valid moves
- Victory Fanfare: Celebratory audio on puzzle completion
- Error Tone: Feedback for invalid moves
- Move Counter: Real-time move tracking
- Splashscreen: Professional 2-second intro with fade animations
- Statistics Panel: Sliding panel with detailed game statistics
- Session Persistence: Game state awareness
- Confetti Effects: Victory animation with canvas-confetti library
- HTML5: Semantic markup with accessibility features
- CSS3: Modern styling with Grid, Flexbox, Gradients, Animations
- Vanilla JavaScript: Pure ES6+ without dependencies (except confetti library)
- Service Worker: PWA support and offline functionality
-
InfinityShuffle Class: Main game controller
- Game state management
- Event handling
- User interaction processing
-
PuzzleSolver Class: AI Engine
- A* search algorithm implementation
- Heuristic calculation with caching
- Performance-optimized neighbor generation
-
Rendering Engine: Efficient board visualization
- Grid-based tile system
- Smooth animations
- Real-time updates
- Local Storage: Statistics, theme preference, best scores
- JSON Serialization: Efficient data storage format
- Cache Management: Optimized cache clearing
- Splash Screen: 2 seconds
- App Load: < 1 second
- Hint Generation:
- 3×3 grid: ~50-100ms
- 4×4 grid: ~200-500ms
- 5×5 grid: ~500-1000ms
- 6×6 grid: ~1000-1500ms (with fallback)
- Memory Usage: < 5MB typical
- Frame Rate: 60 FPS on modern devices
InfinityShuffle/
├── index.html # Main HTML structure
├── style.css # Professional styling (22KB)
├── game.js # Game logic and controllers (22KB)
├── solver.js # AI solver with A* algorithm (8KB)
├── sw.js # Service Worker for PWA
├── manifest.json # PWA manifest configuration
├── icons/ # Application icons
│ ├── icon-192.png
│ ├── icon-512.png
│ └── icon-maskable.png
└── favicon_io/ # Favicon files
- Launch: Open
index.htmlin a modern web browser - Splash Screen: Professional 2-second intro appears automatically
- Select Difficulty: Choose from 4 difficulty levels
- Play: Click tiles to move them into the empty space
- Use Hints: Click "Get Hint" for AI suggestions
- Win Condition: Complete the puzzle before time runs out
- View Stats: Click the statistics button to see detailed performance metrics
- Arrow Keys: Navigate and move tiles
- Mouse Click: Select and move tiles
- Touch: Tap tiles to move them
- Responsive: Optimized for all screen sizes
- Click the install button in the address bar
- Choose "Install Infinity Shuffle"
- App appears on desktop/taskbar
- iOS: Use "Add to Home Screen" from Safari
- Android: Use Chrome's install prompt or "Add to Home Screen"
| Browser | Support | Notes |
|---|---|---|
| Chrome/Edge | ✅ Full | Best performance |
| Firefox | ✅ Full | Full compatibility |
| Safari | ✅ Full | PWA limited on iPhone |
| Mobile Browsers | ✅ Full | Responsive design |
The game tracks detailed statistics for each difficulty level:
{
"3x3": {
"played": 5,
"won": 4,
"totalTime": 180,
"bestTime": 42,
"bestScore": 1250
}
}The solver uses an optimized A* algorithm:
- State Representation: Board configuration as array
- Heuristic: Manhattan Distance (optimal for 8-puzzle)
- Search Strategy: Best-first search with time limits
- Optimization:
- Heuristic caching
- Memory-conscious node management
- Adaptive timeouts
- Fallback: Greedy algorithm if timeout occurs
Score = (1000 × Difficulty Multiplier) + Time Bonus + Move Bonus
Where:
- Difficulty Multiplier: 1 (Beginner) to 3 (Expert)
- Time Bonus: max(0, (timeLimit - timeElapsed) × 10)
- Move Bonus: max(0, (50 - moves) × 5)
- New Difficulty Level: Edit
game.jstimeLimits object - Custom Theme: Update CSS variables in
style.css - Enhanced AI: Modify heuristic in
solver.js:// Add new heuristic (e.g., linear conflict) getLinearConflict() { /* implementation */ }
// Adjust timer limits in PuzzleSolver
const timeLimits = {
3: 500, // milliseconds
4: 800,
5: 1200,
6: 1500
};:root {
--primary-color: #38bdf8;
--secondary-color: #818cf8;
--accent-color: #fb7185;
/* ... customize colors ... */
}- CSS Grid for efficient layout
- Hardware acceleration via transforms
- Minimal DOM manipulation
- Heuristic caching to avoid recalculation
- Early termination with time limits
- Pruning strategies to reduce search space
- Efficient JSON serialization
- Selective local storage updates
- Lazy-loaded statistics
Potential additions for next versions:
- Multiplayer Mode: Compete with friends
- Leaderboards: Online score tracking
- Achievements: Badge system with rewards
- Level Editor: Create custom puzzles
- Sound Settings: Volume control
- Animations: Advanced particle effects
- Analytics: Detailed gameplay analytics
- Save/Resume: Mid-game save functionality
- Tutorial: Interactive guided introduction
- Themes: Multiple visual themes beyond dark/light
Developer: Mohd Zeeshan
Game Engine: Vanilla JavaScript ES6+
UI Framework: Custom CSS3 with Glassmorphism
AI Algorithm: A* with Manhattan Distance
Libraries: Canvas Confetti (CDN)
Icons: Custom SVG icons
Fonts: Google Fonts (Outfit)
This project is a professional game application. All rights reserved.
For bug reports, feature requests, or questions, please contact the developer.
Version: 1.0.0
Last Updated: February 23, 2026
Status: Production Ready ✅
Play Infinity Shuffle today and experience premium puzzle gaming! 🎮✨