This week, Mod Philip returns to tell us more about the platforms we're supporting with the NXT client.

One major consideration when deciding how to write a new client for RuneScape was where we wanted it to be able to run, now and in the future. The RuneScape community have a large variety of different computers, and we wanted to be able to cover as many of those as possible, while giving ourselves room to move onto emerging technology.

Running RuneScape Today

Looking into what sort of computers you all use at the moment, we can see that:

3% of you still use Windows XP

35% use Windows 7

50% use Windows 8/8.1

3% use Windows 10

6% use some sort of Mac, with 10.11 (El Capitan) having the biggest share (since Apple auto-update their OS)

About 0.5% use Linux

The rest are on other old versions of Windows

Based upon this, we decided we needed to support:

Windows XP (32-bit)

All newer versions of Windows than that (32-bit and 64-bit), concentrating mostly on Windows 7+

Mac OSX 10.7+

We also decided to add support for 64-bit Linux to that list (currently Ubuntu 14.04+) because:

Compilation is pretty fast on our Linux build system, so it was nice to add it as a pre-step to the somewhat more time-consuming builds for Windows and Mac.

There are lots of tools for Linux that could be helpful for us during development.

We have a dedicated Linux community who would appreciate it (and 0.5% is still quite a few people).

There are lots of platforms based upon Linux that we might like to add support for in the future.

We might want to do something with the new client on our Linux servers at some point in the future (e.g. rendering forum avatars).

Another Platform of Interest

We were also still keen to be able to run RuneScape in a web browser, and pretty much the only way that was going to happen was to continue using JavaScript and the various HTML5 web APIs (WebGL, WebAudio, etc.), via the Emscripten project.

We've added some level of support for that to the new client, but it is not really ready for public consumption yet, mostly because of a lack of browser support for various things we would need to make the game perform well on your computers.

So how do we build the new RuneScape client?

All of this means we ended up writing C++11 code (and a little bit of Objective-C for Mac OSX, JavaScript for Emscripten and some C in other places) that gets compiled into the following binaries:

Operating System 32-bit/64-bit Compiler Comments Windows XP 32-bit Visual Studio 2015 OpenGL directly Windows XP (and other very old Windows machines) 32-bit Visual Studio 2015 ANGLE Other Windows 32-bit Visual Studio 2015 OpenGL directly Other Windows 64-bit Visual Studio 2015 OpenGL directly Mac OSX 10.7+ 64-bit xcodebuild (v7.0) / Clang / LLVM Linux - Ubuntu 10.04+ 64-bit GCC 4.8.5 JavaScript/HTML5 64-bit (-ish) Emscripten / LLVM We will probably wait until WebGL 2.0 and pthread support

That's a lot of different versions of the game client (and quite a lot of technical language)! Despite that, we have one code base that generates all of those. This is done by having a hardware abstraction layer in our code that allows us to separate out some parts using the C++ pre-processor, so that they are only compiled on particular operating systems.

This means that the client code is (mostly) the same between the different platforms, and almost all of the differences are in the libraries that it uses to interact with the operating system.

Hurry Up!

When we make changes to the code for the game client, they get pushed to a build system, which automatically compiles the code on all of our target platforms, runs some automatic tests, and lets us know if anything went wrong in that process. This helps us to avoid breakages of one or more of the different platforms, and means we don't have to manually build and test everything we do on all lots of different devices, which would take quite a lot of time and effort!

What about the installer/launcher?

We have written a launcher and installer for the new client that is similar to the existing downloadable client in many ways. The installer for Windows is a small download of a few megabytes, which will then run and download any dependencies that are needed for the client, and stick some icons on your Desktop/Start Menu for you. What has actually been installed at that point is the launcher, which will download any updated version of the client (which we update with most game updates), and run the game for you.

We've added a few minor (and much requested) features to the launcher on top of those present in the existing downloadable client:

You can now move the game cache somewhere else (and the default location is a bit more sensible).

There is also a prompt to make sure you meant to close the client if you are in-game.

It will also remember where you had it on the screen between game sessions, so you don't end up resizing and moving it around in the same way every time you play.

It's the little things that count!

Mod Philip

Technical Director