The next station is Midland
Note: The images, features and info in this devlog may change on the final version of the game.
Hello friends and followers and happy Saturday to you all. This week we have a massive update for you! This is the biggest one we have done yet.
Before we jump into everything on this update. You may have seen last Sunday we did a live stream for about and hour. This was a fun little thing we did for you all. We put a time-lapse up on your Youtube channel if you wanted to check it out. Aiming to to more streams when time permits so be sure to subscribe to the channel as that’s where ill be going live.
It wouldn’t be a transit system or a game for that matter if there is only one station to play! We have to build almost 50+ stations for the game so this expansion to our second playable station was important step for the game to see how the process will go to build another station in the code.
I wanted to design the game in a way that would be quick for us to add a station on the back end. Adding it wouldn’t require extensive work or changing 100’s of lines of code or worse, building a whole new script. This was a test of that.
While it’s done we did create some bugs that we were able to iron out so now when we push and create Fairview it should go much smoother now. The creation of this station also really makes the game start to feel like a game. You can switch between the stations no problem and the game just runs!
Signal System Enhancements
In order for users to play the game and deal with the incidents, expand their network and change economy items to be profitable. The back-end system that runs the game just needs to work perfectly.
As stated in a previous devlog we created signal blocks. Signal blocks in this game are working just like real life. A train entered the block and tells the blocks around it not to accept any trains. This was created by creating fictional distances between the stations then telling the game to move the trains through that distance at a certain speed.
Do you remember in school when your math teacher asked how long it would take to go 3km at 45km/h? Well, that math I reluctantly learned in Grade 8 came in handy in this case and this case only.
We still have tons of work to do on the signal system and wont be able to create it in it’s full capacity until we complete all stations. But for now, the signals from Windermere to Midland and Midland to Fairview are complete and working.
The game now even only spawns arriving trains to the stations if there is actually a train coming. Super cool!
As hinted above, with the expansion of the game into Midland this exposed several bugs that were fun to crack and fix. One of the bugs that we had was that when a train animation starts and the train appears to be entering the station. If the player hit the main menu button and then went back into the station the game would crash. Through a long long Sunday night of trying to fix this bug and consulting several developer discords. We were left with a bug that was unfixable based of the design of the game.
You see, when the animation for the train runs. There is a bunch of code that is running in the background that is calculating how many people to spit out the train, how many people need to stay on the train, and most importantly telling the signal system that there is now a train in the station.
If this process gets cancelled by going back to the main menu then the whole game crashes. It crashes the signal controller script and the game is done. It almost looks post apocalyptic. Trains not running, no one spawning, just an empty transit system. Cool look, but not the game we want.
To fix this we needed to do some things with the UI to stop the game from breaking. The first thing we did was created a loading screen when you enter the station. This gives the game enough time to process everything it needs to process.
The second thing we did was disable to UI temporary when a train enters the station (or better way to put it. When that function to calculate everything) is called. This adds sort of a cinematic approach to the game and in my opinion looks kinda neat!
There was tons of other little things that were done in this update. Please take a look at the change log below! Again, follow us on all our socials to stay in touch with the progress of the game. Talk to you all next week.
Commuter: The Game Alpha v0.4 Feature: Midland Station now created. Feature: Non-Hub stations (Midland) now talks to signal blocks vs set code. Feature: Signals from Windermere to Midland created. Feature: Signals from Midland to Fairview created. Feature: Trains now have a running cost calculated at departure Tweak: Removed money awarded for arriving customers. Now, users will not get double paid for one person. Tweak: Adjusted train capacity to be more realistic. Tweak: Signal block update with departing trains vs set values. Tweak: Smoothed departing and arriving train animations. Tweak: Players now spawn @ hub stations (Windermere) on the side where the train currently is, or will be next. Tweak: Canvas UI disabled during arrival animation to prevent crashing if the players goes back to the main menu during animation. Tweak: Adjustment to signal spawn times. Tweak: Player speed adjusted to be more realistic. Now have fast walkers and slow walkers. UI: Loading screen added on levels. UI: Social buttons and branding added to splash screen & main menu. Design: Changed colours for Midland station. Bug: Design bug fixes. Bug: Fixed spawning location bug. Bug: Fixed game crash where if spawned while train was in station. Game would crash. Bug: Fixed bug where sprites wouldn't load on first launch of game. Bug: Fixed bug where capacity bar was broken.