Patrick Hansell and Tom Duffus began their collaboration at age four, when they lived only a few fields away from one another. Now, 20 years later, they have given themselves the titles of programmer and creative director respectively, and run a two-man game studio – but they do so with miles between them. Hansell is based in Cambridge, while Duffus works out of a farmhouse in North Yorkshire.
Read more: introducing Improbable, Spatial OS, and the future of multiplayer.
“We can really stress-test our internet,” Duffus jokes.
They have needed to. Building the taut arena-shooter, JackHammer, Hansell and Duffus have become preoccupied with the work that goes into fast and flawlessly accurate combat. Pulled them along is the genre expertise that Epic Games have baked into Unreal Engine 4.
Dance of the clients
It might not be something you think about until it goes wrong, but movement in conventional multiplayer games is not one-to-one. What you see is only an approximation – the result of a constant conversation between a server and each player’s PC.
In JackHammer’s arena, where sports-grade robots rely on reflexes to dodge the iridium alloy MurderBalls fired by their opponents, networking is more crucial than ever.
“You move at such an alarmingly fast rate in this game, and everything is arc-projected,” Duffus explains. “You don’t spend much time on the ground. A lot of it’s boosting in the air, and hurtling forward while gravity and momentum keep you going. Because of that, it’s extra important for us to know where people are.”
Hansell was particularly keen to use Unreal Engine 4 because of the character movement component in its code.
“It’s been tried and tested in so many high-production games, and it really is state-of-the-art in terms of client-side prediction and smooth, responsive movement,” he says. “We’re a two man team – there’s no way in hell we’d be able to make things like client-side prediction and networking. That’s basically enabled us to make JackHammer.”
The ultimate test has been the North Yorkshire farmhouse internet that Duffus uses, upload speeds peaking at around 0.4Mbps. “With all that taken into account, the gameplay experience that we’re having is really quite smooth,” he laughs.
As with any networked shooter, JackHammer is beholden to latency – the time between the click of a mouse and the transfer of data. It is an especially pertinent issue when firing a shot and tracking the path of a projectile to its target.
“In an ideal world, if there was no latency, when you fired the projectile on the client side you could just ask the server to immediately create the projectile and send it off in the direction that you shot,” Hansell explains. “But because you have, in a bad case, maybe 300 milliseconds round trip time, then you would end up waiting almost half a second for your projectiles to appear. Which is pretty much unacceptable.
“Normally you have to resort to loads of particle effects to try and mask all the horrible things that aren’t working. But Unreal takes away so much of that pain for us.”
Like every Unreal Engine 4 developer, Hansell and Duffus have access to the engine’s source code – where you can find the technical solutions developed for the new Unreal Tournament.
“Basically I ripped out loads of what they’re doing in there,” Hansell says. “It does all sorts of crazy stuff when measuring your latency – delaying things, spawning fake projectiles. That’s been a really good resource for us. There’s lots of cleverness going on behind the scenes, which I’m glad I didn’t have to think of.”
A lift from Unreal Tournament
Projectiles are not the only place where the pair behind JackHammer have taken influence from Unreal Tournament. Epic’s code can also be found in the elevators that propel players into the arena at the beginning of a match – a moment of theatre that has presented a consistent technical challenge throughout the project.
“As the countdown into the game starts, the elevator rises,” Hansell says. “But, for ages, I couldn’t work out how to make the character actually rise with the elevator.”
More of a catapult than an elevator, this 50mph journey has a sudden stop at the top. To begin with, the team had a problem with players stepping off into the basement of the arena – they still occasionally fall through the floor now.
“In Unreal, you put something on top of something else and the two simulate physics very nicely together,” Hansell says. “But because of some subtleties, I have to do a few extra things to get things to move as you might expect. The partial solution came from Unreal Tournament, too, because they have elevators.”
Being able to crib the work of a huge studio like Epic is an obvious benefit to such a small team. For Duffus, it is almost like having an extra partner. “You work in tandem with Epic, in a way,” he finishes.
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, Mission Ctrl Studios and Green Man Gaming Publishing.