Trainz Tweaking: Painful, but Worth It
In the neverending quest for better performance from systems running very graphics-intensive applications, a certain amount of educated guessing and empirical testing is called for.
This was the case for two of my systems running Trainz, a railway simulation from Auran in Australia.
As part of a testing program for Trainz, I had to cut back to a cleanskin install of Trainz 1.3 build 277. This involved installing from the retail CD, applying the 1.1.2 and Service Pack 3 patches, then the Content Update to bring it to 277.
Since I now had a clean, unmolested baseline install, the time was ideal to do some performance testing. The only objective measurement we have at the moment is checking the final frames per second average in the jetlog.txt log file after exiting Trainz. Subjective measurement involves graphics and rendering errors, and "rubber banding" - skipped screen refreshes during particularly graphics-intense operations, which give the appearance of the movement pausing and then snapping to the new position like a rubber band.
The ideal is to obtain the best possible fps with no graphics problems and a minimum of rubber banding. There is going to be a bottleneck in your system - whether it is the graphics card or the processor is often confusing and may be hard to determine.
I approached the system tuning with an open mind and willing to learn from the experience of others. A great help was the thread in the Trainz Technical Support forum on Auran's website started by Puffin_Billy here. A key part of any testing and upgrade is to BACK UP your system first, and make ONLY ONE CHANGE AT A TIME.
The Results
Chockie went from 15.9fps to 24.7fps, a performance increase of 55%. Databits went from 29.7 to 41.1, a 38% improvement. Iteration 8 for Databits can be ignored, explained below.
The Testing Method
A standard test was devised with Trainz. Certain views are known to cause performance hits, specifically a front-on external view. The default consist and layout were chosen, a 5-car HST set on the British layout, starting point being the station at the southern end of the map, with the front-on view.
Trainz was entered from the desktop, the introduction AVIs skipped by pressing Enter as soon as they appeared, then selected Driver. As soon as the driving screen appeared, the throttle was put into full forward and left alone. As soon as the train had gone over the points where the tracks converged again, Trainz was exited as quickly as possible by pressing Esc, Enter, Esc, Esc.
The jetlog.txt was then checked and the fps recorded. While the fps appears very low it was against considerable load and the average in a normal session is a lot better.
The Computers
Databits
AMD AthlonXP 1800+ @ 1522MHz, 1GB PC2700 DDR333 RAM, Gigabyte GA7VRX motherboard, Chaintech GeForce4 MX440 64MB DDR, Windows XP Pro @ 1152x864x24bit, LG Flatron 795FT+ @ 100Hz, Trainz 1024x768x32bit
Note: Athlon 1800+ does NOT run at 1800MHz, a mistake very easily made. It is actually specced to run at 1533MHz. It is the equivalent in processing power to a Pentium 4 running at 1800MHz, hence the name. It certainly tripped me up when I was first setting up the computer and I couldn't get the clock rate that high! There is more information on the relationship between Athlon chips and clock speeds on the AMD website.
Chockie
Intel Pentium III 800 @ 798MHz, 640MB 133MHz RAM, Gigabyte GA6VXE7+ motherboard, Asus GeForce 32MB DDR, Windows XP Pro @ 1024x768x24bit, Sony Multiscan 17sf @ 75Hz, Trainz 800x600x32bit
The Tweaks
Databits
Baseline build 277 install gave 29.758fps.
Tweak |
Description |
FPS |
1 |
Baseline install, Trainz set to 1024x768x32bit defaults plus shadows |
29.758 |
2 |
BIOS setup AGP aperture 128MB -> 256MB |
31.097 |
3 |
Trainz auto sync half rate |
25.744 |
4 |
Trainz auto sync 100Hz |
33.47 |
5 |
NVidia Direct3D mipmap best image quality -> high performance |
35.35 |
6 |
Trainz DirectX -> OpenGL |
26.09 |
7 |
Ugh! Trainz OpenGL back to DirectX |
35.37 |
8 |
Try 800x600x32bit, just to see what it was like |
44.65 |
9 |
Back to 1024x768x24bit, update nVidia Detonator drivers from 3182 to 4041 |
35.44 |
10 |
NVidia Direct3D texture anisotropic 0 -> 1 |
35.162 |
11 |
NVidia Direct3d texture anisotropic 1 -> 2 |
33.60 |
12 |
NVidia Direct3D texture anisotropic 2 -> 1, mipmap high performance -> best quality |
33.527 |
13 |
Trainz auto sync 75Hz |
33.62 |
14 |
Windows desktop 1280x1024x24bit, 85Hz, Trainz auto sync 85Hz |
33.46 |
15 |
Installed Powerstrip, MX440 proc 270MHz mem 405MHz -> 300/450MHz |
36.77 |
16 |
MX440 300/450MHz -> 324/486MHz |
38.91 |
17 |
Installed Gigabyte Easytune 4, FSB 133MHz Athlon 1522MHz -> 147/1690MHz |
39.86 |
18 |
MX440 324/486MHz -> 338/507MHz |
41.13 |
Testing was halted at this point as the MX440 couldn't be overclocked further without flickering and polygon breakup, and processor temperature on the Athlon had climbed to 52degC (upper limit 60degC). Net result 38% overall performance improvement.
Step 8 was to see whether the fps limitation was the processor or the video card. Such a jump indicates the video card is being maxed, borne out by the improvements in adjusting clock rates later.
Step 9, updating the nVidia Detonator drivers, did not measurably improve fps but directly drawn screens, such as the various Trainz menu screens, are noticeably snappier and cleaner.
Step 14 was backed out to Step 12 before installing Powerstrip. Get Powerstrip here.
Step 17, overclocking the processor 11% with little improvement in fps, bears out the findings in step 8. I left it overclocked as it is speeding other applications.
Chockie
Baseline build 277 install gave 15.955fps.
Tweak |
Description |
FPS |
1 |
Baseline install, Trainz set to 800x600x32bit defaults + shadows |
15.955 |
2 |
BIOS setup AGP aperture 64MB -> 128MB |
15.51 |
3 |
Trainz full sync 75Hz |
15.302 |
4 |
Trainz half sync 75Hz |
15.238 |
5 |
Trainz auto sync 75Hz |
15.73 |
6 |
NVidia Direct3D mipmap best image quality -> best performance |
15.93 |
7 |
NVidia Direct3D mipmap best performance -> high performance |
15.64 |
8 |
Trainz set to 1024x768x32bit defaults |
17.815 |
9 |
Trainz set to 1024x768x16bit defaults |
16.62 |
10 |
Trainz set to 1024x768x32bit defaults + shadows |
15.45 |
11 |
Installed Powerstrip, GeForce DDR proc 120MHz mem 300MHz -> 132/330MHz |
16.26 |
12 |
GeForce DDR 132/330MHz -> 135/338MHz |
15.30 |
13 |
Installed Gigabyte Easytune 3, FSB 133MHz PIII 798MHz -> 140/840MHz, backed out GeForce DDR 135/338MHz -> 132/330MHz |
24.72 |
Testing was halted as neither processor or video could be reliably overclocked further.
Step 6 resulted in unacceptable text degradation on masked bitmaps (eg the DCC control buttons).
Step 8 was interesting, when Trainz resolution being set the same as desktop resolution resulted in 11% improvement over 800x600.
Step 11 indicates that the video card may not be the bottleneck. A 10% increase in clock rate showed 5% improvement in fps.
Step 12 showed that the video card was being pushed harder than it wanted to be. There were no visual problems.
Step 13 clearly shows the improvement due to more processing capacity. The next Easytune overclocking step is 900MHz which resulted in an unstable system. There is a motherboard DIP switch setting for 866MHz which I may try.
Conclusions
Tweaking can be painstaking, but it can also be fun when you get unexpected positive results. Changing only one thing at a time allowed a clear vision as to what was a worthwhile improvement and what was not worth the bother.
The Athlon XP1800+ and MX440 video appear to be a good match, neither causing a bottleneck. A more expensive video card would not be worthwhile without increasing the processor to match.
Surprisingly, the PIII 800 is holding back the plain GeForce DDR card, although it is not clear how fast the processor could go without being held back by the video card.
Charlie Lear, 19 Sep. 02. I obviously support minimalist HTML!