Train Sim Custom Environments

I am happy to announce that another Train Sim update is now live on Google Play!  This time I was able to include 3 of the most requested features:

  • Custom Environments
  • Train de-coupling/Coupling
  • Improved Track Connections

Allowing users to build their own custom environments, is something I always wanted to add to Train Sim.  It is obviously something not easy to implement and previously I never had the time to focus on it.

However recently I added a similar feature to my other game Aquarium Sim and I thought, maybe this could be adapted to Train Sim.  After a few hours of effort moving the code over from one project to another I was surprised that it worked.  I was able to place objects on a Terrain on a predefined track.  I quickly posted a preview video on my Twitter feed and happy with my progress I went to sleep.

Next day I started the real work which would continue over the next 2 weeks.  First I needed to add 50 predefined objects to the custom environment editor.  This was easy but repetitive work as for each object I needed to create a small preview icon.  This involves taking a screenshot of the 3D object, opening it in Photoshop, cutting out a transparent background and saving the result as a PNG image file.  50 times.

I also had to build 2 separate tracks layouts and allow the environments to switch depending on the user choice.  This turned out to actually be that hardest part as none of the other scenes in Train Sim support multiple track layouts, and things were constantly breaking.

Add to that object rotation, Terrain Texture selector & the massive amount of testing around this feature, and I would estimate 100+ hours of total effort.  However I think it was worth it.  Here is one of the later preview videos of the Custom Environment feature (still only had 1 track to choose from)

The other major feature I focused on this release was Train De-Coupling/Coupling.  This was also a much requested feature from many users.  The actual de-coupling implementation was simple.  The tricky part coupling the Train again when it is backing up & from behind the train.  Each engine has a different size which means I had to adjust and test each of the engines plus double engines, plus tenders.  If that was not enough I also had to make sure I can de-couple go around the track and push the train from the back.  Again accounting for the variable engine size, testing each one. I even build a small track for testing this feature that allowed me to go around and push the train from behind faster.  48 times …

Here is one of the final video previews I shared on my YouTube channel.

In the future I hope to expand this by allowing users to drop off and pick up cars from the rail yard.

Finally one of my personal pet peeves in Train Sim were always the Track Connections.  Not only were they buggy, they also looked terrible as the tracks would visually just overlap with the main track always on top of the connection.

This new version of Train Sim fixes both this issues as Track connections now work much better and look much better.  The actual solution to this was very simple and I can’t believe I have not through of this in the past.

As always this new version of Train Sim is available on Google Play first with the other platforms coming soon after.