Skip to content

Map Division

boyism80 edited this page Jul 3, 2026 · 1 revision

Map Division

Map Sector Layout

Maps are organized in three levels:

  1. Game process — one process per logical map group (diagram: Continent). In data, maps are grouped by a host field; each Game container loads maps that share its host ID.
  2. Continent — a set of related maps managed by the same Game process (map count varies).
  3. Map — each map is divided into a sector grid for spatial queries.

Sectors

Sector cell size is 17 × 15 tiles (MAX_SCREEN_WIDTH × MAX_SCREEN_HEIGHT). The number of sectors depends on map dimensions (the diagram shows an example grid of 20 sectors).

When an object moves, it may change sector. Nearby-sector queries (nears) limit visibility and collision checks to adjacent cells, reducing search cost.

Routing between Game processes

Players are routed to the Game process for their map's host. Moving to a map on a different host triggers a transfer to another Game container.

Related pages

Clone this wiki locally