Join us using your Facebook or Twitter to connect and share with the people in your life

Rooftop Agility
By: Jackredslock Green

Standing tall


The first challenge in mapping a rooftop Agility course was to let you stand
on a roof without sinking through it. Whenever there's a building in RuneScape
with a sloping roof, the models of the rooftop will most likely overlap the legs
of anyone who stands on it.


To get around this, we've had to create platforms above the roof, and make
you stand on those instead. Then we carefully sink the height of those
platforms, tile by tile, to make you appear just above the surface of the roof.
We can make the platforms invisible once we're done mapping them.


This solution has worked quite well for most of the buildings, but there've
been some tricky times around tall buildings. RuneScape's only got 4 vertical
levels (ground floor plus 3 upper levels), and some buildings already use all of
them.


One building in Falador lets players walk on 3 of its levels, with the roof
mapped on the 4th level; since we couldn't put a platform above the roof, we had
to find an alternative way of letting you cross it. Conveniently, the handhold
obstacle from the Brimhaven arena fits quite neatly.


Canifis posed a particular challenge here. Mod Reach found that the rooftops
of Canifis were already mapped on the top level. Fortunately there was nothing
whatsoever on the level below, so he spent a painstaking morning moving the roof
graphics down a level so that he could install invisible platforms above
them.


When we set the height of our invisible platforms, it affects the height of
any scenery that's too close. This often meant that roof edges would be forced
vertically downwards as we set the height of the platform. To avoid breaking
bits of buildings, we had to define some custom pieces of roof edging with a
built-in vertical offset, restoring the visible graphic to its original height.
There's a lot of this in Varrock, Falador and Rellekka due to the sticking-out
bits of edging used in their roof kits.


Render order


Back in 2004, when RS2 was first beta-tested and then launched as the main
RuneScape version, it was quite a feat to have a 3D world rendered in a Java
applet, running on low-spec computers. One of the tricks that made this possible
was the way RuneScape didn't do depth-sorting. Let's explain...


Suppose a man stands in the middle of a large bush. In the real world, some
of the bush will appear in front of the man, and the rest of the bush will
appear behind him. In RuneScape, before the 2008 HD update, the game always
assumes that the whole bush should appear in front of the man. This means that
the game isn't doing any fiddly geometry to work out which bits of the bush to
show, or which bits of the man to show, which saves a lot of processing.


To get around this sort of limitation, we basically don't let humans stand in
the middle of large bushes! But for these Agility courses, we've sometimes
needed the player to stand on a long tightrope. In Rellekka, there's a tightrope
that's about 6 tiles long. A human standing in the middle of the large rope will
be treated like the man in the bush: the scenery appears in front of the
human.


Where possible, we've tried to fix this by mapping the rope on the level
below where the player's standing. RuneScape assumes that things on higher
levels should appear in front of things on lower vertical levels, so it shows
the human in front of the rope.


Sometimes this isn't correct either; occasionally it can be a problem that
RuneScape draws higher levels over lower levels.

No Comments
    Share
    Statistics
    0
    0
    0
    0
    Sponsored