3D graphics in Runescape - how?

Does anyone know how Runescape does their 3D graphics? I’m amazed at how only a 500MHz computer can run the Runescape applet (in ‘high’ detail mode).

Is it done using software only & how could we make something similar?

On the runescape site there is barely any reference to Java at all. Seems like it will run with even the Microsoft VM though, and apparently faster:
http://www.runescape.com/lang/en/aff/runescape/files/wctroubleshoot.ws

Thanks,
Keith

[quote]Does anyone know how Runescape does their 3D graphics? I’m amazed at how only a 500MHz computer can run the Runescape applet (in ‘high’ detail mode).
[/quote]
It’s using Jagex’s custom software rendering engine. It’s nothing too impressive though, the resolution is quite small, the polycount quite low, it has very basic shading and no fancy features at all really :slight_smile:

[quote]Is it done using software only & how could we make something similar?
[/quote]
Well there are some nice software rendering engine’s around that are much better than the one used in Runescape.
See www.dzzd.net and www.jpct.net

[quote]On the runescape site there is barely any reference to Java at all. Seems like it will run with even the Microsoft VM though, and apparently faster:
[/quote]
I think that info is outdated, years back Microsoft’s JVM was indeed faster than Sun’s JVM… but develoment on the msjvm stopped years ago while Sun has been improving their JVM since. I did some benchmarks in the past which confirmed this.

Thanks thijs. I’ve seen 3DzzD before and was quite impressed. Since I’ve never ever done a 3D game I can’t appreciate how hard it must be to make one let alone design the engine, but I notice that the Runescape world is rendered much more crisply than any other 3D software-rendered game I’ve seen. By crispness I mean that the colours of the terrain are blended nicely, there are never any artifacts like white polygons and none of the graphics ever look ‘pixelated’.

How do Jagex pull this off? Is it something special about their engine or is it because Runescape is a top-down view game while the other games I’ve seen are shooters?

Thanks,
Keith

They just chose a different art direction. They also used to cheat, by rendering only every other line of pixels to the screen. The style of RS for a long time was zero texturing on polys, which makes the world look cartoonish, but massively reduces the computational power needed to render things.

you’d be surprised how not-so-difficult it is to write a software 3D renderer. you should check out this book, over a stretch of about 10 chapters, you write a software 3D renderer from scratch.

the “real” difficulty of such things is lighting effects, shadows, and a host of other effects. they are somewhat covered in the book, but things like 3DzzD and jPCT are far more full-featured, optimized, and overall impressive (especially for a 1.1 compatible applet)

the only thing about Runscape that really impresses me is the seamless networking (I’ve never experienced lag, but I could just be lucky).

You can also uses Xith3D to make java-only applets thanks to Croft’s work : he has added support for software opengl implementation.

I have not yet used it, nor tested extensively but it seems interesting.

[quote]the only thing about Runscape that really impresses me is the seamless networking
[/quote]
Technically it’s quite an achievement to have done all that with only the 1.1 level VM, but the main thing that impresses me about them is how many users and how much content they have.

Fair play to them, they do a top job from that point of view.

I doubt the server is written in java 1.1. :wink:

IIRC java 1.4 was felt to have too few advantages to be worth upgrading to, so unless something radical has happened, my guess is the server is still 1.1. There was originally a belief at Jagex that nothing was quite as good as rolling your own and doing everything with manual array manipulation (no use of Vector or ArrayList allowed, for instance).

Then again, it was mostly written in 2001-02, before 1.4.x launched, and the way the game was designed there really is no reason to upgrade the server ever again. It’s a simple game, done well, and the netcode etc was already optimized to death by 2002, so … why fix what’s not broken? It was scaling horizontally perfectly well back in 2001.

Considering the massive problems with writing network code in 1.1, that would be quite a (silly) feat.

I’m almost positive that server is not 1.1. especially since 1.4 offers NIO.

most likely though, given the mass amount of players, they probably wrote the server in a native language and wrote the client in java simply for accessibility reasons (windows+linux+mac compatible = lots and lots of players!) :wink:

FYI I’m making my conjectures based on having briefly read source code and reviewed the architecture and development process about 3 or 4 years ago, and from what I’ve heard from current and ex staff since. I’m interested to hear what makes you so sure it’s otherwise?

IMHO that would be silly, given how java works so much better on the server side than on the client side, and getting it to work on the server is so much easier than on the client. If you’ve got all that java expertise in-house making java clients, it would be strange to not use it to build the server too.

Thanks for the advice & discussion everyone, you guys are better than wikipedia+google+universe+…

So how much do I owe the person who makes me a Runescape clone? :smiley: (don’t expect me to be of any use :P)

But seriously, besides all the content how hard would it be to get a mini-world up with their nice terrain, a couple of players & some trees… even just green cones for trees!

… all referenceless.

I’m just saying there’s no way they’d be willing to create a Thread for each user that logs onto a server (which is what you have to do in 1.1, unless they wrote their own native lib).

I’m just going by experience here on a rpg we’ve been building for the past 3 years. for a while, we were using java for the server but recently found greater ease with, believe it or not, C#. not a native language, I know, but it’s giving us a great performance boost. (I could just be using NIO incorrectly, but I doubt it ;))

IMO, if that server is actually written in java, they’re most likely using NIO, which means that server is at least written in 1.4.

I think version 0.2 (or whatever it was called; second version of RS, rewritten from scratch to make the current version) may have done that, back before it went 3D, but since 2000 they were doing IIRC some halfway house between t-p-c and proper asynch I/O (not as fast and robust as the latter, without native support, but not creating threads as in the former). There are many people who used to do this in 1.1, but it was always IMHO and IME ugly and fragile by comparison to proper work with native memory, buffers, data triggers, etc (i.e. what NIO added support for).

Then again, RS is a very simple game, serverside, so making the execution logic fast and efficient and the data stream narrow enough was sufficient (network handling didnt need to be fast or efficient; we’re not talking an FPS here). Still, given how incredibly long it takes to debug and extend, I wouldn’t ever recommend anyone go that route now NIO is around.

fair enough. though it makes me wonder, why would they bother going around their elbow to get their ass? some useful classes like ArrayList and a host of others arent available in 1.1, and bla bla bla.

either way, I think they would make a good company to interview on Chris’ “Level Up” vodcast.

Indeed. You would need to ask Andrew that :).

I know they were staying with the client 1.1 because that was the only thing they could be sure that users would have.

Not sure about the server, though. Surely they would be crazy to keep using the old VM for that.

Actually, I know someone who works there, maybe I should just ask…

It’s really not that hard (if you are good at math, and you know something about code optimization). I have created an engine similar to runescape, and I also created the “mmorpg” part - it is online, multiplayer, it has all elementary features like picking/droping object, chat, combat, etc.
You can see it here: http://www.duelboard.com/mud

Sadly, then I realized that without funding and some dedicated artists I have no chance to create reasonable content, so I moved to a simpler project and I put this one on hold (it hasn’t changed since a half year or so).

I’m very impressed with your game. Just like RuneScape, amazing. I like the ZipGun pistol by the way :). Your 3D graphics are great - crisp & smooth, but you’re right about how important content is.

Some things I was wondering:
How long did it take you to make ?
Is it compatible with the microsoft VM?
How many frames per second does it run at?
and…
How much can I buy your code for? :wink: