# Night Train: Sleep on a night train

> A window seat on a sleeper train, for the hour you cannot sleep.

App, 2026. Status: live. Platforms: iOS, Android.

Night Train hands you the window seat on a sleeper train. Rain runs down the glass, lit towns and named stations go past, and the train slows as you do. In the morning there is a postcard from the station you woke at, and how far the night carried you.

It is built for the hour when you cannot sleep and your thumb reaches for a feed. There is a train instead, running through the dark on its own. Nothing to finish, no score, no next episode, and no reason to keep watching except that it is quiet out there.

The whole line comes out of a single number, so it is endless and never repeats. Forests, coastlines, fields and dry country arrive at their own pace, and the stations differ from one another: a halt with one lamp, a junction with a clock under a canopy, a harbour with a jetty lantern. The weather turns over while you are inside a tunnel, so you go in with rain on the glass and come out into snow.

Everything you can do to the window is a gesture, and none of them are asked for. Wipe the fog off the glass, hold a finger still until a lantern follows it, draw the curtain, slide the pane down to let the rain in, tap the tea for a few slow breaths. Do nothing at all and the train still runs. The screen dims, warms and slows the longer you stay, and the sound keeps rolling for a while after the phone locks.

The rain is a fragment shader. The fog that grows back over it is a separate field computed on the CPU, so wiping the glass clears what is actually there instead of resetting a texture. There are no accounts and nothing to sign in to: the route, the journal and the postcards stay on the phone.

## How it was built

Night Train is built for the hour when you cannot sleep. Its design rule is called the tired-thumb law: zero decisions, zero failure, zero end, zero memory. The train runs on its own, and every gesture, from wiping the fogged glass to opening the window, is optional.

The decisive technical choice was to generate the whole line from a single seed: forests, coastlines, towns, named stations and the animals at the right places, endless and never repeating, with weather that only changes inside tunnels. The rain on the glass is rendered with a shader, and the fog you wipe away grows back the way real condensation does. A night curve dims and slows the scene the longer you stay, then lets the screen lock while the sound keeps rolling for a while.

## Highlights

- **One seed, endless line**: Every kilometre is generated from a single number, so no two nights run the same route.
- **Rain on the glass**: A fragment shader draws the rain, and the fog that grows back over it wipes away under a finger.
- **Seven things to find**: The wipe, the lantern, the curtain, the window, the tea, the fireflies and the skip, each taught where it happens.
- **Wake at a station**: Set a morning hour and the train pulls in: the light comes up, the chime rings and the whistle goes until you touch the glass.
- **A postcard each morning**: The station you woke at, the night's number and the distance travelled, kept in a journal you can share from.

## Questions and answers

**Is Night Train free?** The first three nights are free. After that Night Train Plus is a single purchase of $9.99 that keeps the window open for good. There is no subscription and nothing renews.

**Does it need internet or an account?** No. Nothing is signed in and nothing leaves the phone; the route and the journal are stored locally.

**Does the sound continue when the screen locks?** Yes, for a while. The night curve fades it out on a sleep timer, so it does not run all night.

**What happens if I do nothing?** The train keeps going. The screen dims and slows on its own, and in the morning a postcard shows where you fell asleep.

Technologies: Flutter, Dart, GLSL, RevenueCat

## Links

- [App Store](https://apps.apple.com/app/id6807508538)
- [Google Play](https://play.google.com/store/apps/details?id=com.tancode.nighttrain)
- [Privacy policy](https://tancode.dev/night-train/privacy)

Built by Ahmet Aytanözü (tancode). Page: https://tancode.dev/projects/night-train
