Windows build (506 MB): SubwaySimulatorWindowsBuild.zip (Google Drive download link)
Subway Simulator is an Unreal Engine-powered game which allows players to ride subway trains in real-time as they travel in the world. It utilizes publicly-available gtfs-realtime data (see https://gtfs.org/realtime/reference/ for more info) to track relevant station and train data, which is the same data that a lot of popular transportation apps like Google Maps use.
To play, download the zip, extract, and run the SubwaySimulator.exe file. Simply pick a starting station and wait for a northbound or southbound train to show up. And then get on one :). If you find yourself waiting too much, you might check Google Maps to find a station with more trains, or a route with more frequent stops. Have fun!
Controls: WASD to move / mouse for camera movement. ESC to quit. TAB will allow you to use your mouse cursor so you can do something else while you're riding or waiting.
Currently Subway Simulator supports routes 1-7 of the New York Metro system, and can be easily extended to support other routes/cities as long as they have a gtfs-realtime feed.
It's a work in progress, and I'm adding more features to make it more entertaining/interesting/usable (feel free to let me know if you have any suggestions!).
In this demo, I start at Times Square station, get on a southbound 1 train, and ride one stop to 34th St-Penn station. Then I get on a northbound 1 train (this was recorded on a busy Wednesday) and ride back to Times Square station.
Under the hood, Subway Simulator uses multi-threading (Unreal's FRunnableThread) to separate the game logic from the gtfs-realtime feed queries. A background thread queries the feed periodically and reports any findings to the main game logic thread. Generally, while the player is on a train the background thread searches for trip updates, and when they are not it will search for arrivals to the current station (but there are exceptions - one of the game's features is that you can see other incoming trains at a station even if you don't get off your train at that station).
Collision detection is used to check if the player is on the train when it is leaving the station.
Gtfs-realtime data is serialized using Protobuf. To deserialize it using C++, the auto-generated Protobuf classes must be compiled using the gtfs-realtime standard .proto file (and a compatible version of Protobuf). I also had to add that version of Protobuf as a dependecy in my Unreal project.
Unreal DataTables are used to store and query gtfs-static data. While gtfs-realtime data provides information in real time, the data only contains identifiers such as a train's trip ID (example: A20111204SAT_021150_2..N08R). These identifiers can be used to query the gtfs-static data to find displayable information such as the station name, train route number, and trip headsign. The New York Metro provides a usage guide for doing these lookups and generally making sense of its gtfs-realtime data: https://new.mta.info/document/134521.
I'm a game developer with ~8 years of software engineering experience. I enjoy modeling real-world systems using software. LinkedIn: https://www.linkedin.com/in/melissa-forbis-3a7bb484/
If you like Subway Simulator you might also like my other system-y project, Elevator Simulator (built with Unity/C#). Elevator Simulator is a realistic dual elevator controller, which allows users to simulate different elevator configurations and provides detailed statistics such as average wait time and ride time.
I got started with Unity by taking Coursera's Intro to Game Developement course. We each built our own version of Box Shooter, which is a two-level shooter built using Unity3D. Includes animations, particles, collisions, triggers, and smooth level transition.