Skip to content

Repository files navigation

Mosaic Memory

Mosaic Memory is a SwiftUI puzzle and memory game where each row of tiles is mirrored across a vertical axis. Flip and match mirror images, drag and drop them into their correct positions, and race against the clock to complete the puzzle!

Gameplay Video

Link: https://drive.google.com/file/d/1WfkZ5tE958zJG51cKkj5tmQYbdRpeJAL/view?usp=sharing

Gameplay

  • Two-Phase Gameplay:
    1. Find All Mirror Matches: First, tap tiles to find and match all mirrored pairs
    2. Drag & Drop: After finding all pairs, rearrange tiles to complete the puzzle
  • Multiple Difficulty Levels:
    • Easy: 4×4 grid with 3 minutes
    • Medium: 4×4 grid with 2 minutes
    • Hard: 6×6 grid with 3 minutes
    • Impossible: 6×6 grid with 2 minutes
  • Timer: Race against the clock based on your chosen difficulty
  • Global Mute Button: Toggle background music on/off at any time
  • Tutorial: Step-by-step instructions for new players

Features

  • Typewriter style animation for app title, and bouncing animation for buttons
  • Automated splitting of image and shuffling of image tiles based on difficulty
  • Simulated game functions in tutorial with visuals for easy understanding
  • Custom puzzle shaped buttons with sound effects for enhanced interaction
  • AVFoundation framework for background music and sound effects

Requirements

  • iOS 15.0+ or iPadOS 15.0+
  • Swift 5.5+
  • Xcode 13+ or Swift Playgrounds 4+

Installation & Setup

  1. Clone or download this repository
  2. Open the project in Xcode (or Swift Playgrounds if you have a .swiftpm version)
  3. Build and run on the simulator or a physical device
  4. If using Swift Playgrounds, open the .swiftpm and tap Run

App Structure

  • HomeView.swift: Main menu (Play, Instructions)
  • ImageView.swift: Image selection screen
  • DifficultyView.swift: Difficulty selection (Easy, Medium, Hard, Impossible)
  • GameView.swift: Puzzle logic (flipping, timer, drag/drop)
  • ToastView.swift: Pop up message for unsolved puzzle
  • ScoreboardView.swift: Displays final score and puzzle reassembly animation
  • TutorialView.swift: Explains the vertical mirror logic and gameplay tips
  • TutorialFindPairView.swift: Shows a simulation of matching mirror images
  • TutorialDragDropView.swift: Explains the drag & drop mechanics for completing puzzles

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/my-feature)
  3. Commit your changes
  4. Push to your branch (git push origin feature/my-feature)
  5. Open a Pull Request describing your changes

About

Memory Puzzle game

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages