Trains!


I'm back! I didn't work on the game for over a month, due to a nice long holiday + work getting a bit hairy, but finally I found some time and dusted the project off again.
Not much progress to show, except that I added a rough v0.1 version of trains, which will both carry new civs to your town, and evacuate them if needed:


The train looks weird when it takes the curve because its an insanely unrealistic sharp 90-degree turn - I don't think there is a way to make it look better except to make the curve shallower - which is something I will try and do in future. EG like in Factorio, where despite the world being gridded, railtracks have curve limits.

Train mechanics

The train effectively spawns and despawns civilians, but with a delay. The number of civs spawned is simply population capacity of placed buildings - current population . In addition, the train has a maximum capacity of passengers it can hold at once, so if a lot of people are trying to leave (a la Saigon 1975) then multiple journeys will be required.
The gameplay idea behind this is that (for example) you can't just spam a bunch of defensive building at the last second to stop a zombie incursion - you have to pre-plan because the soldiers to man those defenses will take a non-neglible amount of time to arrive on the train and walk to their post. Without this train, I worried that the optimal playstyle would be to only play reactively - placing zero defenses until zombies actually attack, and then clicking as fast as you can to instantly create a defense. While that kind of high-APM gameplay is good for Starcraft, I wanted my game to be a bit more strategic, and to require forward planning. (edited) 

In addition, I hope that the painfully-slow train might create some fun tense moments, as you helplessly watch and pray as the train slowly rolls its way towards the station when you really need it.

Train model

Placeholder art for the train because my Head Artist is currently on holiday Eventually I want them to make the train model look exactly like the universally despised Pacer, because  I think it will be funny:

Tech Debt:

Also as an aside, I am seriously struggling with some tech debt/discoverability in the codebase. The whole gamedev paradigm of having tons of objects with small scripts attached to them is super hard for me to keep in my head at once - I wish I just had a handful of medium/large-sized C++ style header files, and the ability to clearly define private v public interfaces therein. These issues can be mitigated with careful funciton naming and even more careful filesystem structure, but I haven't really being doing either of those things as well as I would like, and I am suffering for it. Most of the time today I spent just rearranging and renaming files to try and make this a little easier in future. 

Leave a comment

Log in with itch.io to leave a comment.