public class CreateMMORoomSettings extends CreateRoomSettings
For a full discussion of the MMORoom features see the MMORoom class documentation.
MMORoom
Modifier and Type | Class and Description |
---|---|
static class |
CreateMMORoomSettings.MapLimits
Container data class that holds the minimum and maximum coordinates available in virtual World.
|
CreateRoomSettings.RoomExtensionSettings
Constructor and Description |
---|
CreateMMORoomSettings() |
Modifier and Type | Method and Description |
---|---|
Vec3D |
getDefaultAOI() |
CreateMMORoomSettings.MapLimits |
getMapLimits() |
int |
getProximityListUpdateMillis() |
int |
getUserMaxLimboSeconds() |
boolean |
isSendAOIEntryPoint() |
void |
setDefaultAOI(Vec3D defaultAOI)
The Area Of Interest (AOI) represents the area within which Users will affect each other, for example when sending public
messages, updating User Variables etc...
|
void |
setMapLimits(CreateMMORoomSettings.MapLimits mapLimits)
Map limits are optional.
|
void |
setProximityListUpdateMillis(int updateMillis)
In MMORoom(s) there are no USER_ENTER/EXIT events.
|
void |
setSendAOIEntryPoint(boolean sendAOIEntryPoint)
When a User enters the proximity list of another Player by default we also send their coordinates.
|
void |
setUserMaxLimboSeconds(int userMaxLimboSeconds)
When a User joins an MMORoom his position in the Room is undefined and therefore he will be in a state of limbo until the first SetUserPosition request will be
received.
|
java.lang.String |
toString() |
allowOwnerOnlyInvitation, getAutoRemoveMode, getCustomPlayerIdGeneratorClass, getExtension, getGroupId, getMaxSpectators, getMaxUsers, getMaxVariablesAllowed, getName, getPassword, getRoomProperties, getRoomSettings, getRoomVariables, isDynamic, isGame, isHidden, isUseWordsFilter, setAllowOwnerOnlyInvitation, setAutoRemoveMode, setCustomPlayerIdGeneratorClass, setDynamic, setExtension, setGame, setGroupId, setHidden, setMaxSpectators, setMaxUsers, setMaxVariablesAllowed, setName, setPassword, setRoomProperties, setRoomSettings, setRoomVariables, setUseWordsFilter
public Vec3D getDefaultAOI()
public void setDefaultAOI(Vec3D defaultAOI)
The AOI is passed via a Vec3D representing the ranges for the X, Y and Z axis. For instance a value of (100,100,40) means that each User will have an event range of +/- 100 units on the X and Y axis and +/- 40 units for the Z axis. These units can represent anything: pixels, feet, meters, miles, kilometers, etc... The Vec3D can work with both Integer or Float values, both with a 32bit precision.
defaultAOI
- the range for each axis (in case of 2D worlds, the Z value can be set to zero)Vec3D
public CreateMMORoomSettings.MapLimits getMapLimits()
public void setMapLimits(CreateMMORoomSettings.MapLimits mapLimits)
mapLimits
- SFSMMOApi.setUserPosition(com.smartfoxserver.v2.entities.User, Vec3D, com.smartfoxserver.v2.entities.Room)
,
CreateMMORoomSettings.MapLimits
public int getUserMaxLimboSeconds()
public void setUserMaxLimboSeconds(int userMaxLimboSeconds)
userMaxLimboSeconds
- the maximum number of seconds allowed for a User in limbo stateSFSMMOApi.setUserPosition(com.smartfoxserver.v2.entities.User, Vec3D, com.smartfoxserver.v2.entities.Room)
public int getProximityListUpdateMillis()
public void setProximityListUpdateMillis(int updateMillis)
The frequency of PROXIMITY_LIST_UPDATE events sent to clients is regulated by this parameter. The default value is 500ms which is recommended for most applications. Lower values might generate excessive traffic and/or overwhelm the client, depending on the frequency of other messages going on concurrently.
In some real-time applications it may be needed to lower the value to 300-250ms, based on the application design.
updateMillis
- the number of milliseconds between each updatepublic boolean isSendAOIEntryPoint()
public void setSendAOIEntryPoint(boolean sendAOIEntryPoint)
public java.lang.String toString()
toString
in class CreateRoomSettings