Inherits from SFSRoom : NSObject
Declared in MMORoom.h
MMORoom.m

Overview

The MMORoomobject represents a specialized type of Room entity on the client.

The MMORoom is ideal for huge virtual worlds and MMO games because it works with proximity lists instead of “regular” users lists.

This allows thousands of users to interact with each other based on their Area of Interest (AoI). The AoI represents a range around the user that is affected by server and user events, outside which no other events are received.

The size of the AoI is set at Room creation time and it is the same for all users who joined it. Supposing that the MMORoom hosts a 3D virtual world, setting an AoI of (x=100, y=100, z=40) for the Room tells the server to transmit updates and broadcast events to and from those users that fall within the AoI range around the current user; this means the area within +/- 100 units on the X axis, +/- 100 units on the Y axis and +/- 40 units on the Z axis.

As the user moves around in the virtual environment, he can update his position in the corresponding MMORoom and thus continuously receive events about other users (and items - see below) entering and leaving his AoI.

The player will be able to update his position via the SetUserPositionRequest request and receive updates on his current proximity list by means of the [ISFSEvents onProximityListUpdate] event.

Finally, MMORooms can also host any number of “MMOItems” which represent dynamic non-player objects that users can interact with. They are handled by the MMORoom using the same rules of visibility described before.

Properties

defaultAOI

The default Area of Interest (AoI) of this MMORoom.

@property (strong, nonatomic) Vec3D *defaultAOI

Discussion

The default Area of Interest (AoI) of this MMORoom.

See Also

Declared In

MMORoom.h

higherMapLimit

The highest coordinates value for the MMORoom.

@property (strong, nonatomic) Vec3D *higherMapLimit

Discussion

The highest coordinates value for the MMORoom.

See Also

Declared In

MMORoom.h

lowerMapLimit

The lower coordinates value for the MMORoom.

@property (strong, nonatomic) Vec3D *lowerMapLimit

Discussion

The lower coordinates value for the MMORoom.

See Also

Declared In

MMORoom.h

Instance Methods

getMMOItem:

Gets an MMOItem by its unique id

- (id<IMMOItem>)getMMOItem:(NSInteger)itemId

Parameters

itemId

the id

Return Value

the MMOItem or nil if no item was found with the provided id

Discussion

Gets an MMOItem by its unique id

See Also

Declared In

MMORoom.h

getMMOItems

Get all MMOItems managed by this MMORoom

- (NSArray *)getMMOItems

Return Value

all MMOItems

Discussion

Get all MMOItems managed by this MMORoom

See Also

Declared In

MMORoom.h