ERA 8 Network Britain
Developed byGenesis Frontier
HomeDev DiaryBringing a Railway Back to Life

DEV DIARY 03 / DEVELOPMENT

Bringing a Railway Back to Life

· DEVELOPMENT WIP

We've been building the first scenario around bringing a run-down railway back into use. The station needs repairs, the trains need looking after, and people need a way to get to both. Since the last diary that scenario has found a home on an island, and the island has started to fill up with a seaside town, a pier and the first electric railway. The game has a proper front door and a company to run, depots know what they can do, a Freightliner yard works, and the countryside has started to sound like somewhere. More of the models have made it into the game too, which showed up plenty that wasn't right first time. It's been a long stretch since the last diary, so this one covers a lot.

An island to put back on the map

The biggest change is where the first scenario happens. We've picked a made-up island just off the south coast, in 1978. The government is putting money in, which gives the railway a reason to come back, and its first contract is how the player starts to make a name.

At the start the whole railway is closed: the pier, every station, the depot and all the track. Some of it is still there but unusable, and some has been lifted or buried. The town, roads and beach are still busy, so you start from a depot you can reach by road and earn the first passenger service by rebuilding. We want the result to look like old railway put back by careful hands: weathered rails and timber, laid straight again on fresh ballast, with the odd new sleeper. This is still a plan rather than something you can play.

We've laid the island out in 3D at full size, 8 km by 4 km, with a pier, a town and chalk cliffs at the end of the seafront. Doing it full size paid off straight away. The sketch had put the depot 550 metres from its station, so we moved it alongside. The line came out at about 6.7 km long.

Setting it in 1978 changed the trains too. The two-car units we'd been looking at came later, so the island gets the older Standard Stock instead. We've modelled three of its cars in 3D, along with the third-rail pointwork. Network SouthEast didn't arrive until 1986, so the island's operator will have its own livery.

When we checked the pointwork against photos of the real thing, two parts were wrong: an insulator that was too generic, and a conductor ramp we couldn't find any 1978 evidence for. We reshaped both from later photos, and the whole kit now takes about a quarter of the detail it did up close.

To get a layout like this into the game, we can now bring a map drawn in 3D straight across. The water, track, roads, fences and trees arrive as proper game pieces, not one big model, and one Undo takes it all back. Buildings can start as simple blocks and be swapped for the real thing one at a time. The whole island won't fit yet, though. Its town needs about a thousand pieces of road and a map currently allows 384, and simply raising the limit would make every map much slower to load. The town needs a simpler first version.

3 November · The island in plain shapes, looking along the pier to the town, with the chalk cliffs far left. A planning layout in 3D, not game art.

A seaside town, one bay at a time

We're building the island's buildings as a kit rather than one-off models. Hotels, shops and terraced houses are made in sections that slot together, so a row can be as long as the street needs without gaps or doubled walls where two pieces meet. Corner pieces turn a row round a street corner, and the front doors stay put when a building grows.

The seafront now has hotels, a chippy, a newsagent, a chemist, a bakery, a café, a pub and an amusement arcade. Behind them are terraced streets with back lanes, gardens and sheds, a row of shops with a laundrette, a library, flats and a multi-storey car park. Further inland there's a thatched village with a church and a school, a farmyard, two mills, a lifeboat house, a cliff lift and a red-and-white lighthouse.

Lots of these buildings get used more than once, so each one can have its own paint and its own sign. At first, repainting one beach hut repainted the whole row. Now a row of five huts can be five different colours, and the café name, the petrol prices and the notices outside the reading room can all be changed building by building.

The first buildings have started going into the game, too. We put a row of three terraced houses on the island, with their back gardens and a cobbled alley, and the lights in the back windows came on and went off with the time of day.

6 November · The town laid out in 3D. The ground and paths are just there to set the buildings on, and none of this is in the game yet.
7 November · The first terrace placed on the island in Unity, still with temporary materials.

A pier you can build from its end

The railway reaches the first station along the pier, so the pier has to carry the track. Normal ballast would have left a raised strip down the deck, so we looked at Ryde Pier on the Isle of Wight and set the track down between the timber boards instead. We widened the first two sections of the pier to fit the end of the seafront platform.

In the game, we dragged the pier out in two goes, laid the track along it and built the platform and station building at the end. Undo took it all back again. Later the pier got easier to build: each time you add a section, the next one lines up at the end. It can be built higher now too, and the end of the pier is wide enough for a 130-metre platform.

We also boarded over the track on the 3D pier model. The first version had a plain brown deck and you could see straight through between the sleepers. Now there are planks between and beside the rails, with a narrow gap left for the wheels.

5 November · Track set into the pier deck in Unity, with the platform and station building at the far end. These are stand-in shapes until the proper pier and station models are ready.

The first working third rail

The island's railway is electric, so it needs a third rail. We started with the simplest thing that works: a plain rail beside the track that's live as soon as you lay it. On a test map, a Class 205 stood in for the island's trains. It ran on power along the rail, rolled on past the end with the power handle still open, and picked up again when we laid more rail in front of it.

That led to a bigger question: where does the railway's electricity come from, and what happens when it goes off? We looked at how power reached a 1980s railway and kept three supplies apart: the buildings, the trains and the signals. Then we built a small test map to try it out.

You can switch off the depot, the signals or the third rail on their own. Turning off the signals put the signal back to red and kept it there. Turning off the third rail left the buildings lit while the train rolled down to about 8½ mph. When the power came back it picked up again and got to just over 17 mph. Switch the depot off and save, and it's still dark when you load the game again.

5 November · The first third rail in Unity. The sloped ends, the pickup shoes on the trains and separate power sections are still to come.
7 November · The electricity test map at dusk, with the third rail switched off and the station, depot and town still lit.

Building the first scenario

The scenario starts with a closed station and a railway that's been left to rot. Our first go at the scene looked far too tidy. The rails needed more rust, the sleepers needed to look damaged, and the station needed more than a few boards over the windows.

So the station now comes as a pair: a damaged version and a repaired one. Both have the same size and doors, so fixing the roof doesn't move the entrance or turn it into a different building. Broken windows, missing slates and broken gutters give you something to put right, and the weeds are separate, so clearing them can be a job of its own.

A station needs a working day

A repaired station isn't much use if nobody can get there. People need to arrive, do their jobs and leave again, and parking, buses, footpaths and trains all decide whether that happens.

The design follows a cleaner from arriving to finishing a job, possibly taking a local train to clean another station nearby, and ending back at the car or bus they came on. Drivers and guards have set routes and finish at their home station. The exact times and hours still need working out.

For passengers, it's the things you'd notice yourself: a clean platform, a way in that works, somewhere to wait and decent facilities. We've also started on what happens between the bus stop and the train, including what happens when three people turn up and there are only two seats left.

The first piece of this is in the game. A map now keeps a list of platform edges, each with a name, a side, a length and a ramp at each end. They stay put when points go in elsewhere or the track is relaid. There's no way to place platforms or group them into stations yet.

A proper way into the game

The game now opens on a real main menu, with Start Game, Settings and Quit beside a train at a station. Our first version asked you to set up your company after the game had loaded, which was the wrong way round, so the company now has its own page before you start. We wanted the train on the menu to look its best, with the background softly blurred, so the menu uses the most detailed models.

Every railway now starts with a company. You choose its name, three colours and a logo built from shapes or up to three initials. You can change them later and apply them to one train or all of them. BR and other markings stay on a train until you do. Your colours go on logos, lettering and signs, but not the paint on the trains.

Trying it in the actual game caught two things our tests had missed. The colours were being changed twice, so they came out wrong, and the Trains page opened before the trains were ready and said they weren't there.

Stations get name boards from the same work: BR, timber or company style, with one style for the whole map or a different one per station. The boards are simple stand-ins for now, and they're placed like any other station item, so turning them, saving and Undo all work as you'd expect.

4 November · The main menu in Unity. The top of the picture is trimmed.
4 November · Setting up your company. The "Not now" button is only there while we're testing.
4 November · A test company's logo and name on a Class 45.
4 November · Stand-in station boards in BR, timber and company styles, with a test station name.

Counting what a depot can do

Depots now know what they can do. The buildings and equipment set what work is possible, and extras like lighting for night work make it faster or better. Only finished things count, and a shed road only counts once track actually runs in through its door. On our depot test map, the four-road shed counts as two roads because only two have track. The numbers are rough for now, and nothing in the game uses them yet.

We also fixed the floor heights. Sheds, the wash and the gantry now sit with their floors level with the rails, so the track runs straight in, and the preview when you place them matches. A Class 50 has been through the wash on the test map, but we still need to try building a whole depot by hand.

4 November · The depot test map, with a Class 50 at the wash. The stripes on the shed walls are a fault we still need to track down.

Putting the brushes to work

The depot wash had eight sets of brushes, but nothing moved. Spinning them as they were would have swung the motors round with them, so we split the brushes from the frame that holds them.

The wash now does what we wanted. Soap builds up on the locomotive, the brushes work through it, and the second set of water jets rinses it off. At first the rinse started too early, so the foam vanished while the train was still in the brushes. Now each part of the train stays soapy until it reaches the rinse, and the locomotive comes out with a wet shine.

It's now in the game and has worked on a Class 50. Our first recording went through far too fast, so trains now crawl through the wash at around 1.5 mph. We didn't record it again, so the picture below is from the faster run. It isn't part of running a railway yet, though, because the game doesn't remember how clean a train is.

1 November · The wash in 3D: the soap stays on through the brushes, rinses off at the second set of jets and leaves the paint wet.
3 November · A Class 50 covered in foam in the wash, in Unity, from the faster first run.

A Freightliner yard to play with

Freight got its first proper try-out. We built a small Freightliner yard from the normal building menu: the crane and its rails, a staff entrance, a gate and the loading spots. Then we drove the crane, moving it along and across, raising and lowering the box and locking it on. We lifted a 20 ft container off a wagon, put it down on the ground, saved and loaded, then lifted the same box onto a lorry trailer. It only counts as delivered once it's on the trailer.

We've also started on the yard's proper models: a crane based on the early-1980s Dudley terminal, the staff building and the grey-and-red containers. There's a 40 ft box too, but the crane in the game only handles 20 ft boxes for now.

6 November · The Freightliner yard models in 3D. The colours are right for the period, but we're still checking which containers Dudley actually handled in 1983.

More coaches on the railway

The Mk2 coaches are in the game. There are eight types, with open seating, first-class compartments and guard's vans, each in Network SouthEast, blue and grey, InterCity and plain colours. Each type is one model with different paint, so there's only one shape to keep right.

A test train of a Class 50 and one of each coach coupled up, ran, and was still right after saving and loading. The interior lights work from the train's lighting switches. That same test is now tripping over a screw coupling, so it needs fixing.

Putting them in showed up another problem. The coach lights worked on new maps but not older ones, because the lighting was only set up when a map was first made. Now it's set up whenever any map loads, so you don't have to rebuild a map to get improvements.

Two of the coaches have since been swapped for more detailed versions. Doors, windows and gangways have moving parts, but we haven't played with those properly yet.

31 October · Mk2 details in 3D: the saloon with its lights on, sliding compartment doors, window vents and a guard's van.

Bringing whole trains into the game

With more trains coming in, we've got stricter about how each one goes into the game. Lights, glass, paint, buffers, couplings and moving parts all need to be ready together. Otherwise a train can look finished from one side while something important is missing on the other.

Six of the seventeen main trains are in and working: the Class 08, the Class 45, both cars of the Class 205 and two Mk2 coaches. Eleven to go. Each one has to couple, buffer up, light up, take its paint and run through straights, curves and hills properly.

That turns up real answers. A Class 205 and a Class 45 can only be coupled if their buffers are pushed in a little, because the real coupling chain isn't long enough otherwise. Without that, the game won't couple them. We didn't make the chain longer to hide it.

The rest are still in 3D. The covers on the Class 50's front sockets open on their own now, and the Class 150 has a new coupling that still needs work.

4 November · The end of the Class 50 in 3D, with its socket cover closed. Not in the game yet.

Dirty and worn are different jobs

Washing a coach should get the dirt off, but it shouldn't fix chipped paint or rust. So we've split the two: dirt that washes off, and wear that needs proper repairs.

The first try used a blue and grey Mk2, with the dirt heaviest around the underframe and a lighter film on the body and windows. The windows came out too cloudy at first, so we cleared them up and added more streaks. We also tried a cab window with the clean patch a wiper leaves.

The trains now have separate dirt and wear, with chips, scuffs and rust in the wear. Both are on the Class 45 and Class 205 in the game, and the newer locomotives are still to come. How fast trains get dirty, what it costs to fix them and how passengers feel about it are still to be worked out. The picture is the early test, not the finished system.

1 November · An early dirt test on a Mk2 coach in 3D. The dirt is painted on for the picture, not built up from playing.

Getting the Class 37 details right

The Class 37 had an obvious mistake: the sun visors were on the outside of the windscreens. They're inside both cabs now, and the glass is thick enough to see the cab through it.

Its lights now work like the other trains'. In the game we checked all eighteen of them, switching them off and swapping which end is at the front, with headlights at the front and tail lights at the back.

The cab roof and window shapes still need another go, along with some period details and the final look of the glass and lamps. The one shown is 37698 in 1988 Railfreight Coal colours. It doesn't mean that's the loco you'll see on the first branch line. Since then the 3D model has gained proper bogies and axles, its own dirt and wear, and a coupling that moves without hitting anything.

1 November · The Class 37 in 3D, with its sun visors moved inside and new glass. The cab shape still needs work.

Inside the maintenance machines

The track machines are getting attention too. Both cabs on the tamper now have dials, switches, levers, pedals and proper seats. The small bits drop away at a distance, but you can still make out the desk and seat through the windows.

It's our best guess from the photos we could find, not an exact copy of one machine. The controls don't move yet, and the tamper needs its paint, dirt and lights finishing before it replaces the one in the game. We want the machines that rebuild the railway to feel as carefully made as the passenger trains.

1 November · Both tamper cabs in 3D, close up above and the simpler distant versions below. The layout is our best guess.

Making it all run lighter

More on screen only works if the game can cope, so a lot of this stretch went on making things lighter.

We wanted the trains to be much lighter on the PC from a distance, without losing what makes them interesting close up. Springs and doubled-up dirt were the worst offenders. The Class 45 is now about 40 per cent lighter, mostly because the dirt on its running gear had been modelled twice. A first pass made the Class 50's far-away version about a third lighter, and a second took about another quarter off the far-away versions of all seventeen locomotives and coaches. The island's own trains were harder, because cutting too much dented their roofs and sides, so we went back and cut them more carefully. Along the way we found out why the Mk2 doors looked odd from a distance: the outside was using the cream colour from the inside.

The track had the same treatment. Each length of track is now less than a third of the detail it was, and drawing the track close up takes about half the time. Redrawing the whole ground on a big map went from just over 7 seconds to under 4, and a few parts of the game stopped doing work every frame when nothing had changed.

We also fixed two memory problems. Taking screenshots at different sizes kept eating graphics memory until Unity was closed, and on 5 November it ran the PC out of memory completely. That's fixed now. Building the game's files was also leaving about 12 GB of memory tied up afterwards. After one settings change it leaves less than 3 GB, and the build takes less than half as long.

We're aiming for 120 frames a second at 4K, and about 50 with full ray tracing before any upscaling. Measuring on our North Devon map showed grass you couldn't even see still costing time, and hedgerows being one of the bigger costs. We cut some of that work, but the overall frame rate didn't clearly improve, and we haven't found the cause of the biggest stutters yet. None of those tests had trains running, so we're not there yet.

5 November · Class 45 bogies before and after in 3D. They should look the same, and they do. The new version isn't in the game yet.

Bridges, tunnels and walls

Laying track now works out its own bridges and tunnels. Cross a deep valley and it plans a viaduct, with a steel span over a river. Go through a big hill and it plans a tunnel, with walled cuttings at each end. One Undo takes the whole lot back.

On 3 November the proper viaduct and tunnel models went in, so the arches, piers and tunnel mouths are real models now. Every piece came in facing backwards, so the game now refuses any piece that's the wrong way round. We still need to have a proper look at them in the game.

You can now add retaining walls in the track tools: click each end of a stretch, then add or remove walls. They're plain stand-ins until the proper wall models are ready.

Footpaths are in, and the game won't let one cross the track on the level. There's now a walking strip and a rough edge of stones along the side of the ballast. We like a new polished finish on the rails, but it's on hold until the track models are made lighter. The bulldozer can now remove almost anything you've placed, from buildings with their gardens to bridges with their track and whole piers, each in one Undo. In the game you can only bulldoze things you built, plus trees and bushes.

3 November · The viaduct on our bridges test map in Unity, with a steel span over the river.

Signals, tokens and track magnets

The branch line now has electric token working. Each section of single track has one token, kept in a pair of machines at each end. The token lets the signalman clear the signal once, goes with the train, and goes back once the whole train is clear. Points out on the line unlock with it too, and it's saved with the game.

New or repaired railway now has to be tested before it opens. If part of the signalling isn't wired up, the line stays shut. Once it's fixed, an empty train runs through, stops at the signal and goes over the points, and only then can you open the line. The line shows red when it's shut, amber while it's being tested and green when it's open. If a test fails, it tells you what's wrong, suggests a fix and can take you straight to it. We also put one of our semaphore signals at a test junction, and its arm and lamp follow what the signal box sets.

The AWS magnets are in the game as well. At first they ran the wrong way along the track, which we've fixed. Trains now have the AWS in the cab, with the warning display, horn, bell, the button to acknowledge it and the brakes if you don't. The sounds are stand-ins for now, and the timings will change.

3 November · AWS magnets and their ramps in Unity, on a test track.

Keeping the countryside recognisable

We've gone back to the trees and plants around the railway. The originals were far too heavy to plant thousands of across a big map. Our first cut went too far, though: the trees turned into round blobs and stopped looking like trees.

The middle ground keeps the real branches and uses clumps of leaves with painted detail. We got an oak right first, then used it as the pattern for the rest. The gaps in the crown and the ragged leafy edges are what make it look like an oak, especially when the same tree is repeated along a line.

That pass now covers 113 trees, bushes, hedges and plants, and together they're about 92 per cent lighter. That's the models, not the frame rate, which we still need to check, along with wind, shadows and how they look from far away.

The pictures caught things our checks hadn't: pine needles looked square, fern patterns broke up and some birch bark lost its pale colour, so those got another go. Field edges are getting fences where a hedge won't fit and gates at the entrances. The fence tool came with its own bug: it was drawing 45 unused models as stacks of panels along the hedges. That's fixed, and placing a fence or gate now replaces the hedge where it stands.

We've also deepened the game's colours. The fourth version of our British colour palette looked washed out, so the fifth has deeper colours, a bluer river and a slate-grey sea, based on photos of the North Devon coast.

1 November · Some of the new trees and plants in 3D. Each is framed on its own, so they aren't to scale.

Giving the rivers their own banks

We don't want every river to have the same strip of plants along it. A rocky stream, a wooded bank and a quiet pool all need different stones, roots, fallen logs and water plants.

The first riverbank kit has 28 pieces. The first pictures showed stones that were too sharp and irises that were too big, so we fixed those. The kit is now in the game, along with ducks, a heron, damselflies, more water plants, logs and tree roots. There are tiny minnows too, in small groups. It's the sort of thing we want you to find when you look closely at a river. They still need better swimming, and there's no fishing.

The rivers had a fault as well. The water's surface ripples were ignoring the bends, so the river looked like it flowed straight on. They follow the river now, and you can reverse a river without moving its banks. The movement is still hard to see in bright light, so we need to look at it more.

2 November · The first riverbank pieces in 3D, set out beside some still water for the picture. It isn't the game's water.

People, birds and road traffic

The town needs people on the pavements. We started with twelve walkers on a 3D test street, then put eight in the game, four on each side, waiting at a crossing that opens and closes. Eight people added more work for the PC than we wanted, so each person's clothes are now joined into one piece when the game starts, which cut that work by about three-quarters. People you can't see no longer do any animation work at all. We've made fifty people now, so the same faces and clothes won't keep turning up.

The bird started as a simple model that could flap, glide, land, perch and take off. We wanted to keep birds cheap: they only exist while you can see them, and they don't remember anything. Then we spent a day on landing. Birds had to find real branches, and then branches you could actually see from the game camera, which only a few trees really had. So we made it simpler. Countryside birds don't land any more. A small group circles a tree and drops into the leaves one by one, and they're gone. It works on any tree on a map, hedgerows and woods included, and feels much the same.

The coast is trying something different. In the game, a gull glides in, puts its feet out, lands on a pier railing, a post or a rock, then takes off again. Near the pier the birds are gulls, and inland they go back to blackbirds. For now the gulls follow set paths, and we haven't decided whether they'll keep landing.

For the roads, we've made fifty period vehicles: 35 cars, six vans, four buses and coaches and five lorries, from a Mini and a Morris van to a double-decker and a tanker. Twenty-six fit 1978 and the rest are for later in the decade. They're kept simple so a busy street doesn't slow the game down. We remade the Beetle from photos of the real car because the first one didn't look right, and the lights now switch on and off.

2 November · The first bird in 3D, flying and perching. Countryside birds no longer land.
3 November · Three blackbirds circling an oak before they drop into it, in Unity. Our tools panel is on the left.

A background that stays out of the way

The edge of the map needed something better behind it. We tried hills first and took them out again, then went with a plain blue background. The first version changed the lighting on the map, which it shouldn't have, so we fixed that. It now shows on every map, sitting below the horizon so it doesn't hide the sky and clouds.

Zooming out then showed a flicker across the distant fields. Turning off some of the lighting effects didn't help, but changing the sun's shadows did, so the shadows were the problem. A small change to the distant shadows got rid of it, and changing it back brought the flicker back. The main camera also has a flatter, more isometric look now, at the same angle as before.

2 November · Distant fields with the flicker gone, and the blue background beyond the edge of the map, in Unity.

Rain, lights and sound

We've been following the rain down onto the ground. Drops hit, patches go damp, puddles form, roofs drip and things dry out again. Paving, soil and ballast all react differently, and a covered spot stays dry until water actually gets to it. It's now running in the game on a test depot. Our first attempt at keeping it quick made the roof hold the water and then dump it all into the gutter at once, so we went back. No real building uses it yet, because the water needs a way to drain off each one.

Lamp glass was coming out as white glare instead of a warm glow. That's fixed, the pub windows light up during opening hours, and the lighthouse flashes its own pattern.

The game has a new sound system. Countryside and weather sounds play through it, along with real English recordings placed by what's on the map: blackbirds in the fields and woods, gulls in towns by the sea, a high street and a bus stop in town, and cars on the main roads. There are six stand-in sounds ready for the island's trains, though the whistle is still missing. We've listened to all of it and it sounds right.

Pulling it together

The different parts of the game are starting to come together. Roads, station signs, platforms and sound all load with any map without changing the map itself, so maps don't need rebuilding to get improvements. The wash, the signals and the train lights all run from the same game clock. Trains also keep their identity now, with a home depot, even when they're split and joined, though there's no screen to show it yet.

Most of the town still only exists in 3D, so the next big job is bringing it into the game a few buildings at a time and fitting it to the island's ground. Passengers come next, then the third rail's sloped ends and power sections, and 40 ft boxes for the crane.

We want the railway to show the work being done on it: a mended roof, a cleared platform and a coach that comes out cleaner than it went in. There's still a lot to do before you can play through the whole repair, staffing and service story, and we'll keep showing it as it is, stand-in shapes and all.

See what we are working on now

Lead DevERA 8 Network Britain

All diary entries