Tuesday, March 01, 2011

Adventures in Train Simulation

Trains are made of pure sound. That is the most important lesson that I learned from a weekend spent messing about with train simulation. I also learned about competing software and passionate communities and about routes, engines, rolling stock, controls and signals but my overwhelming memory is the sound of the railway.

Although Railworks 2 appears to be the leading light in train simulation these days there are an number of other programmes that have their own following including Trainz, BVE and the venerable Microsoft Train Simulator. For my first taste of the hobby I tried the free open source package open BVE. This is a somewhat unusual choice of starting point because openBVE is an open source re-write and extension of the already free BVE train driving simulation. Documentation and hand holding are sparse to non existent and the main creator of open BVE pulls no punches when he announces that:
"Compared to other simulators of the genre, especially compared to commercial games, openBVE has its main focus on realism, not necessarily on user-friendliness."

I however have a softspot for open source software and I am not afraid of a challenge. Even more importantly I stumbled across a fan made Irish railway line for openBVE. That convinced me so I downloaded the programme with the intention of running my own simulation of the somewhat fictional BallyFeckin to Waterville (BWR)  railway.

Things did not immediately go smoothly but then again nothing of real value ever does.  Downloading openBVE itself and its associated libraries gives you a working shell of a program that contains precisely no trains and no train routes so ther eis no comfort factor of at least being able to get the default scenario going. The rather short  FAQ on the openBVE forums suggests that I need to download a scenario and manually copy its contents into the appropriate folders. Graymac the creator of the BWR scenario helpfully provides separate zip files for each folder so that seemed easy enough. GRaymac even provides a train depot where you can grab a selection of Irish trains to run on his routes.

After the incongruity of having to manually create the data file structure I was surprised to find that the launch menu of openBVE is polished and quite intuitive. You choose a route and train then select a difficulty level (arcade, normal, expert) and away you go. Controls, graphics settings and other options are configurable via fairly obvious buttons.

My first attempt at running the scenario generated a multitude of error messages which was initially intimidating but when I looked the error handling system turned out to be extremely precise telling me line by line exactly where the errors occurred and what was wrong, God bless open source software. In every case the model was failing to load a dependency file. I rolled up my sleeves and got stuck into the model files to try and get to the bottom of the problems.

The file structure of openBVE seems quite straightforward employing comma seperated variable files (csv) for most data structures and standard formats (bmp, png) for graphics. Of course there is an awful lot of data in a scenario such as this and I developed a new appreciation for the enormous effort Graymac must have put into creating this labour of love. The helpful error messages quickly led me to the very lines of the data files that were causing the problem and in most cases the culprit was a file address that used the unix convention of  \.. to point to the parent directory of the current directory. For some reason this was not being interpreted correctly on my Windows 7 64 bit system.

I briefly toyed with the idea of manually correcting the addresses in all of the hundreds of csv files  but thankfully I found a kludge that got me up and running again quickly. By finding the directory that Windows 7 thinks the address points to and simply copying all of the folders again into that directory everything worked at the expense of a bit of duplication of files.

There were a couple of other minor glitches (on inexplicably missing graphics file for a raindrop and a British signals  library that Graymac alludes to in a tiny footnote that I hadn't  seen earlier). These were quickly resolved and I was soon a train driver.

In the world of hard core train simulation instructions are for sissies and trains turn out to be remarkably resistant to moving even in arcade mode. Thankfully a bit of random button pressing put me into free look mode (right mouse button) and over on the right hand side of the screen are a set of instructions including a helpful quick start guide! I never did figure out how to get rid of that intrusive BWR logo in the top right hand corner but here is a quick video of me actually driving a train (recklessly) :



Hijau Kuda said...

Google "OBTS Wiki" for help with OpenBVE Train Sim programs and addons.

Hijau Kuda said...

Google "OBTS Wiki" for help with OpenBVE Train Sim programs and addons.

mbp said...

Thank you Hijau. I didn't spend too much longer with the programme by it is good to know there is a wiki.