The story · Chapter 9 of 14
Oct 1, morning

On the television

The morning after the ship, the whole state came to a television: an issue at 08:51, a beta on an Apple TV by 10:41, and every county’s roads by half past eleven.

Under 2 hoursfrom the first ask to the beta
2017the Apple TV it was built on, the first 4K one
35,194parcels raining as glass, as on the landing
120counties, every road loaded as you go
A television showing Hello, McCracken over the county in red glass with lit roads and rising beams, a laptop in the corner with its screen blurred
The beta on the 2017 Apple TV, photographed off the screen: McCracken in glass, beams rising from this year’s sales, and the way back up at the bottom left.

Hello Kentucky

make an issue “need TVOS app soon” detailing how to make the tvos version of what currently lives at mccracken.properties with the full animation sequence in a tvos app

Oct 1, 08:51

The issue went up with the landing’s real sequence read out of its code: the pour, the lean back, the circle, the rain. Six minutes later came the first build: “just make an app that says Hello Kentucky … when that runs, we’ll decide on the actual implementation.”

The app was written in minutes. The simulator was another matter. The helper that mounts the Apple TV’s system in the simulator kept being killed for using too much memory, so every simulator command hung, and restarting it changed nothing.

christ what’s hard about making a tvos hello world

Oct 1, 09:12

forget the simulator we have an actual apple tv

Oct 1, 09:12

The real Apple TV was already paired and ready. One wrong device number later, “Hello Kentucky” was on the screen at 09:15, white on the landing’s dark.

Hello, McCracken

“Does tvOS do location?” It does, coarsely and once. An Apple TV has no GPS: it places itself from Wi-Fi to roughly a town, and an app may ask once while it’s on screen. That’s enough for a county, not for a parcel.

if we have parcels for their detected county, say “Hello, McCracken (or whatever the county name is)” leave “Hello Kentucky” for when there is no location. try this

Oct 1, 09:18

The app doesn’t ask Apple for an address. It carries the outlines of the counties with parcels, today just McCracken, and checks its one location against them. The outline is the Census county line, which runs out to the state line in the Ohio, so the riverfront counts. Paducah’s riverfront, Reidland and Lone Oak came out inside; Mayfield and Metropolis outside. When a new county’s parcels arrive, its outline joins the file and the greeting follows.

Taken from the statewide page

That morning a statewide page, /full-state, had been built on the new statewide data: all of Kentucky, its highways in light, drilled down from the state to a region to a county.

this tvos app should be directly inspired if not taken from the /full-state/ experience on the web

Oct 1, 09:26

On a television, “taken from” can’t mean running the page: Apple ships no web engine for the Apple TV. So it means taking everything underneath the page:

  • the same packed files, read the way the page reads them;
  • the same three levels and the same rules for moving between them;
  • the same camera math, poses and timings;
  • the shaders, rewritten for Apple’s graphics.

The remote takes the pointer’s place. A swipe moves the highlight to the neighbouring region or county in that direction, a click goes in, and Back goes up. At the state, Back leaves the app, as Apple TV apps do. Location picks where the opening ends.

The state map reached the TV at 09:36.

i selected mccracken and it crashed out... also no instant tron

Oct 1, 09:36

i selected it again and it worked. the map is generally good and navigable

Oct 1, 09:38

The crash left no report behind, and it hasn’t been seen since.

Instant light

Now the highways glow from the first frame. Half a second later the page’s border fill begins: light enters on the roads at the state’s edge, and each road lights at its share of the trip in to the nearest county seat. Then pulses stream into all 120 seats.

Before anyone looked, the flow was checked again in a separate script. 13,500 of the 14,122 road junctions reach a seat. A typical one is about 5½ seconds of light-travel from it; the farthest, 38.

roads nominally work. nice. pour was ok for first attempt we can tweak it later

Oct 1, 09:42

‘selected region’ could be more pronounced, perhaps by dimming unselected counties while choosing?

Oct 1, 09:43

Dimming came in three strengths: the highlight at full brightness, the rest of the region you’re in eased back, the rest of the state dark. “Nice. What’s next.”

Every road, at county scale

when mccracken was selected i imagined i’d see more tron from its smaller roads

Oct 1, 09:45

In a county the app still drew only the state’s highways. McCracken already had its own full road graph, the one Light roads and the landing draw: local streets, private drives and alleys, all flowing into downtown Paducah in the three downtown sectors’ colours, coral, blue and gold.

yes definitely version control this immediately.

Oct 1, 09:45

let’s do the camera tour and opening sequence before we do rain

Oct 1, 09:46

The first commit landed at 09:46: the state map, the drill-down and the light.

kinda we now have the smaller roads but they just popped in when i selected the county. they should have poured in on that scale

Oct 1, 09:48

They popped in for two reasons. They poured while the camera was still flying in at state scale. And a test in the shader sent them down the river banks’ path, so they never poured at all. Now McCracken’s streets pour in from the county line to downtown over four seconds, once the camera is overhead, while the state’s highways there fade out.

The camera and the opening

The camera is the page’s own: a 30° view of a ground point, with its width, its pitch and its heading. So is the tour: overhead, then a lean back over the south-southwest side for five seconds, then a full 372° circle over 22 seconds that comes to rest with north up. Only the 1.6-second flights between levels are the TV’s own; the page cuts.

The opening plays the levels as one sequence:

  • Kentucky from overhead while the light pours in;
  • the lean back;
  • if the Apple TV is in McCracken and nobody has touched the remote, a glide to the Jackson Purchase, then to McCracken;
  • McCracken’s every road pouring in, then the lean back and the circle.

Any press hands over control. Swipes follow the screen as the camera turns, so up means up as you see it, not north.

looks good what remains? glass, river fluid, what else

Oct 1, 09:53

Parcels, parked

we will not be navigating to individual parcels yet so don’t bother

Oct 1, 09:54

Then, a minute later: “wait.”

before you fully remove parcel nav, do you have ideas on how to do it? i said remove it because idk how to nav thru 30000 items with a tv remote. ideas?

Oct 1, 09:54

The answer was to never put more than a few dozen choices in front of the remote at once. Five ideas went into the plan:

  • keep drilling down, through neighbourhood and street to parcel;
  • a list of addresses that the map follows;
  • hopping between the parcels on screen;
  • a short row of highlights: sold for more, sold for less, the biggest sales, new parcels and splits;
  • voice search, later.

They were parked rather than dropped, with one more thought:

i suspect the glass effects could create very magical nav experiences for parcels, so i’m down for experimenting once we get the rain in

Oct 1, 09:56

Glass rain

The glass is the landing’s, carried over whole. McCracken’s 35,194 parcels come to 285,421 points and 217,763 triangles, and those counts were checked against the files before the build went near the TV.

The rain keeps the landing’s order: downtown first, then spreading outward, a few at first and then a downpour, over 14 seconds. The parcels that changed hands land on their deed dates, and the river never rains. Each block falls for 1.1 seconds, squashes and glints as it lands. It rises from below at the state and the region, and falls from the sky in McCracken.

The shading takes the landing’s two passes. First, what’s behind the glass is tinted by the parcel’s use. Then the glass adds its own light: a low golden sun, bright rims, and this year’s deeds glowing gold, white, green or red.

An older Apple TV

it’s a little jerky, but i’m not even sure this is a modern apple tv.

Oct 1, 10:03

It wasn’t: the box reports itself as the first Apple TV 4K, from 2017. A TV app still has to run smoothly on what people own, so three changes went in. “Let’s do 2 3 and 4.”

  • Each pixel drawn once, not four times over to smooth the edges. The soft glow hides them anyway.
  • Glitter from afar. Where a parcel would cover a pixel or two, it rains as a point of light on the same timeline.
  • A steady 30 when 60 won’t hold. If frames run slow for half a second, the app settles to 30 a second, and goes back to 60 once it has been comfortably fast for three. Everything moves by the clock, so only the smoothness changes.

Wins and losses

when it completes the animation, the transferred parcels that would be red/green should pulse brightly so we can see wins/losses here, since we’re no longer doing the color splash

Oct 1, 10:09

The landing’s heartbeat, a hard beat every 1.2 seconds, now holds for as long as the view rests. The 220 parcels that sold higher beat green and the 11 that sold lower beat red: whole blocks in McCracken, brightest along the rims, and the glitter from afar. Moving on stops it.

Water, lights and a voice

now do the river water. what else remains

Oct 1, 10:15

The rivers became the page’s water: dark, brighter where the camera looks along them at a low angle, warm off downtown Paducah. A rippled sheen drifts downstream on the page’s own current map, quick in the Ohio’s channel and slow on the lakes, and it loops without ever visibly jumping.

1 then 2 and then 4 then summarize where we are and what we’ve done

Oct 1, 10:21

A lean-back loop. While the app is open the screen stays awake. Once a tour has come to rest and the remote has been left alone for two minutes, the opening plays again, silently. It suits a lobby.

The lights. Points of light walk the roads toward the seats, favouring the bigger roads, each trailing a fading ribbon, and vanish when they arrive. The web runs 22,000 of them; the 2017 Apple TV runs 5,000.

Captions and the voice. At the state the captions read Welcome to Kentucky, then Kentucky, 1792, then Kentucky, lit. A region shows its name and its counties. McCracken opens on Welcome to McCracken County, then Established in Kentucky, in 1824. During the rain the caption follows the deed calendar, month by month, with how many parcels changed hands. The landing’s voice plays with the opening, and Play/Pause starts it over, as the landing’s restart button does.

The effects, kept contained

rest of the glass effects. i worry it’s gonna blow it up with complexity

Oct 1, 10:31

Four rules kept it contained:

  • Their own file. The effects live apart from the glass, in about 110 lines. The code they share moved into one small file both use, so the glass got shorter, not longer.
  • Nothing new to load. Each effect draws from what the glass has already loaded.
  • Only the deeds. Crowns, beams and sparks touch the 1,742 parcels that changed hands, not all 35,194.
  • A switch each. Any effect can be turned off on its own.

Ripples spread under every block as it lands. Each deed gets a neon crown: higher spreads outward, lower pulls inward, about the same rings twice. A slim beam rises as each deed lands, the one mark that reads from far off. And eight sparks fly, thrown up for higher and skidding low for lower. At rest the green and red crowns ring again with every heartbeat, and their beams flare.

Two things stayed out: the starbursts and cracks for new and split parcels, which need a file of their own, and the landing’s bloom, too heavy for a 2017 box.

The beta

i think i’m ok with this for now. save anything lingering to issues, update any issues we should, let’s consider this the beta of the TVOS version of PVAToday

Oct 1, 10:37

The beta was tagged at 10:41. What was left became nine issues: ground and sky when the camera leans back, starbursts and the glow, the running total, data from the network, keeping in step with the web, every road for the other counties, the release, older Apple TVs, and parcel navigation, parked.

Every county, over the network

what needs to happen to load the data dynamically instead of bundling everything? i’m thinking especially roads (since we’ve only the one county of parcels).

Oct 1, 11:14

yeah let’s r2 this at taxr.org

Oct 1, 11:16

Every county’s roads had already been cut from the statewide data. They were packed with the same road packer the site’s pages use, so the web and the TV read the same files. That packer had only ever packed McCracken and assumed downtown Paducah, so every other county crashed it. A small change centred each county on its own seat, and the change went back to the packer’s owners.

Two counties hit a limit. In Breathitt and Pike the farthest roads are more than 65.5 seconds of light-travel from the seat, the most the format can hold, so those two were packed with the light running half again as fast.

All 120 went up on roads.taxr.org: 28.8 MB in all, with Jefferson the largest at 849 KB. One small list names each county’s file. Each file’s name is a fingerprint of its contents, so it can be cached for a year, and a changed file is simply a new one.

The app reads the list at launch. A county starts downloading the moment it’s highlighted, so its roads are usually there before the click. Each file is checked against its fingerprint, kept, and unpacked in the background, and the six most recent counties stay ready. The Apple TV may clear an app’s downloads at any time, so anything can be fetched again. The pour still waits for the camera to be over the county. The state and McCracken stay inside the app, so the opening never waits on the network.

jefferson poured in fine, works

Oct 1, 11:29

is that r2 cost gonna blow up on me or is that what r2 is about

Oct 1, 11:29

It won’t: downloads cost nothing, a cached file rarely reaches storage, and 29 MB sits inside the free allowance.

eventually we will want parcels.taxr.org but not yet

Oct 1, 11:38

What’s next

At 11:57 a ship checklist laid out the road to the App Store. It covers signing, the icon and the art for the home screen, and a privacy label of “Data Not Collected”, since the location never leaves the Apple TV. Then the voice’s rights, drawing at full 4K, an hours-long soak test, TestFlight, and review.

The running total on the TV waits on one piece of data housekeeping. Glass rain outside McCracken, and the parcels’ own server, wait for a second county’s parcels. Parcel navigation, and the glass that might lead it, are parked until then.

  • “Need TVOS app soon.”
  • Hello Kentucky, on the real Apple TV.
  • Hello, McCracken, by location.
  • The state map and the drill-down.
  • Instant light: the pour from the state line and the seats.
  • Under version control.
  • The camera, the tour and the opening; streets pour at county scale.
  • Glass rain.
  • Smoother on a 2017 Apple TV.
  • Wins and losses beat at rest.
  • The rivers as water.
  • The lights, the lean-back loop, captions and the voice.
  • Ripples, crowns, beams and sparks.
  • The beta.
  • Every county’s roads, loaded as you go.
  • “Jefferson poured in fine, works.”