Docs

PuttGames

Install and make Putt yours, the physics game in RealityKit. Version 1.0.0.

Tabletop minigolf in RealityKit: felt greens, maple rails and toy bumpers on a walnut table, with a solver-checked par on every hole. 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, Putt/.

Make it yours

cd Putt
scripts/setup.sh --name YourGame --bundle-id com.you.yourgame

The script renames the target, scheme and bundle ids, rewrites the StoreKit product ids and runs tuist generate. To keep the name Putt 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: 27 levels
  • Game Center: 4 leaderboards, 18 achievements
  • Shop: Token packs, Ball finishes, Course Pass, Clubhouse Pass (no ads)
  • Built on: GameCore, Feel, GameServices, GameUI
  • Presets: scorecard, chalk, fair
  • Swift: 6,424 lines in 66 files

Rebrand options

OptionWhat it sets
--nameTarget, scheme and product name
--bundle-idBundle id. Modules, the widget, the App Group (group.<bundle-id>) and tests derive theirs from it
--display-nameThe name under the icon
--teamYour team id. Required for devices, Game Center, iCloud and the widget's App Group
--product-prefixApp Store Connect product ids. Defaults to the bundle id

The values live in Tuist/ProjectDescriptionHelpers/AppConfig.swift. Game Center ids are listed in Configuration/GameCenter.json (four leaderboards, eighteen achievements); create them under your app in App Store Connect. Products are in Configuration/Products.storekit, which the scheme uses for local purchases.

Running it

The rules also build as a plain Swift package, without Xcode:

swift test                      # physics, courses, the daily hole, rounds and the profile
swift run -c release solve      # re-solve every hole and print a new CourseLines.swift

Structure

App/                  @main, the root stage (RealityKit table + phase layer), deep links
Features/Home         The title: Tee off, the daily hole, courses, locker, shop, settings
Features/Courses      The three courses with their best rounds, the daily hole, clubhouse records
Features/Play         The HUD (hole, par, stroke, score), the aim overlay and the pause panel
Features/Results      The hole card (birdie, par...) and the round's scorecard
Features/Locker       Ball finishes to buy with tokens and equip
Features/Shop         Token packs, the Course Pass and the Clubhouse Pass (StoreKit 2)
Features/Settings     The skin switcher, sound, haptics, aim guide, reminders, accessibility, restore
Modules/GameCore      Seeded RNG, value noise, daily seed, saves, event ring, synth (no game types)
Modules/PuttKit       The rules: plane geometry, meshes and painted textures, the 27 holes and
                      their solved lines, the daily hole, ball physics, the solver, rounds,
                      scores, skins, the profile, achievements and products
Modules/PuttStage     RealityKit: the ARView, the table, felt, rails, toys and props per skin,
                      the ball, the camera rig, projection for the HUD, the touch layer
Modules/GameDesign    PuttTheme tokens per skin, panels (paper, chalk, rosette), buttons, motifs
Modules/Feel          Sound bank, audio engine (room tone, the roll), haptic patterns
Modules/GameServices  Game Center, StoreKit 2, iCloud sync, reminders
Modules/Session       GameSession (phases, aim input, the HUD, results, rewards)
Widget/               The Daily Hole widget. Shared/ holds what it shares with the app
Design/StyleSpec.md   The art direction: tone, the three skins, type, panels, motion, sound
Tests/                Swift Testing for physics, courses, the daily hole and rounds; XCUITest for menus
scripts/solve         The par solver (`swift run -c release solve`)

How it runs

  • The ball is simulated in BallSim at a fixed 240 Hz step on the table's plane: felt drag, slopes, bowls and shag, restitution off rails, blocks and posts, spring bumpers, pipes, and a cup that captures a slow ball and lips out a fast one. No randomness, no frame-rate dependence.
  • Solver searches each hole (1° and 0.14 units/s steps, a beam of the best ten) for the fewest strokes, and only accepts lines that still sink with the aim off by 1° and the power off by 4%. Par is that count plus one, from 2 to 4. CourseLines.swift is its output.
  • The daily hole is built from the day's seed (a layout and its toys), solved on a background thread at launch, and given its own par. Everyone gets the same hole on the same UTC day.
  • The round emits BallEvents (rail, bumper, pipe, lip, sunk...); the session turns each into a sound, a haptic and the stage's response. The stage only draws what BallSim decided.
  • The look is a skin: PuttTheme.make(skin) gives the screens their tokens and WorldLook.of(skin) gives the table its materials, so switching skins re-dresses both at once.

Tuning and how pars are set are documented in BALANCE.md.

Licenses

Special Elite is under the Apache License 2.0; Inter Tight, Cabin Sketch, Architects Daughter, Rye and Cabin are under the SIL Open Font License 1.1 (all bundled as Latin subsets, licenses in Licenses/). Everything else in the project is yours to ship with your game. See ASSET_MANIFEST.md.

Changelog

1.0.0

2026-11-24

  • First release: minigolf on a tabletop, with felt greens, maple rails and toy bumpers in RealityKit and SwiftUI screens over it.
  • Drag back from the ball to aim and set the power, let go to putt. A dotted aim line and a power arc show the shot; an optional guide shows the first bank.
  • Deterministic ball physics in plain Swift: felt drag, slopes, bowls and shag pile, rails, blocks, posts, spring bumpers, pipes, and a cup that lips out a ball that's too fast.
  • 27 holes on three courses of nine: Walnut, Sideboard and Games Room. Every par is set by a solver that only accepts lines that survive a slightly-off aim and power.
  • A daily hole built from the day's seed, the same for everyone, with its own solved par, a streak and a Home Screen widget.
  • Hole cards (birdie, par, bogey, hole in one) and a full scorecard at the end of each round, with best rounds per course.
  • Eight ball finishes to earn with tokens, and a StoreKit 2 pro shop: token packs, a Course Pass and a Clubhouse Pass that also removes ads.
  • Three built-in skins that change the whole game, screens and table: Scorecard (default), Chalkboard and County Fair.
  • Game Center leaderboards (daily hole, best round per course) and eighteen achievements, iCloud save sync, Reduce Motion, Increase Contrast and Game Mode.
  • Every sound synthesised on the device: the putter's tick, rails, bumpers, the pipe and the drop into the cup.