St Lawrence River

Talk about all things related to Railroads! here
Post Reply
veeblefetzer
Posts: 23
Joined: Wed Oct 21, 2015 4:58 am

St Lawrence River

Post by veeblefetzer » Tue Mar 21, 2023 6:30 am

Hello Team,

Like others, I enjoy the efforts of Slider and I'm grateful for the fresh content. Thank you Slider!

Aside from the general challenge of game I like to train table a lot. I get very fussy about curves and level platforms and the like. I thought I'd show some thanks by putting in a huge effort with St Lawrence River.

I've uploaded a saved game if anyone would like to take a look for themselves. I've also made a short 4min vid showing some of the train activity at various points around the map.

The saved game is uncompressed for anyone wishing to confirm it is in fact a saved game by looking at the contents of it in a hex editor.

You will need the St Lawrence River user map active in order to view the saved game.

http://itsalljunk.com/smr/097.SMRailroadsSavedGame

itsalljunk.com is my domain and server where I put stuff for downloading. It's not a trap.

The video can also be found there at the following URL. It's about 47MB in size.

http://itsalljunk.com/smr/stlawrence.mp4

What this also prompted me to do is something I've wanted to do since SMR first arrived. Write a utility that can edit saved demo files. The main reason for this is to fix up scars in the landscape from changing laid tracks. The map TGA is stored in the saved file, both as it's original form and the modified one from laying tracks etc. The map data is not in 24bit color depth as the source map file is, but 8bit color depth. Makes them much smaller.

So that's quite useful for me as I can fix up the scars and textures to make it bewtiful again.

Scars be gone!
Before
After

A little grass between the tracks.
Before
After

It's especially nice to fix up where bridges meet the land.

I could have just written a tool to extract the TGA data but I've decided to decipher the saved game format as much as can be discovered as useful. Like a starting balance of $10,000,000 ; ) Or changing the starting year to 1800, but you need at least one train from that era set in the respective .xml file.

Anyway, it's a work in progress and I'm a decent way through the saved game file, which is quite complex. A lot of variable length data and data structures, just to make it harder. I plan to put in it a simple graphic editor feature for the map data. At the moment I extract the maps manually and edit them in Photoshop, then put them back in. It's tedious.

The saved game above is about 80 hours of work. I stopped there because it was making the game engine groan a little. Deleting or adding track would invoke a 1 second 'halt' while it updated it's internal routes etc.

I worked strictly to the type of station used with the 3 track limitation.

You'll also see I made Montreal island just that little bit bigger as all the tracks I have running through it was pushing houses into the water.

Anyway, hope you enjoy it, if you take a look.

Edit : Just realised in Edge that the images don't load because they're on a non SSL site. Changed the link types.

railage
Posts: 35
Joined: Tue Dec 22, 2015 2:09 am

Re: St Lawrence River

Post by railage » Tue Apr 04, 2023 5:16 am

I'm not a "train-table"/sandbox player, so probably can't fully appreciate what you have done here. 80 hours is a lot. I did download the save file and had a bit of a look. So I can confirm at least that the file worked. :D

What impressed me is how you were able to patch back up the terrain. And I began to wonder if your methods could side-step one of the annoying game issues: ends of track pieces are enforced level.


An illustration:
Smooth climb.jpg
New track point messes everything up.jpg

As you can see, the smooth slope was ruined when the junction was added. This in my view is a really aesthetically nasty habit from the game. Do your methods have some possibility to side-step this?

PS. The "halt" for building track isn't bad on your save. There are some huge maps. It's possible to virtually "freeze" the game. Interesting that Windows reports the game as "not responding" for the duration. For me, anything below 5 seconds is tolerable. :lol:

veeblefetzer
Posts: 23
Joined: Wed Oct 21, 2015 4:58 am

Re: St Lawrence River

Post by veeblefetzer » Thu Apr 06, 2023 3:27 pm

Not to sure what you mean by 'side-step'.

The technique only patches up the height map, texture map, tint map and others, after the game engine has done it's thing.

It could certainly fill in the space below the track that is made from adding track points, but only up to a point.

In the save file I shared, I left a specific spot for later to work on. It demonstrates perfectly how the game engine renders the 3D space.
Track slightly covered
Track slightly covered

If you get up close, you can see there's a gap still underneath the track, and as you've noted, the end track level thing which bugs me too.
Gap-ness
Gap-ness

Problem is bumping the height up one level under the left track would probably partially cover the track next to it. The 3D space doesn't have a fine resolution. The height marks are spaced and the engine joins them with a slope. You cannot have a completely vertical face with this engine on the terrain.
Gradient
Gradient
How it is made
How it is made

That makes it hard to fill gaps.

Nothing can be done about the end track levelling from what I can see, so far. I'm still working through the saved game structure and logic would say at some point track end points should be recorded somewhere so the engine knows where to put them. Whether or not they can be orientated by angle will be the thing to look for.

I suspect they would have an angle setting on the x-y plane so they know which way to point but that's about it. That would explain why it always levels out the track end joins.

I couldn't imagine a 5 second pause. The 1 second delay is annoying enough. But I would like to add some more to that saved game. Since my original post I've been indulging challenges.

Have gotten the saved game editor to the point where I can work with maps. Have been testing it. Much more to do still.

Thanks for replying to my post.

veeblefetzer
Posts: 23
Joined: Wed Oct 21, 2015 4:58 am

Re: St Lawrence River

Post by veeblefetzer » Fri Apr 07, 2023 12:40 am

Took a (not so) quick look at the parts at the end of a saved game file to see if anything look obvious re: track positions. Nothing stood out. But I did take a look at an industry block of data. Worked out where the location is stored.

So I moved the shearing shed, cut out a track to the landing and moved a bunch of trees around. Also modified the textures a little.
Baaaa
Baaaa

veeblefetzer
Posts: 23
Joined: Wed Oct 21, 2015 4:58 am

Re: St Lawrence River

Post by veeblefetzer » Mon Apr 24, 2023 7:38 am

Just to round out the conversation.

I found some fields in the saved game file that relate to track positions and endpoint yaws. For those not familiar with yaw, it's one of three words used to describe an angle around a specific axis in space. If you google yaw, pitch and roll you'll get all the info about that.

In the saved game file, it stores the x, y and z position of each end of a piece of track. The track is then drawn between each endpoint. Along with x, y and z is the yaw for it. But the pitch and roll values are not stored, thus, track endpoints will always be level.

In this pic I've moved the endpoints of the platform track. The engine tolerates this, to a point, and will simply follow the position of the track even if they're not lined up.
SMRailroads!0347.jpg

Here is a close up of the yaw modified for an endpoint. Again, the game engine will just follow the track wherever it is. You can set the yaw to 90° from the original and the train still follows along.
SMRailroads!0362.jpg

So, track endpoint levelling will always be a thing, as I've said.

Post Reply