SmartFoxServer 3 C++ Client API 3.1.0-beta
Client API for SmartFoxServer 3
Loading...
Searching...
No Matches
sfs3::requests::MMOSettings Struct Reference

The settings specific to an MMORoom, passed to CreateRoomRequest through RoomSettings::mmoSettings. More...

#include <RoomSettings.h>

Public Member Functions

 MMOSettings (entities::Vec3D defaultAOI)

Public Attributes

entities::Vec3D defaultAOI
 The area of interest (AoI) around a user: the range within which the user is affected by the events of the server and of the other users.
std::optional< MapLimitsmapLimits
 The limits of the virtual environment represented by the Room; when unset the map is unbounded.
int32_t userMaxLimboSeconds = 50
 The number of seconds a user can stay inside the Room without a position set, before being kicked out of it.
int32_t proximityListUpdateMillis = 250
 The minimum number of milliseconds between two subsequent PROXIMITY_LIST_UPDATE events sent by the server.
bool sendAOIEntryPoint = true
 Whether the PROXIMITY_LIST_UPDATE event should also carry the coordinates at which a user "appeared" inside the current user's area of interest.

Detailed Description

The settings specific to an MMORoom, passed to CreateRoomRequest through RoomSettings::mmoSettings.

MMORooms represent virtual environments and can host any number of users. Instead of the regular users list they keep a proximity list per user, holding the other users currently within that user's area of interest.

NOTE: the numeric mode (integer or float) of the whole MMO block is decided by defaultAOI alone. The server reads the coordinates system of the Room off that one value and then expects the map limits in the same mode, so limits built in the other mode are converted — and possibly truncated — when the request is sent.

See also
MMORoom

Constructor & Destructor Documentation

◆ MMOSettings()

sfs3::requests::MMOSettings::MMOSettings ( entities::Vec3D defaultAOI)
inline
Parameters
defaultAOIthe area of interest around a user

Member Data Documentation

◆ defaultAOI

entities::Vec3D sfs3::requests::MMOSettings::defaultAOI

The area of interest (AoI) around a user: the range within which the user is affected by the events of the server and of the other users.

Mandatory.

A Vec3D of (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. A Vec3D of (120, 120, 60) describes a range of 120 units in those four directions plus 60 units along the two Z-axis directions (backward, forward), in a 3D coordinates system.

◆ mapLimits

std::optional<MapLimits> sfs3::requests::MMOSettings::mapLimits

The limits of the virtual environment represented by the Room; when unset the map is unbounded.

Optional, but its usage is highly recommended.

◆ userMaxLimboSeconds

int32_t sfs3::requests::MMOSettings::userMaxLimboSeconds = 50

The number of seconds a user can stay inside the Room without a position set, before being kicked out of it.

Right after joining an MMORoom a user still has no physical position in the coordinates system, and is therefore considered to be in a "limbo" state: the position is expected within this amount of seconds, through a SetUserPositionRequest.

◆ proximityListUpdateMillis

int32_t sfs3::requests::MMOSettings::proximityListUpdateMillis = 250

The minimum number of milliseconds between two subsequent PROXIMITY_LIST_UPDATE events sent by the server.

Values below the default are unnecessary for most applications, unless they are realtime ones.

◆ sendAOIEntryPoint

bool sfs3::requests::MMOSettings::sendAOIEntryPoint = true

Whether the PROXIMITY_LIST_UPDATE event should also carry the coordinates at which a user "appeared" inside the current user's area of interest.

Turning this off saves bandwidth when those coordinates are not needed.


The documentation for this struct was generated from the following file:
  • requests/RoomSettings.h