Weekly Update: Travel & Offline Progress V

Hi Truckers,

It’s a Tuesday so it’s time for another riveting blog post which also occasionally happens on a Wednesday because of Mike and definitely not because of anything I did wrong. Today we’re going to do a deep-ish dive (is that a thing?) into some progress we’ve made.

First, let’s get something out of the way that has nothing to do with the logistical minefield that is the backend rework, and instead talk about this Super™ dope ass Google Sheet we’ve created in order to prep for the polish and balance pass. While I clearly have no idea how to make a Google Sheet sound cooler than it actually is, it’s going to make the production process a lot smoother when we’re ready for that step. Once the sheet has been finalized I’ll go into more detail and share more info. With that out of the way, let’s get into the backend stuff.

In order to talk about what we’ve done, you’ll need to understand where we’ve been. While that may sound like a bastardized version of a Maya Angelou quote it’s the best way I can explain what we’ve been working on this week and also who the hell is Maya Angelou. With our initial ticket system, your save was updated after a few events. Specifically, passing 50 miles, stopping at the truck stop, and completing a route. Remember this little dude right here?

Sure you do. It’s weirdly one of the most praised features we added to the game back in Closed Beta. This adorable little notification brought the assurance our beta testers needed in a time of darkness and desyncs. Savin’ Steve, we’ll call him, was a necessary addition because as complex as STL is we needed a way to communicate exactly when your game was saved since that was unclear to players. Well, Steve’s dead (when we go live).

While Steve did his job in the interim, the game grew exponentially and we kept adding more features. When we first implemented the ticket system, you could only spend scrap and cash at the truck stop. With the addition of new features things started to, how do I put this, implode in on themselves like dying stars. To resolve these issues, we created an individual websocket to count/track your miles in real time. That created its own issues. For example, we’d have to hit the MySQL database way too often to save how much cash you had. To avoid overloading the database with calls every mile in real time, we are simply porting the ticket system to the server. The client can no longer desync because the server is doing all of the estimation in one place and we can keep a running tally of what we call “pocket cash” in redis. Now, any time you hit one of those events or disconnect completely we write your earnings to MySQL at that time. For those of you that are currently suffering from an aneurism after reading that unlike myself who totally understands all of it and how dare you suggest otherwise, let me put it in simpler terms:

The game needs to save your travel in real time so we did a thing that would do that, but it would overloaded our database, so we created an escrow-esque system that holds on to this info and dumps it into the database if the player disconnects. In simpler simpler terms, we save the game when you stop playing. I should have probably said that earlier, but we’re doing some complicated shit that merits further explanation especially for our more tech savvy players 😉

Alright, so what’s next? Probably Weekly Update: Travel & Offline Progress VI because that’s the next Roman Numeral but if you’re looking for specifics we’ll need to make sure your progress is properly stored in this new system. After that, we get to dig into the much anticipated offline progress. Then it’s time to tackle the Super™ Sick Totes Rad AF Google Sheet I still can’t make sound cool.

RIP Steve,

Mike & Dan