What's NXT for Runescape? A closer look at Jagex's new engine

What's NXT for Runescape? A closer look at Jagex's new engine
Matthew Jarvis

By Matthew Jarvis

July 20th 2016 at 11:44AM

15 years after it originally hit computer screens, Jagex’s free MMO has received its first major engine overhaul, bringing with it a sea of big changes. Develop checks in with technology manager Mathew Burnett and lead graphics developer David Gillham to see what’s new in NXT

When I was nine years old, I was one of the writers for my middle school’s student-run RuneScape magazine.

More than a decade on, I’m still writing about games, but I look vastly different: more facial hair, stretched limbs and a physique shaped more by beer than daily PE lessons. RuneScape, however, has achieved a Dorian Gray level of visual agelessness, looking much the same as it did when I first booted it up
over dial-up. That is, until this year, when Jagex decided to finally repaint its picture.

April marked the unveiling of NXT, Jagex’s new engine for RuneScape, after more than two years of work.

“NXT began as an innovation team looking into the best ways for us to move forward,” recalls technology manager Mathew Burnett. “As it became clear we were getting somewhere with the performance control that C++ can provide, the demo graduated into a project.”

Replacing RuneScape’s existing Java-based client and a scrapped HTML5 version, NXT put a focus on improving performance and supporting a far wider breadth of player hardware to allow a higher fidelity of visuals. Improvements include longer draw distances, fully dynamic unified lighting and shadowing, industry standard post-processing, and real-time reflection and refractions, especially in the MMO’s water environments.

“Some of our adventurers are bringing the latest in gaming rigs, but some are still playing on the machine they had when we began this 15 years ago,” Burnett reveals. “We set ourselves the goal of including 99 per cent of them and making sure we were giving a good level of performance to at least 95 per cent. 

“It turns out that the aim of giving the best top-end performance and reaching the lowest common denominator is not that far away. While we added features for the best graphics cards, such as increasing the draw distance, better anti-aliasing and dynamic shadows, we also lowered the memory and power required for many of the existing capabilities. The result is a client that is designed to cover at least 12 years of hardware – if not a little more.”

"With RuneScape’s Java client we’d pretty much hit saturation point in every way."

David Gillham, Jagex

“With the Java client we’d pretty much hit saturation point in every way; there was no more room to manoeuvre,” lead graphics developer David Gillham says of RuneScape’s aging foundation.

“The new C++ client gives us easier access to all the latest rendering technologies, which we’re now able to take advantage of with our new architecture, lighting and post-processing pipeline.

“The next round of graphical upgrades will include normal maps, larger textures, point light shadows, particle lighting, physically-based shading, improved volumetrics and further improved global illumination. We’ve also got plans to add support for the Vulkan rendering API to reduce driver CPU overhead even further.”

It’s this last point that stands out as one of the key achievements of NXT. By switching to a C++ base over RuneScape’s Java origins, Gillham and his team were able to make the most of modern hardware setups.

“With the new NXT client we’re much less CPU-bound than with Java,” Gillham explains. “We’ve significantly reduced draw calls which have a big CPU hit, especially if drivers are poorly implemented. Our dynamic geometry batching system is partly responsible for this, along with our new innovative dynamic hybrid occlusion culling system, meaning we’re submitting much less to the GPU per world area than in Java. We’re also making very good use of SSE where it counts and our memory management is so much more efficient than in Java.

“We get much more bang for buck on the GPU as we’ve significantly reduced overdraw through better sorting, and our batching significantly reduces GPU context switching. On top of that, we’ve completely rewritten all our shaders from scratch and optimised the hell out of them.”

Adapting an engine from year to year can often be challenge enough for devs, as they race to stay ahead of the
fast-evolving nature of gaming hardware while simultaneously dealing with the various quirks new tech can introduce to code. Such problems are exacerbated as time goes on, making Jagex’s 15-year leap a journey fraught with hurdles – some of them self-inflicted.

“Like many success stories in our industry, RuneScape has evolved naturally rather than through rigorous planning,” Burnett observes. “Throughout its 15 years we have changed many things and adapted many times. Sometimes this has been a sensible step forward, but on many occasions we have just worked around an existing problem.

“Much of our game content is designed in a manner that balanced out issues with our current tech. It might be a brightness is set many times higher than it should be or an item is rotated to the wrong angle to counter-act some long standing code error. Producing a new render engine designed to draw things ‘correctly’ that also supports this history makes for a difficult task.

“Our aim was to produce as few compromises as possible and avoid the word ‘hack’ at all cost. We worked extremely hard with tone mapping and colour correction to make the result look and feel like the fantasy world our players have grown to love.”

Changing a game’s engine doesn’t just affect the way it looks – it can also have knock-on effects on gameplay elements such as traversal and combat. Burnett explains how his team retained the core ‘feel’ of RuneScape.

“We are fortunate in some respects that our client doesn’t control the gameplay,” he says. “All the logic is controlled at the server end. However, the display of what is going on and when things happen has been rebuilt from the ground up. It took careful work and much testing to ensure that the same ‘feel’ is there.

“That said, there are plenty of places where a careful side-by-side comparison will show things slightly different. Where this is critical we look to adapt the content, rather than the code, to ensure it works as it should. We have discovered a few parts of the animations that worked by accident rather than design. As we grow into our new client we will now have a platform to resolve those issues.”

NXT is not a different game, just a new way to experience it."

Mathew Burnett, Jagex

With players investing hundreds of hours in MMOs such as RuneScape, making any change – no matter how minor – can divide the audience, as Blizzard has experienced with fan-run ‘vanilla’ servers for World of Warcraft. Given the transformative effect of NXT, how did Jagex ensure that as many fans as possible would be happy with the new engine?

“Our aim is to provide a client where every player believes they have a better experience,” Burnett responds. “We are going to do our best to bring people over willingly and we have already seen a huge take-up. We release every week so it allows us to adapt as we go along to make sure everyone is happy.

“NXT is not a different game, just a new way to experience it. The content is the same. We worked hard to ensure that it matched the look of the Java client and kept a ‘no textures’ mode that some of our players still prefer. 

“We have already been though our difficult game evolution; three years ago when we modernised a number of things in the game some of our players weren’t comfortable with the change. So we have RuneScape as it was in 2007 as a separate active development. The two function as a family and, while RuneScape brings out NXT, we also keep adding to our alternate universe, Old School. Most players settle in one game or the other, but some float between them as new bits catch their attention.”

The NXT engine sees RuneScape align with the state of games today not only in looks, but also in philosophy. Gone is the

web-based client that was innovative in 2001, yet out-dated in 2016. 

“We had been seeing a decline in browser play for quite a while,” Burnett states. “Java applets are going out of fashion as a way of delivering web content with support increasingly being removed from browsers.

“This has allowed us to put our priority on the downloadable client. The combination of C++ and native access to system resources offers us much better control over performance.”

But while NXT may be the next step for RuneScape, Jagex has no desire to completely sever ties with the game’s history – or the platform that brought it to prominence.

“We built what we have so far with a browser offering in mind,” reveals Burnett. “Our build pipeline allows us to compile the C++ through emscripten and produce a HTML5 client we can serve in a browser. What we have works, but the technology isn’t quite there yet. It’s going to take us some specific effort to ensure we can produce the performance we need to make this shippable.