Smooth Running

one man's thoughts thoughts on optimizing 'Driver' on less-than-perfect computers...


I have been running Trainz for over 10 years, and for almost all that time the best computer I could afford was at best marginal for whatever version of Trainz I currently had installed.  I have experimented endlessly trying to optimize the  performance of a very resource-hungry program on a series of woefully under-resourced computers.  The suggestions below work for me.  I make no guarantee that they will work for you.  It is quite possible that a tweak that makes an obvious difference on a low-spec machine will make little if any difference on your ultra-mega-super-dooper games machine.  But if your computer does struggle with Trainz, try some of these ideas:


Framerate: People rave about their fps, but truly you don't need high fps - you need smoooooth fps.  A velvety smooth low framerate is visually more satisfying than a 'high' frame rate that jumps all over the place.  The two lines below can be added to trainzoptions.txt which can be found in your root install folder in version up to and including TS10, and in the root/userdata folder in TS12. Any text editor will open the file. You may need to create the file in TS12.  It never hurts to back up the original before editing.


the -framerate=30 line gives the program a target fps.  I currently use a value of 30, but I have run it as low as 24.  Depending on your Trainz version, you might find a default value of '200' on this line.  Crazy - change it!  Experiment a bit, but what you are looking for is the LOWEST value you find visually satisfying.

the -framestoaverage=16 line is the important one.  The '16' is NOT a target framerate, it defines the effort the program will make to enforce a smooth average framerate and '16' is the highest valid value.  Don't experiment with this one - '16' is the only value you want!

The combination of these two lines give a low target framerate but forces the program to make it's best effort to keep the average framerate consistent.  You might be surprised at how good a low but smooth fps looks!


Draw Distance: Again, people rave about huge the draw distances they can produce - but so what?  Even on my Clovis route I never use a value over 3000m, and even with 2500m you will see plenty.  On all other routes I use a 'standard' setting of 2000m.  You will almost never find these values disappointing, and the lower the draw distance, the less effort the program is making to draw stuff and this leads back to that 'smooth' performance thing again. Draw Distance is set in the 'Options' menu in Driver.


Good Weather Fog: Another 'Options' menu setting in Driver.  You won't see a huge performance gain with this, but crank it up a bit and see.  I have it set somewhere just short of 1/2 way.  On a desert route (Clovis) the distance looks like shimmery heat haze, on greener routes it's just distant misty hills.  You can't go too high on this or the foreground gets an 'orrible blue cast, but short of 'blue' a higher GWF setting will give a slight performance gain.


Reboot: Rebooting your system before running Trainz might help, it clears the system of any background rubbish.  If your system is marginal don't try running half a dozen music/social/whatever applications at the same time. Don't launch Trainz from Content Manager and definitely don't use Ctrl+F2 to enter Driver from Surveyor - in both cases quit to the desktop and let all Trainz-related processes close before re-launching Trainz and entering Driver.  See also the following notes about disabling modem/router and launching Driver directly from the Desktop...


Unplug/Switch Off your Modem/Router: Even in 'Driver' Trainz (Content Manager I suspect) tries to phone home every few minutes.  Why it needs to do this has never been satisfactorily explained, but when the program decides to contact Mother it can throw 100% of cpu into the effort, resulting in something between a slight graphics lurch and an out-and-out momentary freeze.  If it isn't plugged into a phone line, it won't try to phone home!


Launch 'Driver' direct from the desktop: This one is a little bit tricky to implement, but you can't break anything by trying.  The first thing you need is the kuid number of the session you want to launch.  The second thing is the location of the trainz.exe file in your Trainz install.  The third thing is a text editor (Notepad is fine).  Open a new page in the text editor and create a single line that looks like this:

G:\TS2010\trainz.exe "-driver=<kuid:203465:100391>"

There are two parts to this line:

G:\TS2010\trainz.exe is the location of the trainz.exe file on my system.  On your install it might be something like  C:\ProgramFiles\Auran\TS2010\trainz.exe.  If you don't know where Trainz is on your system you can right-click the desktop shortcut you use to launch Trainz, click 'Properties' and copy/paste the location from the 'Target' line.

"-driver=<kuid:203465:100391>" is the kuid of the session you want to launch, and can be found by locating the session in Content Manager. The "quote marks" matter. The -driver bit tells trainz.exe what to do with the session.  You can also launch Surveyor this way by substituting -surveyor for -driver, but it's not worth it.  Performance smoothness in Surveyor is not an issue.

Once you have the text file sorted, select 'Save As' and save the file to your desktop as AnyNameYouLike.bat - double check that the file has only a .bat extension and notepad hasn't snuck .bat.txt onto it!

A .bat file is a simple executable that will now launch that particular session direct from the desktop.  The advantage is that the session will open much quicker because the program is loading the session and nothing but the session, resulting again in better performance.  Significantly better on my current system!

This method of launching Trainz works in all Trainz versions TRS04 through TS10 inclusive, and in Windows OS up to and including XP.  There is no reason why Win7/8 shouldn't let you launch this way, but you might need to set up the bat file to run as admin. I haven't tried this in TS12 - it should work but truly if your rig struggles with TS12, the biggest single improvement you can make is to go back to TS10!


In Summary: Trying any of these changes should give some improvement, combining all of them should give a satisfying performance boost if your machine struggles with Trainz.  But I say again you will not see much (if any) difference if you use a state-of-the-art gaming rig.  But then if you use that sort of machine you don't need to tweak, do you!

Good luck.....

Feedback is always welcome - please email any comments queries or criticisms here.

Andy Turnbull 2014