I rebuilt the drug-dealing game from my graphing calculator
If you were in a high school classroom between about 1995 and 2010, someone near you had Drug Wars on their TI-83. Buy low in one city, sell high in another, try not to get caught, watch the whole thing fall apart on day 28.
I rebuilt it. It’s called Contraband, it’s free on the App Store, and this is what the five months in between actually looked like.
What it turned into
Twelve US cities, each with its own market anchored to real supply-chain geography — the cheapest brown is in Baltimore, the cheapest ice in Albuquerque, white is cheapest at the Miami port of entry. Thirty days. Buy low, travel, sell high, try to finish with more than you started.
The calculator version had maybe three events. This one has around 245 written outcomes — actual prose, not generated strings. Police chases, undercover buys, product that turns out to be baking soda, partners who decide the deal is theirs now.
Seven factions, and this is the part I spent the longest getting right.

Factions that actually play differently
My first attempt was the obvious one: each faction gets different starting cash and some price multipliers. It worked, and it was boring. Picking a new faction changed some numbers and nothing else. You were playing the same game with a different hat on.
What fixed it was giving each faction a different *escape* when a run goes wrong — and making each one pay in a different currency.
- The Mafia makes a phone call. Cheap, reliable, and only works on police. Connections don’t help when four guys jump you in an alley.
- The Outlaws outrun it. Works on anything, costs you health.
- The Cartel answers with force. Highest success rate in the game, and the city stays hot for days afterwards.
- The Yakuza negotiate. Never escape free, never a disaster either.
- The Red Network simply disappear. Costs a day and nothing else.
- The Syndicate call the block — which works brilliantly until the block is hot, and then almost nobody opens the door.
- The Independent has nothing but nerve. The odds scale with the reputation you’ve built, so it’s a coin flip early and the best escape in the game late.
None of them is strictly best. Each trades a resource you might not be able to spare, which means the same bad night plays out completely differently depending on who you run with.
Then I went back through the most-played events and rewrote the outcomes seven ways. The clearest example is the option to cooperate with police after a bust. Informing isn’t one act with seven wordings — for the Mafia it’s breaking omertà and a phone ringing across town.
For the Outlaws it’s breaking the club’s one rule on camera. For the Independent it takes about four minutes, because there’s nobody above him to give up. That’s the one moment in the game where having no crew is the thing that saves you.

The bug that was quietly eating people’s games
For several versions, Contraband kept the entire run in memory and nothing else. If iOS reclaimed the app while it was backgrounded — which it does, constantly — the run was gone. No message, no warning, just a fresh start next time you opened it.
A thirty-day run is a long sit for a phone game. People were losing them routinely and I had no idea, because nothing failed. It just quietly stopped existing.
The fix was a serializable snapshot of the run written whenever the app loses focus, plus after each travel and event in case of a hard crash. The part I’d do differently: I built it, verified it with a test harness, and only *afterwards* noticed that starting a daily challenge overwrote the free-play save slot — reintroducing the exact data loss I’d just spent a day fixing. I caught it in a screenshot, not in a test.

The genuinely hard problem: making a day identical for everyone
The newest feature is a daily challenge. Everyone in the world gets the same twelve cities, the same starting prices, the same events, the same faction, scored on its own leaderboard. One attempt.
That sounds like a small feature and it is not. It means every random roll in the game has to come from a seeded stream rather than the system generator.
There were 50 of them scattered across the event system and the game model, and all 50 now take an explicit generator:
```swift
Int.random(in: 1...6, using: &gameRNG)
```
In normal play that forwards to the system generator. In a daily it forwards to a seeded SplitMix64 stream.
SplitMix64 specifically, because its entire state is a single `UInt64`. That matters more than it sounds: it means a daily run saved halfway through can be resumed later without the event sequence diverging from an uninterrupted run of the same day. The saved snapshot just carries the generator position alongside the cash and the inventory.
The subtlety that nearly got me was timezones. The daily rolls over at a fixed instant, and Game Center’s recurring leaderboard resets on its own schedule.
If those two boundaries disagree by even an hour, players in the gap submit one day’s challenge into the *previous* day’s leaderboard and get ranked against a completely different seed. The symptom would have been “the leaderboard looks subtly wrong sometimes,” which is close to undebuggable after the fact.
App Store Connect only offers the leaderboard’s start time in your account’s own timezone. So rather than fight it, the game counts days in that same named zone — a *named* zone rather than a fixed offset, so the two stay aligned when daylight saving shifts.

What shipping on the App Store actually costs
Things that took longer than writing the game:
- An in-app purchase rejected because the review screenshot wasn’t clear enough. The app itself was approved in the same submission; the purchase attached to it wasn’t. Which meant the live version had a buy button that couldn’t load a product for about a week.
- A submission blocked with “missing age ratings” while the age rating page showed a complete rating. Apple had expanded the questionnaire; the old answers displayed fine and the new questions sat blank underneath.
- Learning that in-app purchases and leaderboards can’t really be reviewed on their own. They need to ride along with a build that demonstrates them, with review notes explaining exactly where to tap. Reviewers reject what they can’t find in thirty seconds, and they’re right to.
None of this is hard. All of it is slow, and none of it is in the tutorials.

The numbers, since nobody posts these
These are roughly for the first five months in (written Oct 28th 2026):
- App Store impressions – 42,300
- Product page views – 3,030
- First-time downloads – 450
- In-app purchases – 37
- Total revenue – $31
Thirty-one dollars. I want to be straightforward about that, because the genre of “indie dev post” that skips the numbers is doing nobody any favors. The interesting part is *where* it breaks down. Of everyone who reached the product page, 14.9% downloaded — low for a free app, where 30% is normal. But 8.2% of people who downloaded then bought something, which is well above the 1–5% typical for free-to-play.
So the game converts people who play it. It just isn’t reaching many of them.
That’s a marketing problem and a screenshots problem, not a game problem, which is oddly reassuring — and it’s the thing I’m working on next.

Where it is now
Free, no ads, no energy timers, no account, no tracking, works offline. Two factions are free and the rest are a dollar each, or three for all five.
Contraband on the App Store
If you played the calculator version, I’d genuinely like to know whether this feels similar to the thing you remember. Not the thing it actually was — forty lines of BASIC — but the thing you’ve been mentally embellishing for twenty years.
That’s what I was aiming at.



























