Contraband: 30 Days. Work the Circuit

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.

[Contraband on the App Store]

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.

Punta Banco Baby Turtle Release 2021

Punta Banco is a village in Costa Rica where most people in the town are part of a turtle conservation project.

The turtles lay eggs on the beach and the eggs are subject to poaching and natural disaster. The conservation project takes the eggs off the beach and keeps them in a nursery. Once the eggs hatch, they put the baby turtles in buckets and return them to the ocean.

I like to take the new surf friends I meet down to Punta Banco so they can be a part of releasing the baby turtles to the ocean.

This morning we released 81 baby turtles into the Pacific Ocean. Here’s a clip:

 
 
 
 
 
View this post on Instagram
 
 
 
 
 
 
 
 
 
 
 

A post shared by Ian Robinson (@independentian)

Guiengola, Oaxaca, Mexico – Exploring an Abandoned Archaeological Site

Guiengola is an archeological site a half hour north of Salina Cruz in the state of Oaxaca, Mexico. This is an adventure I randomly found while looking at maps on the internet. I don’t know anyone who has done this hike in the past and I couldn’t find any information about it outside the map on Google.

This was my favorite hike that I’ve done in Mexico. I especially like this hike because it’s abandoned. Mont Alban is an archaeological site like this. It’s very interesting, but very well known. At Mont Alban you will have many people selling you things and there are crowd controls which constrict your experience. This hike is not like that. It’s an abandoned archeological site. We didn’t see a single person while on the hike.

If you like that sort of thing and you’re in Oaxaca, you might want to give this adventure a try.

The view from the top of Guiengola

How to Hike to Guiengola

In order to get to the trailhead, we rented a car and drove down a moderately long dirt road. The car we rented was At the time of writing this, the internet maps did not show the actual last section of the road to get there.

You want to drive up that road until you get to the end. The end looks like this:

start of the hike to guiengola

Above you can see the parking lot in the center and the trail head is on the far right.

Hike Details:

  • Hike distance = 3 miles
  • Elevation gain = 700ft
  • Difficulty is easy

It’s a good idea to go in the evening because this area of Mexico is especially hot. I sweated on this hike like a waterfall.

Thoughts on Exploring Guiengola

These archaeological sites are so old that no one really knows when they were built. It’s unlikely that there are people who could explain just exactly what these structures are for or what the people who lived in them actually did.

As I walk around this area, my appreciation for the shortness of human life is enhanced. Many of the structures could have once had large palapas or interesting wood work adorning the structures… but we don’t know. Everything turns to dust and in 2000 years. If you want to build something that will last a few thousand years, your best bet is to build a wall out of rocks.

The Misleading C

In the USA, the water controls for showers and sinks often have C and H on them.

C = Cold
H = Hot

In Mexico, the water controls for showers and sinks often have C and F on them.

C = Caliente
F = Frio

Caliente means hot. Frio means cold.


The C is opposite.