SFS2X Objective-C API  1.7.13
iOS / macOS / tvOS
MMORoomSettings.h
1 //
2 // MMORoomSettings.h
3 // SFS2X
4 //
5 // Created by Lapo on 29/11/13.
6 // Copyright (c) 2013 A51 Integrated | http://a51integrated.com. All rights reserved.
7 //
8 
9 #import "RoomSettings.h"
10 #import "Vec3D.h"
11 #import "MapLimits.h"
12 
13 /** The MMORoomSettings class is a container for the settings required to create an MMORoom using the CreateRoomRequest request.
14 
15  @see MMORoom
16  @see CreateRoomRequest
17  @see CreateRoomSettings
18  */
20 
21 /** Defines the Area of Interest (AoI) for the MMORoom.
22 
23  This value represents the area/range around the user that will be affected by server events and other users events. It is represented by a Vec3D object providing 2D or 3D coordinates.
24 
25  NOTE: Setting this value is mandatory.
26 
27  Example #1: a Vec3D(50,50) describes a range of 50 units (e.g. pixels) in all four directions (top, bottom, left, right) with respect to the user position in a 2D coordinates system.
28 
29  Example #2: a Vec3D(120,120,60) describes a range of 120 units in all four directions (top, bottom, left, right) and 60 units along the two Z-axis directions (backward, forward) with respect to the user position in a 3D coordinates system.
30 
31  @see Vec3D
32  */
33 @property (strong, nonatomic) Vec3D* defaultAOI;
34 
35 /** Defines the limits of the virtual environment represented by the MMORoom.
36 
37  When specified, this property must contain two non-null Vec3D objects representing the minimum and maximum limits of the 2D/3D coordinates systems. Any positional value that falls outside the provided limit will be refused by the server.
38 
39  This setting is optional but its usage is highly recommended.
40 
41  @see Vec3D
42  */
43 @property (strong, nonatomic) MapLimits* mapLimits;
44 
45 /** Defines the time limit before a user without a physical position set inside the MMORoom is kicked from the Room.
46 
47  As soon as the MMORoom is joined, the user still doesn't have a physical position set in the coordinates system, therefore it is considered in a "limbo" state. At this point the user is expected to set his position (via the SetUserPositionRequest request) within the amount of seconds expressed by this value.
48 
49  Default value is 50 seconds.
50  */
51 @property (assign, nonatomic) NSInteger userMaxLimboSeconds;
52 
53 /** Configures the speed at which the [ISFSEvents onProximityListUpdate:] event is sent by the server.
54 
55  In an MMORoom, the regular users list is replaced by a proximity list, which keeps an updated view of the users currently within the Area of Interest (AoI) of the current user. The speed at which these updates are fired by the server is regulated by this parameter, which sets the minimum time between two subsequent updates.
56 
57  NOTE: values below the default might be unnecessary for most applications unless they are in realtime.
58 
59  Default value is 250 milliseconds.
60 
61  @see [ISFSEvents onProximityListUpdate:]
62  */
63 @property (assign, nonatomic) NSInteger proximityListUpdateMillis;
64 
65 /** Sets if the users entry points in the current user's Area of Interest should be transmitted in the [ISFSEvents onProximityListUpdate:] event.
66 
67  If this setting is set to YES, when a user enters the AoI of another user, the server will also send the coordinates at which the former "appeared" within the AoI. This option should be turned off in case these coordinates are not needed, in order to save bandwidth.
68 
69  Default value: YES
70 
71  @see [User aoiEntryPoint]
72  @see [MMOItem aoiEntryPoint]
73  @see [ISFSEvents onProximityListUpdate]
74  */
75 @property (assign, nonatomic) BOOL sendAOIEntryPoint;
76 
77 /**
78  @param name the name of the MMORoom
79  */
80 -(id)initWithName:(NSString *)name;
81 
82 /**
83  @param name the name of the MMORoom
84  */
85 +(id)settingsWithName:(NSString *)name;
86 
87 @end
MMORoomSettings::proximityListUpdateMillis
NSInteger proximityListUpdateMillis
Definition: MMORoomSettings.h:63
MMORoomSettings::userMaxLimboSeconds
NSInteger userMaxLimboSeconds
Definition: MMORoomSettings.h:51
MMORoomSettings
Definition: MMORoomSettings.h:19
Vec3D
Definition: Vec3D.h:26
RoomSettings
Definition: RoomSettings.h:39
MMORoomSettings::sendAOIEntryPoint
BOOL sendAOIEntryPoint
Definition: MMORoomSettings.h:75
MMORoomSettings::mapLimits
MapLimits * mapLimits
Definition: MMORoomSettings.h:43
MMORoomSettings::defaultAOI
Vec3D * defaultAOI
Definition: MMORoomSettings.h:33
MapLimits
Definition: MapLimits.h:17