Four games, four engines, and three questions that none of them could avoid: who is allowed to see what, how do bodies keep out of each other, and how do you watch the thing again. The answers look unrelated until you line them up, and then they read as one decision made four ways: what does this engine trust?
Doom trusted every machine equally and had nothing to hide from any of them. Warcraft III trusted the engine with information and handed maps a mask to draw with. Riot trusts no client at all. RollerCoaster Tycoon never had anything to hide and never needed a recording, which freed it to be approximate.
Who may see what
Doom has no fog of war. A deathmatch is symmetric: four players, one level, the same information for everyone, because the machine that runs your view is running the same simulation as the machine across the table. That is not a design preference, it is a consequence. A peer that can compute the world can compute the parts you cannot see, so there is nothing to withhold.
Warcraft III is the opposite because it had a server-shaped problem in a peer-ish world: the engine holds a
fog grid per player, and the script API exposes it directly. There are three states, and they are constants
in common.j:
constant fogstate FOG_OF_WAR_MASKED = ConvertFogState(1) // unexplored
constant fogstate FOG_OF_WAR_FOGGED = ConvertFogState(2) // seen before, not now
constant fogstate FOG_OF_WAR_VISIBLE = ConvertFogState(4) // currently in sight
A map can ask IsVisibleToPlayer(x, y, whichPlayer) and can write the grid itself with
SetFogStateRadius(forWhichPlayer, whichState, centerx, centerY, radius, useSharedVision) [1]. DotA did not
build vision. It inherited a per-player mask and wrote rules on top of it, which is why a genre defined by
information asymmetry could exist at all inside a 2002 real-time strategy game.
League takes the same question and makes it an architecture. The server is the authority, and Riot states the principle in the plainest terms it has published, about its other game: “the server must never trust a client’s view of the world.” Everything a client draws about another player is a message the server chose to send.
How bodies collide
Doom’s answer is a box. The collision test for a player against another thing is two axis comparisons:
blockdist = thing->radius + tmthing->radius;
if ( abs(thing->x - tmx) >= blockdist
|| abs(thing->y - tmy) >= blockdist )
return true; // didn't hit it
Two radii added, then compared separately on x and y [2]. Bodies are squares, not circles, and the approximation costs nothing: no square root, no distance formula, two subtractions and two comparisons.
RollerCoaster Tycoon spends its approximation somewhere else. A guest looking for a route runs a depth first search that gives up improving after five junctions, seven if the guest is holding a park map, eight if it is lost [3]. It is explicitly not A*; the decompilation says so in a comment, because someone kept reading it as one. Five junctions is not a hardware limit. It is a patience limit, and it means the game prefers a guest that moves to a guest that navigates optimally.
Warcraft III puts both concerns in the engine and gives the script a switch. SetUnitPathing(whichUnit, flag)
turns it off per unit [4], and unit enumeration is spatially partitioned: the engine divides the field into 256
by 256 sectors and keeps track of which units are in which, then walks them in a fixed order [4]. A map author
inherits collision, pathing and a spatial index, which is exactly the inheritance DotA’s six inventory slots
represent: UnitItemInSlot(whichUnit, itemSlot) takes slots zero to five because the engine’s inventory has six
slots.
How you watch it again
This is where the trust question stops being philosophical.
Doom can replay a match from a few kilobytes because the replay is the input. Demo playback reads commands through the same function the network reads them from, and recording writes them back out [5]. No frames, no positions, just the same eight-byte commands that kept four machines in agreement, which is only enough because the simulation is a function of them and because every machine was trusted to compute it identically.
League cannot do that, and its replays say so. A replay is a .rofl file, it is available only for the last 20
games on the client, and it is bound to the build that recorded it: “Replays last for the length of a patch
cycle, meaning they’ll expire once you patch up” [6]. Since Patch 26.21, a player can download ten per hour. A
Doom demo from 1994 still plays today, in a source port, on a different architecture, because it is nothing but
intent. A League replay does not survive a patch, because what it records is tied to the code that produced it.
RollerCoaster Tycoon has neither, and does not miss them. It never trusted peers and never needed to prove anything afterwards, so the money went into simulation quality per guest rather than into reproducibility.
The three questions are one
Put the answers in a table and the pattern is not subtle.
| Doom | RollerCoaster Tycoon | Warcraft III | League of Legends | |
|---|---|---|---|---|
| Visibility | none, by construction | not applicable | per-player fog grid in the engine | server decides what each client is told |
| Collision | axis-aligned box, two radii added | bounded search, five junctions | engine pathing, 256 by 256 sectors | server simulates, client predicts |
| Replays | input log, portable forever | none | none in the map layer | build-bound .rofl, expires with the patch |
Read down the replay column and the column tells you what each engine thought of its participants. Doom’s demo is a confession that every machine was trusted to compute the same world. League’s replay is a confession that none was. Warcraft III’s lack of one is a confession that nobody asked.
That is the useful question to bring to any new engine or protocol, and it is cheaper to answer from the artefacts than from the architecture diagrams: if the system can replay from intent, it trusts the participants. If it can only replay from a recording bound to a build, it does not trust them at all. The file format is the policy.
References
[1] Blizzard Entertainment, Warcraft III script API, common.j: FOG_OF_WAR_MASKED, FOG_OF_WAR_FOGGED,
FOG_OF_WAR_VISIBLE, IsVisibleToPlayer, SetFogStateRadius.
https://raw.githubusercontent.com/lep/jassdoc/master/common.j
[2] id Software, DOOM, linuxdoom-1.10/p_map.c, PIT_StompThing and its two-axis radius comparison.
https://github.com/id-Software/DOOM/blob/master/linuxdoom-1.10/p_map.c
[3] OpenRCT2, src/openrct2/peep/GuestPathfinding.cpp: the junction limits and the comment stating the search
is a depth first search rather than A*. https://github.com/OpenRCT2/OpenRCT2/blob/develop/src/openrct2/peep/GuestPathfinding.cpp
[4] Blizzard Entertainment, common.j: native SetUnitPathing, and the note on 256 by 256 unit sectors.
https://raw.githubusercontent.com/lep/jassdoc/master/common.j
[5] id Software, linuxdoom-1.10/g_game.c, G_ReadDemoTiccmd and G_WriteDemoTiccmd.
https://github.com/id-Software/DOOM/blob/master/linuxdoom-1.10/g_game.c
[6] Riot Games, Replays FAQ and Pro-Tips: the .rofl file, the 20-game window, the per-hour download cap, and
patch-cycle expiry. https://support.riotgames.com/en-us/league-of-legends/gameplay/replays-faq-pro-tips/