Building a 10,000-Level Puzzle with Swift 6 and SwiftUI: My Journey as a Student Developer

Hi DEV community!

I’m a high school student from Taiwan, currently preparing for university admissions. For the past few months, I’ve been obsessed with creating a “premium” tactile puzzle experience called PathFill. I wanted to share some technical insights from building it with the latest Apple technologies.

The Tech Stack

  • Language: Swift 6 (Strict concurrency mode enabled)
  • UI Framework: 100% SwiftUI
  • Architecture: MVVM
  • Integrations: Core Haptics, Apple Music SDK, GameKit

The “10,000 Levels” Challenge

One of the biggest hurdles was generating enough content. I didn’t want to hand-design 10,000 puzzles, so I built a procedural level generator using a backtracking algorithm.

  • It ensures a unique path that fills 100% of the grid.
  • It balances difficulty across 4×4 to 7×7 grids.
  • It runs on a background thread to keep the SwiftUI interface at a buttery-smooth 120Hz.

Focusing on “The Feel” (Refinement)

I believe that for a puzzle to be satisfying, it needs to feel “real.”

  • Core Haptics: I tuned the haptic feedback to match the speed of the user’s swipe. The faster you connect numbers 1 -> 2 -> 3, the more intense the “click” feels.
  • Aurora Theme: I used custom SwiftUI gradients and particle systems (snow/sparks) to create a calming atmosphere, perfect for deep work breaks.

University Portfolio & Lessons Learned

This project is a core part of my university application. I learned:

  1. How to manage state for high-frequency UI updates in SwiftUI.
  2. The importance of Apple’s Human Interface Guidelines (HIG) for accessibility and Dark Mode.
  3. How to balance monetization (AdMob) without ruining the user’s flow state.

Check it out

I’m looking for feedback from fellow developers! If you have an iOS device, I’d love to hear your thoughts on the UI polish or the generation logic.

App Store: https://apps.apple.com/us/app/pathfill/id6756887734

I’m happy to dive into the code or discuss the generator algorithm in the comments!

A composite showcase of PathFill featuring 4 different gameplay screens: including Aurora and Dark Mode themes, and grid sizes from 4x4 to 7x7.

Leave a Reply