This was a long time coming - I like trains, so gathering all my past knowledge to make a mod about them sounded fun. This was much more of a what-if scenerio during some free time. What if there were trains in a game about prospecting?
It began with planning out the rail network. To begin with rails typically tend to follow a linear path, while bending and conforming to the existing terrain to reach from point A to point B. With how far the two points could be, rendering all of the track at once could potetntially crash the game. Splitting the track into segments and only calculating and rendering what was within range permitted tracks of nearly any length to exist safely. I had orginally decided on using 3D bezier curves for the track generation algorithm to follow, but as-is it produced a track that floated in the air between the two points. To resolve this, each loaded track segment would be procedually “shrink-wrapped” to the terrain. This had considerable success, but not to the degree I was hoping for. It took a layered algorithm to gradually taper the elevation and add bank on turns to make the tracks more natural.
I created some models and kitbashed them with others under permission to create a series of blocks to represent a basic train system. All of it was put together, and some users who were curious about the mod playtested it.
In hindsight the mod doesn’t make much sense since most of the reasons for having a train is moot, and the mod remains unreleased to this day. Over time though, there have been other mods on the workshop that involve train tracks, so maybe when I clean up the remaining bugs, then I can release it to the public?
Since the last update, the mod only had trains that didn’t load the world around itself, but now it does. It is much more practical for long-distance operations.
Looking back, I should note my inspirations for this mod as each of them additively were responsible for this mod’s existence. Before I had even begun to code, back in my childhood, I had a fascination with trains and had the opportunity to play with a modular train set. Then later on while browsing Youtube I stumbled upon some virtual train simulation videos which had some sort of physics engine in play. Previously I had played a game called “Astroneer” which had a monorail system with bendy tracks which also seemed to use some form of bezier curve system, but there were no physics in play. Finally, even though it came out during the mod’s development, a honorable mention would be the Minecraft Create mod with its buildable train system which also doesn’t have physics.
I may improve and use this knowledge if I ever decide on making a game though.
This pertains to a public global game community on Steam and with any game it is populated with some complicated users. For more details on the subject, please contact me in person in class.