Crafted with care and marketed without hyperbole, Diesel Railcar Simulator is that rare thing, a transport sim that transports without crucifying your wallet, cooking your GPU, and burying you under an avalanche of key commands. A conglomeration of incredibly sensible design decisions, it's been winning friends and gaining content steadily since appearing, seemingly from nowhere, late last summer. In today's FP I talk to Oskari, the man behind all those sensible design decisions.
RPS: Diesel Railcar Simulator doesn't feel like the work of an inexperienced coder. Have you worked on other games?
Oskari: Apart from DRS I don't have any professional experience of game development, so I'm self-taught in that regard. The project began in the summer of 2008 as a hobby and became my full time occupation (weekends included) in 2014 when I left my day job as a web developer.
During the development I've rewritten major portions of the codebase two or three times when the complexity and number of bugs have got out of hand. It's all been a necessary part of the learning process. Some of it could have been avoided had I learned the trade from other more experienced game developers.
Since the late 90s I've attempted to make games of various genres, first with tools that didn't require any programming skills and later with C/C++/PHP. Only a handful of the games were ever good enough to be published to a larger crowd and none of them were popular. I also tried my hand at making graphics for other people's games, but subsequently decided to focus on programming because it seemed like a more useful skill.
Oskari: BVE certainly was a major influence. I loved its rich physics and sounds, and the graphics weren't bad by early 2000s standards either. BVE was technically quite simple which was reflected in its text-based file formats. This made modding easy if the lack of graphical tools did not intimidate you.
I wrote a program called BVE Route Randomiser which worked as a separate preprocessor for the sim. One of its purposes was to introduce some variation to the signalling and alter the course of the simulation which by default was quite deterministic. Another one of my BVE mods worth mentioning was a procedurally generated Random London Underground route which had different stations and trackwork every time you ran it. Both of these add-ons had ideas that are present in DRS in a more refined form.
DRS also borrows from the German Zusi2 simulator which was BVE's complete opposite: complex timetables with plenty of AI trains and random variations but rather plain graphics and sounds.
In contrast to BVE and Zusi2, Microsoft Train Simulator was a sore disappointment. I never really got into it or the more recent examples of the same "school". The Settle & Carlisle route looked unfinished and the Flying Scotsman chuffing sounds were clumsily crossfaded recordings obviously taken at different speeds. Occasionally the train would develop an identity crisis and emit some kind of weird metal fatigue sound akin to a sinking ship. The sim simply wasn't immersive.
When OpenBVE was published I was very impressed with how quickly the developer put together an improved clone of the original sim. If it was possible to do a BVE clone in just a few months, how hard could it possibly be to make a sim of my own? Had I known it would take a full nine years until the first public release I wouldn't have even started!
RPS: I find the physics in DRS very persusasive. Do you think they'd fool someone who'd driven first-generation British Railways DMUs for a living?
Oskari: I've received a few comments here and there from individuals who have worked with the DMUs as drivers or fitters but they haven't made any specific remarks. I guess the physics are close enough but it would be nice to get more detailed feedback.
The brake physics didn't convince a driver from Italy! They pointed out that the brake performance was too even throughout the speed range for the kind of tread brakes used in these trains. When the speed decreases below a certain threshold the brake block friction starts increasing with a corresponding increase in braking power.
DRS simulates the varying friction incorrectly because I didn't have any real-life data or graphs at hand when I programmed it. Recently I've been kindly provided with more than 200 pages of train brake documentation so expect to see more realistic brake performance in future updates!
RPS: Why did you opt for a period setting rather than a modern one?
Oskari: Originally I set out to do a full generic train sim but soon found out that I needed to limit the scope in order to get something functional published in a sensible timeframe. Working three years straight without feedback and nothing to show can be taxing.
The sim was inspired in particular by Arno Brooks' "Working the DMUs" stories on railcar.co.uk. Something about these recollections captured my imagination. When it became obvious that I could only include a very limited set of trains and routes to the initial version, railcars were a natural choice, also helped by the abundance of detailed technical information.
I find the looks and sounds of old trains more interesting than their more recent counterparts, and they're usually more challenging to operate as well. In DRS terms there's not that much of a difference between "simple" and "realistic" controls for many of the modern trains. Still, I'm not going to claim that "everything was better back in the old days". The real railways are meant to be an economical, safe and sustainable form of transportation, not an outdoor museum.
From a business point of view it might make more sense to focus on modern times since people can easily relate to something that's here and now. It's easier to tell if the simulator has been done well when you can visit the places and ride the trains in real life. The more time you spend researching and recreating some obscure decades old details, the fewer people will be able to check your work and appreciate the effort.
RPS: Which sim will have steam locos first – DRS or Train Sim World?
Oskari: If the official DLC for TSW remains centred around the modern era, the first sim to get something resembling a steam loco will be the one that first enables its community to create their own trains. There won't be any official support for steam loco physics in DRS but it might be possible to approximate them e.g. by modelling the boiler as an air reservoir and the firebox as a compressor.
I'd like to stress that I don't have any particular preference for diesel trains or dislike for steam and electric traction. At first the sim's title was simply "Railcar Simulator". It didn't occur to me until quite close to the release that there is a popular train sim product that used to be called "Rail Simulator", developed by a company with the same name.
I tacked the d-word to the sim's title simply to make it more distinctive but it also serves as a handy excuse for narrowing down the scope. If DRS turns out to be successful there might be a sequel with a title and physics more accomodating to various types of trains. Modelling steam and electric traction to the same standard as the diesels is no small task, and I'm not even done with the diesels yet!
RPS: That diesel locomotive you're working on - are you ready to reveal the class or type?
Oskari: The plan is to include two diesel locomotives: one type for main line work and one for shunting and short-distance goods runs. Classes 37 and 08 are strong candidates because I already have some graphics resources ready for them. In addition there will be Mk1 coaches and goods wagons to give the locos something to pull.
The diesel-electric transmission of the 37 and 08 present a problem because currently the sim only supports mechanical and hydraulic drive trains. The physics would have to be faked, hence the locos might initially be drivable using simple controls only and the cab might be empty of instruments.
The Class 03 has been suggested as a more suitable alternative for the 08 since it has a transmission similar to the DMUs, but I would have to find a suitably licensed 3D-model first. Likewise, a Western Region hydraulic would fit the sim better at this stage than the 37.
Once the train editor is ready and it's possible to import custom 3D-models into the sim, we'll hopefully start seeing an increasing variety of community-made locos and rolling stock from various eras and countries.
RPS: AI trains don't always run to time in DRS. Was this a difficult thing to achieve and how much chaos can your silicon signallers cope with before throwing in their lever towels?
Oskari: The routing and signalling mechanisms were quite difficult to implement, not in the number of lines of code required but by designing the system in such a way that I can understand what's going on years after writing the code. Making the AI trains run late wasn't hard to do after the general signalling logic was in working order.
Once the route editor is out in the wild I suspect some people will try to see just how much traffic the signallers can handle before things end up in a deadlock. On the other hand the signallers are allowed to cheat by removing trains that have already terminated and prevent new ones from spawning until there's room for them. Eventually I'd like to do away with these cheats so that trains won't be spawned or destroyed during the simulation except at portals that represent connections to unmodelled sections of the railway network.
RPS: Unity seems to do everything you ask of it without complaining. Have you run up against any engine limitations yet?
Oskari: Luckily I have yet to come across any hard limits which cannot be worked around. Occasionally some poorly documented constraint or feature has me puzzled for a while but in the end things have worked very well. Unity is a bit sensitive about memory use so I had to change my programming style before the sim would run at a sufficiently high frame rate.
I wish the Unity company would allocate more resources into fixing bugs and improving the stability of the program. I can deal with the editor crashing during development but trying to figure out why the sim crashes on someone else's system can be really hard, if not practically impossible, unless the problem can be clearly traced to my own code. Most of the DRS codebase is Unity-independent so I can switch to another engine if things go really sour.
RPS: Fictional scenery seems a very sensible design decision. Would you recommend this approach to other small studios working on sims?
Oskari: The decision to make a fictional route for DRS was out of necessity. I looked into creating the Midland Main Line as the first route but realised that I didn't have the resources to do it properly. If you're going to do a realistic route, it needs to be done well or people are quick to point out all the flaws. Real-world routes do have more appeal than completely made-up ones though.
Most of the scenery, trackwork, stations and place names in DRS are randomly generated except for the key stations and junctions. The algorithms I'm using are not yet very sophisticated so the landscape and railway infrastructure is somewhat repetitive and unrealistic. Using procedural generation to this extent hasn't been a 100% success. It's best used as an additional tool, not as a replacement for a manual route editor.
RPS: If you had access to the Flare Path time machine for an afternoon and had permission to make one railway-related trip, which station/location would you choose and which time period?
Oskari: This would be such a special occasion that I wouldn't be too picky. Any busy UK main line station between 1920 and 1960 would do!
RPS: Thank you for your time.
* * *