Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📸 Selfie Shuffle

Take a selfie. Shuffle it. Solve it.

Selfie Shuffle is a fun and interactive web-based puzzle game where players transform their own selfies into a personalized jigsaw puzzle. Capture a photo using your device's camera or upload an existing image, choose a difficulty level, and rearrange the shuffled pieces to recreate the original picture. Challenge yourself to complete the puzzle in the shortest time with the fewest moves.


✨ Features

  • 📸 Capture a selfie directly from your webcam
  • 🖼️ Upload an image from your device
  • 🧩 Multiple difficulty levels (3×3, 4×4, 5×5, 6×6)
  • 🔀 Random puzzle generation using the Fisher–Yates shuffle algorithm
  • 🖱️ Smooth drag-and-drop puzzle gameplay
  • ⏱️ Live timer and move counter
  • 🏆 Performance-based scoring system
  • 💡 Hint system to preview the original image
  • 🔄 Restart and reshuffle options
  • 📱 Fully responsive design for desktop, tablet, and mobile
  • 🎉 Celebration animation upon puzzle completion

🚀 Tech Stack

Frontend

  • React
  • Vite
  • Tailwind CSS

Browser APIs

  • MediaDevices API (Camera Access)
  • Canvas API (Image Processing)

Libraries

  • dnd-kit (Drag & Drop)
  • React Router
  • Framer Motion (Animations)

🎮 How to Play

  1. Open Selfie Shuffle.
  2. Capture a selfie using your webcam or upload an image.
  3. Select your preferred difficulty level.
  4. The image is divided into puzzle pieces and shuffled.
  5. Drag and swap the tiles to restore the original image.
  6. Complete the puzzle in the least time and with the fewest moves to achieve a higher score.

🧩 Difficulty Levels

Level Grid Size Pieces
Easy 3 × 3 9
Medium 4 × 4 16
Hard 5 × 5 25
Expert 6 × 6 36

🏅 Scoring System

Your final score is calculated based on:

  • Difficulty level
  • Time taken
  • Number of moves
  • Hint usage (optional deduction)

📂 Project Structure

src/
│── assets/
│── components/
│── hooks/
│── pages/
│   ├── Home
│   ├── Camera
│   ├── Upload
│   ├── Puzzle
│   └── Results
│── context/
│── utils/
│── styles/
│── App.jsx
└── main.jsx

🔮 Planned Features

  • 👥 Multiplayer mode
  • 🌍 Global leaderboard
  • 📅 Daily puzzle challenges
  • 🎭 Image filters and stickers
  • 🧠 AI-powered hints
  • 🎵 Background music and sound effects
  • 🏅 Achievements and badges
  • 🌙 Dark mode
  • 📤 Share completed puzzles on social media
  • 🧩 Custom puzzle piece shapes
  • 🎯 Time Attack and Survival game modes

🤝 Contributing

Contributions are welcome!

  1. Fork the repository.
  2. Create a new feature branch.
  3. Commit your changes.
  4. Push the branch.
  5. Open a Pull Request.

💡 Future Vision

Selfie Shuffle aims to make every photo a unique puzzle experience. Future updates will introduce competitive multiplayer, AI-assisted gameplay, themed events, custom puzzle styles, and global leaderboards to create a more engaging and replayable experience.


Built with React, Vite, Tailwind CSS, and the Canvas API to turn everyday selfies into fun, personalized puzzle challenges.

About

Take a selfie, shuffle it into a puzzle, and solve it! A fun browser game built with React, Vite, and Tailwind CSS.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages