This document is about: SERVER 4
SWITCH TO

MMO Concept

The MMO demo is discontinued and we don't offer support for it anymore. The current documentation and the sample provided in the SDK are left temporarily and will be removed in the next update. For MMO we recommend following examples of Das Tal or Albion Online.

Virtual worlds have a virtual space that exists within coordinates. Entities located in this virtual space are called item. Clients define the area (position and extent) they are interested in and should only “see” items within the boundaries of this interest area.

photon server: mmo interest area
Photon Server: MMO Interest Area

The calculation of which items fall into which interest areas can be very CPU intensive, especially if the items and interest areas are frequently moving. An easy way to accelerate this calculation is to divide the virtual space into fixed regions and then calculate which regions overlap with the interest area. The client should receive all events of the items in these overlapping regions. The most simple algorithm uses a grid of square tiles (known as Square Tile Algorithm).

photon server: mmo interest area
Photon Server: MMO Interest Area

Item pushes events through the region where this item currently is. Once specific interest area overlaps region it automatically subscribes to region's event channel and starts receiving this region events including those pushed by items. To avoid frequent subscribe and unsubscribe changes on interest area border an additional larger interest area radius was introduced: Subscribed regions that cross this outer radius are unsubscribed, the client stops receiving the region events.

photon server: mmo interest area
Photon Server: MMO Interest Area
Back to top