Jump to content

Dev Blog | NXT - Platforms for RuneScape


Bobby

Recommended Posts

C++11?? Step in the right direction there. Also Linux support. Interesting. Noting that they are using more then c++ but still.


Home News Dev Blog | NXT - Platforms for RuneScape

16 February 2016 Future Updates

Dev Blog | NXT - Platforms for RuneScape

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 XP35% use Windows 750% use Windows 8/8.13% use Windows 106% use some sort of Mac, with 10.11 (El Capitan) having the biggest share (since Apple auto-update their OS)About 0.5% use LinuxThe 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 System32-bit/64-bitCompilerCommentsWindows XP32-bitVisual Studio 2015OpenGL directlyWindows XP (and other very old Windows machines)32-bitVisual Studio 2015ANGLEOther Windows32-bitVisual Studio 2015OpenGL directlyOther Windows64-bitVisual Studio 2015OpenGL directlyMac OSX 10.7+64-bitxcodebuild (v7.0) / Clang / LLVMLinux - Ubuntu 10.04+64-bitGCC 4.8.5JavaScript/HTML564-bit (-ish)Emscripten / LLVMWe 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

Link to comment
24 minutes ago, Bobby said:

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.

Tiny change, but omg yesssssssssssssssss!

Link to comment
1 hour ago, Beric (Ironeyes) said:

Tiny change, but omg yesssssssssssssssss!

This was also the biggest thing in this post for me. Although I mostly just right click the task bar and hit "Show windows side by side" sometimes I have it a bit different.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...