About Rail Typing
Rail Typing is a small independent project: a typing game where you drive a train along a real rail line by typing each station's name in order. It currently covers 52 lines and 1078 stations across Tokyo and Osaka.
Why I built it
I started learning Japanese typing the way most people do: with word lists. They worked, and they were dull. What finally made practice stick was typing things I already had a mental map of — and for anyone who has spent time in Tokyo, the rail network is exactly that. You do not need to memorise 新宿 as vocabulary. You have stood on that platform.
So the game turns a line into a run. You pick a line, a starting station and a direction, and the train only moves when you type the next station correctly. The Yamanote Line's 30 stops became the first course because it is a loop — there is no terminus to reach, so a run has a natural, comparable length, and you can go around again without setting anything up.
The result is that practice has a shape. A run is not 'type for two minutes'; it is Tokyo to Tokyo, and you either got there faster than last time or you did not.
How the typing engine works
The part that took the longest was the romaji matcher, and it is the part I am most willing to defend. Japanese romanisation is not one-to-one: し is legitimately shi or si, つ is tsu or tu, しゃ is sha or sya. A typing game that accepts only one spelling is not testing your Japanese, it is testing whether you learned the same romanisation table as the author.
So every kana unit carries the full set of spellings it will accept, canonical form first. Matching is incremental and prefix-based: a keystroke is accepted if any remaining candidate for the current unit still starts with what you have typed. Type 's', and shi, si, sha and sya are all still alive; type 'y' next and you have committed to sya. Nothing is decided until it has to be.
Two kana refuse to behave, and both are handled at tokenisation time rather than during matching. The sokuon っ doubles the following consonant, and ん is followed by an n that belongs to the next mora. Both fold into the unit that comes after them before typing starts, so the matcher never needs to look ahead across a boundary. It is the kind of decision that is invisible when it works and produces maddening bugs when it does not.
A wrong keystroke is rejected rather than swallowed. You do not have to backspace out of a typo — the character simply never lands, the mistake is counted, and you keep going. Backspace still exists for stepping back through morae you completed, and it works by replaying the input from the start rather than trying to undo state in place.
Where the data comes from
Station names, kana readings, station numbers, line symbols and line colours are public facts. I transcribed them from the operators' own signage and published station numbering, then checked each line's ordering end to end. Every station's kana reading is tested automatically: the build fails if any name cannot be typed to completion using its canonical romaji, which has caught more of my typos than I would like to admit.
Each line's on-screen shape is either traced by hand from the official schematic or projected from real coordinates, depending on the line — a subway map is a diagram, not a map, and the point is that a line looks like the thing you would recognise on a station wall.
Line data carries a version number. When a line's stations or input rules change, the version is bumped and results only compare against other runs on the same version, so a personal best never quietly becomes incomparable.
What this project is not
This is an unofficial fan project with no connection to JR East, JR West, Tokyo Metro, Toei Subway, Osaka Metro or any other operator. Nothing here is endorsed by them, and no operator artwork is used.
Every illustration, map, sound and line of commentary on this site is original. The sound effects are synthesised in the browser with the Web Audio API rather than sampled, which is partly an aesthetic choice and mostly a licensing one. The train illustrations are drawn for this project.
Timetables, fares and service information are deliberately absent. This is a typing game that happens to be about trains, not a travel planner — for actual journeys, use the operators' own tools.
Getting in touch
Corrections to station data are especially welcome — if a reading is wrong, I want to know. Everything reaches me at support@railtyping.com
Unofficial fan project. Station and line names are public facts; all visuals and audio are original and unaffiliated with JR East, Tokyo Metro, Toei Subway or any operator.