Line of sight

The **line of sight** is a sequence of squares between two objects which approximates the line between them. The two objects can see each other if and only if no square in the line of sight is a barrier.

In GOP, the line of sight is used to determine whether a player is able to attract or repel an orb from their position, but the actual movement of the orb can differ from the tiles within the line.

## Calculation

The line of sight is based on a hypothetical straight line drawn from the first object's square to the second object's square. The squares which the line passes through form the line of sight between the two objects. These squares can be calculated by Bresenham's line algorithm. However, there still remains the question of where exactly within the square the line starts and where it ends.

### Before RuneTek 5

Before RuneTek 5, a distinction was made between the *player* and the *NPC*. The line of sight was always directed from the player to the NPC, and the starting point of the line was always on the boundary of the square. If the NPC is exactly diagonal to the player, then the starting point is the nearest corner of the square to the NPC; otherwise, it is the midpoint of the nearest edge to the NPC. The ending point of the line is the same relative location in the NPC's square as the starting point was on the player's square.

### After RuneTek 5

After RuneTek 5, there is no longer a distinction between the player and the NPC. Therefore, in light of this change, the line of sight is always calculated by taking the object which is farther to the west as the player and the other object as the NPC. If both of them are at the same x-coordinate, then the object which is farther south is taken as the player (however, note that in this case it makes no difference which of the two is taken as the player).

The 9:8 Mystery

## History

This RuneTek5 event was dubbed *The Great Divide* by BioIce, and explained as angles being different depending on whether orbs were to the East or West relative to the altar. The nature of the divide was further explained by andylee809, who pointed out that the difference is about whether the orb is East or West *relative to the player*. A theory he called "*The Law of Weird West*". A few years later, Icy001 was bored so he decided that this was not yet a complete explanation, so he reverse-engineered the underlying algorithm for **line of sight** and built an emulator for Gop which you can now access on Vief.tk.

> *"Basically there's this split right down the middle lane of north-south pillars that dictates how the orb moves. Spawns to the east are the old way. Spawns to the west are the new way. Think I'll call it the Great Divide."* - BioIce, September 6, 2009.
>
>

> *"What I am proposing now is yet another theory of angles….I call it the Law of WW... Weird west! The main idea is that there is no correlation between the way of fetching an orb and the orb position relative to the altar. What matters is the orb position in relation to the player (you) – is it on your east side or west side? If it’s on the east side, old angles are used, while new angles are used for west side orbs."* - andylee809, October 22, 2009.
>
>

### The 9:8 Mystery

The 9:8 Mystery is the odd pattern for the westward line of sight. It's one of the mysteries that inspired Icy001 to solve the line of sight puzzle. It is recommended for young runecrafters to try their hand at this mystery for themselves, as you don't have the opportunity to solve it first-hand once you know the solution.

> *"Eureka! After much work during 6 overs over 2 days, I have come up with a complete theory of GOP angles!"* - Icy001, June 22, 2012.
>
>