
While Steel has been demoted on the list of ‘things to finish’, most of the time that I get in Hammer is spent on Freight. Even though most of the level has been rather straight forward, I decided to spend some extra time on the main landmark of the map.
The trains.
It was an easier said than done to import the trains from cp_well, however, when I inspected their entity colection that makes the trains do their thing (i.e move), I was surprised to see that all of the input and output work involves knock-on activations. Where after one sequence is completed, it activates the next one (e.g. an output using an OnCap or OnOpen/Close or OnPass to name a few) and the next one until it completes the whole train system loop. As a train activates, using an array of random generators and logic gates, the skybox model of one of trains (1 or 3 and 2 or 4, one for each direction on the two tracks) makes it’s way along it’s path, when it gets to the point of trainsition from skybox to map, it activates the train inside the map on a pass. Where this all seems logical and efficient for maps using a skybox train system, it is by no means easy to implement it in other levels which do not.
Like mine!

So I had to carefully whittle away entities that dealt with the skybox trains and then terminated or re-wire their associated inputs and outputs, which was a drag, but at least it was still quicker than implementing it from scratch. Plus, again, I got to understand how Valve does it in their situation, which in most opinions, is the best way.
After dealing with the business of the trains, I realised I also had to make 12 sets of gates, instead of cp_well’s 4. Even though I could copy them, the gates open after a certain time when the trains pass the point of entering the main map. I could have either added in more train paths before and after the gates to open and close them instantly on each passing, or do it the second way: calculate the time it takes for a train to get to each gate - from the entrance train path point - and how long it takes for one of the big trains to lumber through, so the gates don’t close into them. (This does nothing except make the gates clip through the train, it doesn’t break the trains or stop them, it just looks really odd. And stupid.)

I did it the second way, and yes, I think it was a much better and somewhat nerdier way to do it, simply because I got to mess around with a calculator, draw some tables - just like those early physics lessons - and put my high school knowledge to some actual use in a practical application (which has been a few years, I admit). It was strangely fun, because, while I could have gone for the ‘guess some values and see if it works in game’, It was way more satisfying to watch everything open and close perfectly to the time of the trains passing by. I had to say it was the first time I have enjoyed doing maths in a long time.
Oh yeah, the task of compiling and starting Team Fortress 2 (takes about 20 minutes for each attempt) for every guess was another reason I chose to go and geek out and calculate everything before hand.