Playmentum + Stepford County Railway

Find out how we help the team at Stepford County Railway bring their railway simulation game beyond-the-game.

What is Stepford County Railway?

Stepford County Railway is a railway simulation game on Roblox. Players choose to play as a Passenger, Driver, Dispatcher, Guard or Signaller and carry out different tasks depending on the role they choose. The Hub Site allows players to track their own statistics and see those of other players who have chosen to share them.

As players carry out their tasks, live information is streamed from the game onto the Hub Site - this allows them to, for example, track the progress of the train they're driving.

What did we build together?

The Hub Site is a "world first" for Roblox. Together, we built an end-to-end solution which captures events that take place in-game and turn them into meaningful data beyond the game.

The solution comprises five main components.

  1. Roblox Scripts: A series of Roblox ModuleScripts and functions that capture in-game events and submit them to the Event Sourcing API.
  2. Event Sourcing API: A RESTful API which receives batches of events and distributes them for processing by the Event Engine. The API supports the latest encryption standards, and each request is required to present an API key to help ensure that only legitimate data can be passed to the Hub Site. The API component runs concurrently on multiple nodes in the swarm to provide resilience, non-disruptive upgrades, and load balancing. As an HTTP service, it's also deployed Cloudflare DDoS protection.
  3. Event Engine: A scalable and resilient state machine which processes the events sent from the game and uses them to track players, servers, role activities, and the overall state of each SCR game in progress. Event Engine does not expose any public endpoints. It receives events sourced via the API using RabbitMQ, processes these (often concurrently) and updates the database and cache accordingly. Multiple instances of Event Engine run concurrently, and the number of running instances can be scaled up or down to suit demand.
  4. Scheduler: A process which performs aggregate statistics calculation, updates live departure boards, and performs maintenance tasks. Tasks are carried out once the Scheduler service injects pseudo-events into the Event Sourcing API, and are processed on instances of Event Engine .
  5. Web Site: A modern, clean and high performance web frontend that allows players to view their statistics and watch games play in real-time.

As well as the Roblox Luau scripts which run inside the SCR Game, the Hub Site tech stack includes:

  • Docker Swarm, used to host a fully containerised environment on virtual machines hosted and managed by Playmentum. We use Docker Swarm to easily scale and add resilience to the solution.
  • MongoDB, chosen for its incredible speed and low development overheads.
  • Redis, chosen to provide highly scalable and low latency caching and pubsub capabilities.
  • RabbitMQ, chosen as a reliable messaging queue which can scale to hundreds of thousands of messages per hour, and can support hundreds of concurrent producers and consumers.
  • .NET 8, chosen for the strength of both C# and the associated package ecosystem.
  • Blazor WebAssembly, chosen for its blazing fast client-side performance and the ability for us to reuse code across the client/server boundary.
  • SignalR, chosen for its ability to deliver real time notifications from the Hub Site servers straight into the client-side WASM application.

Using the architecture designed and built by Playmentum, the Hub Site processes nearly a million events each day, collating them into real-time and historical information to display on the site. New information appears on the site less than 2 seconds after events occur in game.

What do the team at Stepford County Railway think about Playmentum?

"Working with Playmentum has been a game-changer for Stepford County Railway. Their innovative approach in creating a companion site surpassed our expectations. From a compelling proof of concept to several design iterations with real users, Playmentum demonstrated great diligence – our community's interests were kept in focus the whole time.

Now, our players enjoy sharing live stats on social media and discovering exciting servers by viewing the ongoing activities at a glance. Beyond engagement and retention, the provided statistics are also invaluable for planning new features. Kudos to Playmentum for energising our gaming experience!"

PROJECT OVERVIEW

Playmentum, working in collaboration with Stepford County Railway, develops and supports the Stepford County Railway Hub Site. Combining historical statistics with real-time insight, the Hub Site brings the Stepford County Railway experience "beyond the game", and into the browser.

The Hub Site went live in December 2023.

SCR LIVE
Players Online Now
1,008
Servers Online Now
54
Player Tasks In Progress
745
HUB SITE LIVE
Average Event Processing Delay
1.31 sec
Average Event Processing Duration
0.02 sec
Current Event Throughput
163,668 /hr
Total Player Tasks Tracked
33,588,424
Total Known Players
3,098,935
These statistics refresh automatically once every minute, and were updated at 16:06.