PaneGames
Install and make Pane yours, the multiplayer game in SwiftUI + Metal. Version 1.0.0.
A two-player strategy game in a stained-glass window: set glass, close pockets, and at sunset the light on the floor picks the winner. This guide takes you from download to a running game under your own name. It covers version 1.0.0. See the screens on its game page.
Requirements
- Xcode 26 and an iOS 17.0 or later deployment target
- Tuist 4 (
brew install tuist) - An Apple Developer team for devices, Game Center, iCloud and the widget. The simulator runs without one.
Install
Download
Included with Games. Not signed in? The button takes you to sign in or create an account, then starts the download when you're back. Unzip the archive; it contains one folder, Pane/.
Make it yours
cd Pane
scripts/setup.sh --name YourGame --bundle-id com.you.yourgame --preset rubyThe script renames the target, scheme and bundle ids, rewrites the StoreKit product ids, sets the starting preset and runs tuist generate. To keep the name Pane for now, run tuist generate instead.
Run it
Open YourGame.xcworkspace, choose an iPhone simulator and run the YourGame scheme. The scheme uses Configuration/Products.storekit, so the shop works before App Store Connect is set up.
What's in the project
- Content: Endless, with a tuned curve
- Game Center: 4 leaderboards, 17 achievements
- Shop: Pane Plus (two more window shapes, Grand windows and every glass set), Glass sets, Tip jar
- Built on:
GameCore,Feel,GameServices,Shaders,Motion,GameUI - Presets:
rose,ruby,citrine - Swift: 5,486 lines in 59 files
How Pane plays
- Each player holds three shards: small, medium or large. On your turn, set one into a clear pane (tap once to see it rim-lit with the pocket it would close, again to set it). A shard fits a pane its own size or smaller. Or recut: draw three new shards, which uses your turn.
- When your glass, with the stone frame, closes off clear panes, and that pocket is smaller than the rest of the clear window, the pocket floods with your colour.
- Each side sets the same number of shards over five rounds, dawn to sunset. The second player sets the last one.
- At sunset small panes shine 1, medium 2 and large 3. Clear glass shines for nobody. More light wins.
Today's window is generated from the date (DailyWindow), cycles through all four shapes and is played against the Journeyman; winning it on consecutive days builds a streak. Windows are generated from a seed: four shapes (Oriel and Lancet free, the Rose Window and the Lantern with Pane Plus) in three sizes (Quick 36 panes, Standard 54, Grand 78 with Plus). An online match sends only the seed and the moves, a few hundred bytes, and both phones rebuild the identical window.
What's inside
| Folder | What |
|---|---|
Modules/GameCore | Game-agnostic engine pieces: SplitMix64, the event ring buffer, a fixed-step clock, the day clock. |
Modules/PaneKit | The game in plain Swift (Foundation only): the window generator (Tracery: seeded Voronoi in a convex outline by labelled half-plane clipping, so every pane knows its neighbours), the rules (Match), records and replays, the Glazier (alpha-beta search with a time budget), lessons, saves, the ladder, Game Center goals, product ids, sound and haptic cues and the move choreography. |
Modules/PaneDesign | Glass presets (every colour), the look in the environment, Gloock and Inter Tight, the plate, button and chip kit, and the shaders: paneGlass (thickness, streaks, seeds, sun bloom, god rays), paneStone, paneSunset, paneGrain. |
Modules/PaneFeel | GlassSynth (struck-glass partials, lead knocks and a small stone room, all synthesized) and the AVAudioEngine and Core Haptics players. |
Modules/GameServices | Game-agnostic Game Center (achievements, leaderboards, the access point), TurnBased (matchmaker, match list, turns, endings, rematch, turn events), the iCloud key-value mirror and the StoreKit 2 storefront. |
Modules/PaneUI | Every screen: title, play (window, sill, floor light, HUD, shard tray), results, online matches, gallery, glass shop, settings, lessons and the first-launch welcome. |
App, Widget | App entry and service wiring; a Home Screen widget with your latest window and online turns waiting. |
Tests, UITests | Swift Testing for the generator, rules, records, Glazier, saves, palette and synth; XCUITest for the welcome, a move against the Glazier and the menus. |
Design/StyleSpec.md | The art direction: tone, shape, palette roles, light, material, type, motion, sound. |
How a move becomes light
- A tap on the window maps the point into window space and asks
Tracery.pane(at:). The first tap selects and shows the pocket the move would close (Match.pocket(ifSet:)); the second callsMatch.play, which returnsMatchEvents. Choreography.beats(for:)turns those events into timed beats: the shard's glass flows in from the tap, then a flood ripples outward ring by ring through the pocket, each pane a note higher.- The window's
TimelineViewruns only while glass is moving. The Canvas draws flat pane colours,paneGlassturns them into antique glass, and lead is stroked on top. The floor redraws the same panes flipped and sheared by the sun, blurred and screened onto the stone. - Then the turn moves on: the Glazier searches on a background task, pass and play shows a hand-over plate, and online play sends the record to Game Center.
Online play
GameServices/TurnBased wraps GKTurnBasedMatch: the Game Center matchmaker for invites and auto-match, the match list, endTurn with the encoded MatchRecord, endMatchInTurn with won, lost or tied outcomes at sunset, resign, rematch, and GKLocalPlayerListener turn events, so a turn that arrives while you watch plays in with its animation. Game Center sends the push notification for "your move". Online results move a local Elo rating that is submitted to the ranked ladder leaderboard.
Rebrand options
- Look:
setup.sh --presetpicks the default glass and renders its icon (scripts/render-icon.py). Every colour is inGlassPreset(Modules/PaneDesign/Sources/Tokens/GlassPreset.swift); the tests audit each set for contrast. Add a set there and torender-icon.py. - Rules and windows: shapes and sizes are in
WindowShape.swift, the rules inMatch.swift. Numbers and how they were tested are inBALANCE.md. - The Glazier: levels and search settings are in
Glazier.swift. - Store: product ids follow the prefix from
setup.sh(PaneProducts). - Game Center:
GAMECENTER.mdlists every id to create, and turn-based play needs the Game Center capability on your App ID.
Tests
PaneTests covers the window generator (determinism, tiling, a connected graph), the rules (fitting, pockets, sunset scoring, turn counts), record replays, the Glazier (legal moves, the Master beating the Apprentice), lessons, saves and merges, the ladder, achievements, glass contrast and the synth. PaneUITests launches with -SPFreshSave -SPNoGameCenter and plays. The pure modules also build on Linux with SwiftPM.
Launch arguments for screenshots: -SPScreen play|results|gallery|shop|online|lessons|settings|lesson, -SPSeedGallery, -SPSkipOnboarding, -SPNoGameCenter.
Accessibility
Glass marks (a roundel on one colour, a lattice on the other) turn on in Settings and with Differentiate Without Color. The two glasses in every set differ by value as well as hue. Reduce Motion makes glass appear without flowing and holds the sun still. Increase Contrast darkens the plates and thickens the lead. The window has a VoiceOver summary, and every control and score is labelled.
Changelog
1.0.0
2026-11-05
- A two-player strategy game in a stained-glass window: set shards into the lead, close pockets of clear panes to flood them with your colour, and at sunset the light on the floor decides the winner.
- Windows generated from a seed: Oriel and Lancet, plus the Rose Window and the Lantern with Pane Plus, in Quick (36 panes), Standard (54) and Grand (78) sizes.
- Online play with Game Center turn-based matches: invite friends or auto-match, take turns at your own pace, turn notifications, resign and rematch. Only the seed and the moves are sent.
- Pass and play with a hand-over plate, and the Glazier, a built-in opponent at three levels (Apprentice, Journeyman, Master) using alpha-beta search with a time budget.
- Antique glass in Metal shaders (thickness, streaks, seed bubbles, the sun's bloom and god rays) with the window's coloured light thrown onto a stone floor, moving with the sun from dawn to sunset.
- Today's window: the same window for every player each day, against the Journeyman, with a daily streak.
- Three lessons on small windows and a first-launch welcome.
- A gallery of finished windows with sharing, lifetime stats and a rated online ladder.
- Three glass sets (Rose & Ink, Ruby & Sapphire, Amethyst & Citrine), Pane Plus, single glass sets and a tip jar on StoreKit 2.
- Game Center: 17 achievements and 4 leaderboards, including the ranked ladder and the daily streak.
- Struck-glass sound synthesized on the device, Core Haptics, glass marks for colour-blind players, Reduce Motion and Increase Contrast, VoiceOver labels.
- A Home Screen widget with your latest window and online turns waiting.









