Devblog #2: Modding and Filestructures

Art of the Rail

Spiritual remake of the classic transport tycoon games. Build a profitable transport network and grow your worlds economy, either on your own in singleplayer or in multiplayer whether cooperatively or competitively.

Much of the work for the past few weeks is a bit harder to see directly in the game but is incredibly important as a foundation for a solid game in the future. [h2]New Content[/h2] https://sketchfab.com/models/0f59fa935948494d877f63b0f4e28fe2 Our two artists have been feverishly adding more content to the game. This ties in very well with the filestructure improvements detailed above as it is becoming much easier to add things to the game. This new content includes new trains, new industries, a bus, a van; and much more! As we proceed forward we will be continuing to add more (and deeper) industry chains. This update includes the Iron Ore mine (seen in the sketchfab scene you can explore above), as well as the Steel Mill. This steel will be used for helping to grow towns or you can take it to an auto factory to make cars. Our amazing sound designer (who also dabbles in sound programming) has been hard at work making amazing music tracks for the game. There is, I think, fourteen of them now and he really has done a great job. [h2]Steam Integration[/h2] https://steamcommunity.com/sharedfiles/filedetails/?id=2536698993 I now have full steam integration, and in fact we have our first steam workshop item included below - a cube covered in a mapping texture that makes an annoying beeping sound. Just what you always wanted? Perhaps not - but it does provide a basic test of how well modding works. You can make new vehicles, new cargos, new industries - new everything! Which is what I feel the lifeblood of a game like this is. I've also added the first pass of steam stat recording that I will be able to use for a whole bunch of achievement mapping. I'm struggling on the server front though, as some features of the steam server API only seem to work when the game releases when it comes to running the dedicated servers. I'm making the game so that it runs really well whether you run it via steam or not. The game will detect if you are using steam (and own it), or using discord, and react accordingly. However, if you run the game without steam it will still run just fine - it simply won't be able to use steam features like workshop and etc. This means the game has absolutely no DRM at all. [h2]New Physics for Vehicles[/h2] Because I want to run tens of thousands of vehicles, we can't really use the physics engine provided with Unity. it's just a bit to high of a cost for the amount of wagons and wheels and all that I want. This project has been about scale, first and foremost - so I've tended to develop custom approaches specifically designed for what I need so they are as lightweight as possible. However, the physics approach I had for moving the vehicles was not great. So I made a new one, and even based it on more true to real-world calculations. This takes into account the mass, tractive effort, power, slope, and many other factors. It's also even more optimized that it was before. [h2]Multiplayer Changes[/h2] With the new physics rework I had to change how vehicles were handled in Multiplayer. This was a bit of a mixed bag, as I fixed many things. Unfortunately... I'm still plagued by an issue where framerate differences cause the dedicated server running slower, to move the vehicles slower. This "shouldn't" happen as the threads moving the vehicles take into account framerate. But, nevertheless, it is happening. Good news is I "soaked" the dedicated server for the last 30 days, running the game well into the 2800's. Game ran fine, no memory leak. So I'm very happy with the core stability of the game in that sense. It's also already quite well optimized on the network bandwidth front, but I'll keep testing that just to make sure. [h2]New File Structure[/h2] While the game is made using the Unity Engine, much of the game happens and is loaded outside of the direct engine. This includes all the data and files for the game, such as models, textures, sounds - and even data files defining what stuff is. Previously all this data was located in a special folder, and "core" game data was loaded from it. The cool thing is - to add content to the game I do exactly what you will as a modder! This makes supporting modding really easy, and gives a lot of ability to modders. There is very little in the game that is "hard coded" so any kind of content at all in the game can be changed. The downside of this... is loading times and disc usage. The project had ballooned from roughly 200MB to nearly 1GB. The "folder" based structure was also presenting issues for transporting mods and save files. So I implemented a package system that allows game data and files to be loaded either directly from a folder or from a "modpack" which is really just a folder zipped in a special way. Oh and while I was there, I added Steam Cloud and Steam Workshop support too! The game is now back to 250MB in size, and loads much faster. You can either have mods in the dedicated documents folder for the game, or subscribed via steam workshop. [h2]Settings and boring stuff[/h2] Over time I've been constantly refining and refactoring a lot of boring little things - like the settings system, console commands, and startup parameters for the game. While not very interesting - they will help a great deal for people to use the game when it comes out. Console commands can be used to debug the game, or even control it when running a dedicated server. Startup parameters are really useful for those running many dedicated servers on one machine (such as server providers). Okay well, that's it for this month. See you next month for some more great progress! Please do wishlist the game, and post your comments or questions below and I'll see if I can answer them.