Slingle: An iPhone Game That Builds Its Own Levels
Slingle is a slingshot puzzle game for iPhone. You pull back, snap the
thin stem above a fruit, and slide a basket underneath before the fruit
hits the ground. It's free on the
App Store and went
live in November 2026.
The part I care most about isn't visible on screen: I never design a
level by hand. The game makes every one of them, and it proves each one
can be won before you ever see it.
Every level comes from a seed
A level is a number. Level 37 of world 2 turns into a seed, and the seed
turns into a tree: its shape, where the fruit hangs, how many pebbles you
get, whether there's wind or a beehive. The same seed has to produce the
exact same tree on every iPhone, every iOS version, forever.
That rules out a lot of normal Swift:
- No system randomness. The generator uses its own tiny random
number generator (SplitMix64), because Swift's built-in random helpers
don't promise to stay the same across Swift versions.
- No floats until the end. Everything is placed on an integer grid,
and only converted to screen positions when the scene draws it. Float
rounding can differ between devices; integers can't.
- No Foundation in the generator. Dates, UUIDs and dictionary order
are all ways for randomness to sneak in. A unit test scans the
generator's source and fails if any of them show up.
The payoff is a Daily Challenge that's identical for every player, and a
world map that never ends.
A solver proves every level
Random trees are easy. Random trees that are actually winnable are not.
So every generated level goes through a solver before it ships. It
searches shot angles and power with an analytic projectile model (plain
math, not the physics engine) and checks that the required fruit can be
snapped and caught with the pebbles you're given. If a level fails, the
generator rolls again with the next seed in a fixed sequence, so even the
retries are deterministic. The solver's best solution also sets the star
thresholds, with a little slack because real physics never matches the
math perfectly.
It also lets the game be kind without cheating. Each world level comes
in three versions, Relaxed, Normal and Challenge, and the solver proves
all three. The game picks the version from how a player has been doing
lately, and a level keeps the version it was cleared in. Difficulty never changes in the middle of a level, and nothing is
ever rigged to sell an ad.
Never change a level under a player
Once a level is out, it must never change. If I improve the generator,
a player's three-star level can't quietly turn into a different tree.
The generator has a version number, and it's part of every seed. New
levels use the newest version. Levels a player has already reached keep
the version they were made with. Golden tests snapshot the output for a
fixed set of seeds, so any change to an existing level fails the build
unless I bump the version on purpose.
The art came from my own studio
I'm not an illustrator, and I didn't want a game that looked like stock
assets. So the art came from
the motion graphics studio I built: the same
tool, pointed at a game instead of a video.
Each batch starts with a written brief that names every piece, its size
and how it should look. The studio's agent draws each piece as vector
shapes in one locked style guide: flat fills, no outlines, one shadow
angle, one palette. I review every piece, send back what's off, and a
script imports the exports straight into Xcode. That's nearly 700 pieces
so far: every fruit in every state, every tree, nine worlds of scenery,
and every item in the shop.

I wrote up how one piece comes together, shape by shape, on the
Slingle blog.
Fun first, money second
Slingle is free, and I set the monetization rules before writing any ad
code:
- No ad ever plays during a level or a shot.
- Most ads are rewarded, and the player always chooses them: double
coins, a hint, a skip.
- Ads between levels don't start until level 8, never show twice within
three levels, and get skipped entirely when a player has just failed
twice in a row.
- Nothing you can buy makes a level easier. Purchases are looks and
removing ads.
All the pacing rules live in one place with their own unit tests, and
every number is tunable through Remote Config, so I can adjust them
without shipping an update.
How I worked
I built Slingle with Claude Code as my pair. A CLAUDE.md file in the
repo holds the ground rules: git is mine, no art drawn in code, ask
before adding any SDK, generation must stay deterministic. The work went
in small milestones, each one running in the simulator before the next
began. Today the project is about 16,700 lines of Swift with 310 tests.
What's next
Version 1.2 adds Game Center leaderboards, iCloud saves and optional
reminders. Version 1.3 brings trick shots (one pebble, ring a bell, catch
the fruit), animated legendary slingshots for each world, and rainbow
fruit.
Stack
- Swift, SpriteKit for the game, SwiftUI for menus and the shop
- StoreKit 2 for purchases, Game Center, iCloud key-value storage
- Google Mobile Ads with Google's consent tools, Firebase Analytics,
Crashlytics and Remote Config
- XCTest for the generator, solver, scoring, economy and ad pacing
- My own studio for every piece of art
Play Slingle free on iPhone ·
gundalcrew.com/slingle
← All posts