RuneScape Wiki
Advertisement
Java logo

Java is an object-oriented programming language originally developed by James Gosling at Sun Microsystems. It was released in 1995 as a core component of Sun Microsystems' Java platform. Oracle Corporation currently develops the language and JVM for Windows, Solaris, Linux and macOS.

Java can run on most popular operating systems as it compiles code into platform independent, low-level byte-code via the Java Virtual Machine that (which is platform specific) translates this byte-code into native instructions.

Java is the programming language in which RuneScape's game engine is mostly written though it should not be confused with RuneScript, the scripting language that Jagex uses to create new content for RuneScape.

Effects on the game[]

Though not exclusive to the language, there are a number of technical limitations of Java which are present in the game. Some limitations are imposed by design, with a specific section of a larger varbit being partitioned for a specific number.

Maximums[]

Items and values[]

The maximum number of items that may be carried in one stack

The most prominent effect of Java's data types is the maximum limit of a 32-bit signed integer. RuneScape stores the number of items using an int type variable and thus there can be no more than 2,147,483,647 (231-1) items in a single stack.

Consequently, this is the maximum amount of coins (and indeed any other stackable item) that can be stored in a stack. If a player attempts to withdraw or pick up coins while carrying the maximum amount of coins, it is stated that there is not enough inventory space.

Weight is stored in grams as a signed short int. The highest possible weight of a single item is thus 32.767 kg.

Counters[]

Killcounts in the beasts tab are stored as unsigned 16-bit integers, meaning they can have a maximum value of 65,536 (216); however, to keep the numbers clean, the maximum killcount that can be tracked is 60,000.

Skills[]

Skill cap at 200 million. Since experience is tracked to the tenths place, one power of 10 is lost from the signed integer capacity, giving experience an upper limit of 214.7 million. The original developers thought that a 214.7 million cap would be messy, and rounded the cap down to an artificial limit of 200 million.

Skill levels are sent as 8 bits, meaning their maximum value is 255. This limit is reached after touching the Stone of Jas in various quests.

Combat[]

Damage and healing hitsplats received by the client can contain up to 6 properties depending on the hitsplat type. The damage or healing property is encoded by either one unsigned byte or as a number that is encoded using a custom Jagex method. The limits of this encoding mean that the damage can range from 0 to 32767 (Essentially the maximum of a 15-bit unsigned integer). This custom number format is used to encode the hit splat type, the soaking icon as well as the soaking damage and the delay of the hit in game ticks. Values that go beyond the maximum will display an incorrect graphic splat, either the "Uber heal" or "Insta-kill".

Null[]

Main article: Null

All items, monsters, etc are objects; i.e. they are an instance of some class. When an object is declared, it is usually created as a new instance of whatever class to which it belongs and the variable points to its newly created memory address. When nothing is after the declaration, however, the object points to null. Nulls can exist when there is an error in RuneScape's code, but more often it means there is a problem fetching data from the server.

	Item obj1 = new Item();
	Item obj2;

In this mock up code, both obj1 and obj2 are declared, but only obj1 is instantiated as an Item. On the other hand, obj2 is not instantiated at all; it points to null.

Advertisement