We’re coming up on Left 4 Dead’s ten-year anniversary. It’s an occasion worth celebrating, but also a reminder that, well, both Left 4 Dead games are really getting on a bit. While their design is timeless and remains unbeaten in the genre, they suffer for the smaller FPS advances they’ve missed out on: the subwoofer-rattling boom of a grenade in Battlefront, or the simple existence of aim-down-sights in COD.
Earthfall is an unapologetic update; the Left 4 Dead 3 that Valve hasn’t yet managed to make. Sure, the zombies have been switched for aliens who look like the second cousins of the Demogorgon, but the formula remains unaltered – only bolstered by fortification mechanics and the benefits of a modern engine in the form of Unreal Engine 4.
Left 4 Dead is obviously one of the best co-op games on PC – but what are the others?
“For us it’s a huge deal to have the basic framework of a game engine already put together, so that our small dev team can concentrate on the parts that make our game different,” gameplay programmer Rick Saada tells us. “And not have to worry about all the basic code that’s going to be in common across different games.”
Unreal Engine 4’s robust AI system made the job of developer Holospark a lot easier than it would have been otherwise. Earthfall needed to simulate alien behaviour but also that of your companions. As in Left 4 Dead, any of the four slots in your squad not taken up by human players are filled by AI, who you have to trust to back you up and stage rescues when necessary.
How aliens think
“One of the classic problems in games like this is that your AI companions are horrible,” Saada says. Since Unreal’s source code is open to developers, Holospark has been able to dig into the engine’s fundamental workings, altering what doesn’t suit them – in this case, improving the companion AI.
“The behaviour tree stuff that we’ve got with Unreal and the ability we have to tweak all of that lets us do some useful things. Our AI companions will cover you better than your friends will at this point,” Saada says.
“We have to tone them down,” lead designer Ben Coleman adds. “They’re frankly too good.”
The aliens, meanwhile, benefit from intelligence already buried in Unreal Engine 4.
“There’s a lot of interesting code that Unreal provides in terms of the AI having senses,” Saada says. “They have sight and sound. There’s a whole system for you set up in Unreal where players running around and doing things can trigger sense events, and those will realistically alert aliens who are nearby.”
That system helps provide the responsiveness you probably expect from an FPS without really thinking about it. In Earthfall, if you start firing your guns, nearby aliens will come for you even if they don’t have line of sight.
“That kind of behaviour creates a much more organic feel for the aliens,” Saada notes. “And it’s only obvious to the player in that things feel right.”
Holospark has layered an aggro system on top of that simulated sentience. It’s best imagined as a meter attached to each alien. Some start angrier than others, and the more disruption you cause, the more that meter fills.
“It’s not just that you fire and they come running, right, which wouldn’t feel exactly right,” Coleman says. “It feels very natural.”
Reaching that point has been a matter of feel – playing repeatedly, noticing when enemy reactions seem a little off, and retuning the values responsible for their behaviour in-engine.
“It’s powerful enough that if we wanted to make a stealth game out of this, we could tune it so you could sneak around,” Coleman notes. “We actually have some of those features in, but we don’t have them turned up.”
Building the barricades
The alien behaviour in Earthfall feeds into a fortification system that allows you to set up defences on the fly. Think upgradable barrier fences and turrets, used to set up chokepoints and killing fields to control the flow of combat.
“You can set the barriers up anywhere,” Coleman explains, “but we intelligently put in snap locations.”
“I did put them in there, but I don’t know about intelligently,” executive producer Chris Archer laughs.
The snap locations make it simple to drop a barricade in a doorway, for instance. Equally, the team have the ability to block fortification placement in areas where planting a barrier would cause issues. Once in place, a barrier becomes part of the navigation mesh – the invisible data structure that overlays the map, defining where characters can and cannot walk.
“If the aliens run into a barrier they’ll fight it, but our guys are smart enough a lot of times to go around,” Archer says. “The idea with our fences is that there are a bunch of open spots, and if you close two of those spots, it’s possible that they’ll go to the third and walk through the hole.”
For the finishing touch, Saada wrote a system that lets you attach propane tanks and arc grenades to fences, zapping aliens or setting them alight when they get near.
“If you throw an arc grenade near the fence it’ll electrify the fence, then shoot off and hit the aliens on the other side,” Archer says. “It’s pretty cool.”
It’s these moments that make Earthfall feel like an update of its inspiration, rather than a copy.
“We don’t shy away from it,” Archer says. “The feel you get from playing Left 4 Dead, but layered on top of a modern shooter. People have a ton of fun playing together, helping each other up, fighting hordes. Having it on top of a modern shooter platform is really very cool.”
In this sponsored series, we’re looking at how game developers are taking advantage of Unreal Engine 4 to create a new generation of PC games. With thanks to Epic Games and Holospark.