MMORoomSettings

Stores the configuration settings required to create an MMORoom.

Constructor

new MMORoomSettings(name, defaultAOI)

Creates a new instance of the MMORoomSettings class.
Pass the instance to the CreateRoomRequest class constructor.
Parameters:
NameTypeDescription
namestringThe name of the MMORoom to be created.
defaultAOIVec3DThe Area of Interest (AoI) for the MMORoom to be created.

Extends

Members

allowOwnerOnlyInvitation :boolean

Indicates whether the Room allows Invitations to join the Room to be sent by any User or just by its owner.
Type:
  • boolean
Default Value
  • true

defaultAOI :Vec3D

Defines the Area of Interest (AoI) for the MMORoom.

This value represents the area/range around the User that is affected by server events and events generated by other Users. It is represented by a Vec3D object providing 2D or 3D coordinates.

For example, 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. A Vec3D(120,120,60). instead 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.

Type:

events :RoomEvents

Subset of the configuration parameters indicating which Room-related events should be dispatched by the client.

Room events include: Users entering or leaving the Room, User count change and User Variables update. If set to null, the events configured on the server side are enabled (see the SmartFoxServer Administration Tool documentation).

Default Value
  • null

extension :RoomExtension

Subset of the configuration parameters indicating which Extension (if any) should be attached to the Room on the server side, and its settings.
Default Value
  • null

groupId :string

Identifier (name) of the Group to which the Room is assigned.

If the Group doesn't exist yet, a new one is created before assigning the Room to it.

Type:
  • string
Default Value
  • "default"

isGame :boolean

Indicates whether the Room is a Game Room.
Type:
  • boolean
Default Value
  • false

mapLimits :MapLimits

Limits of the virtual environment represented by the MMORoom.

When specified, this property must contain two non-null Vec3D objects representing the minimum and maximum limits of the 2D/3D coordinates systems represented by the MMORoom. Any positional value that falls outside the provided limit is refused by the server.

This setting is optional but its usage is highly recommended.

Default Value
  • null

maxSpectators :number

Maximum number of Spectators allowed to join the Room (only for Game Rooms).
Type:
  • number
Default Value
  • 0

maxUsers :number

Maximum number of Users allowed to join the Room.

In case of Game Rooms, this represents the maximum number of Players.

Type:
  • number
Default Value
  • 10

maxVariables :number

Maximum number of Room Variables allowed for the Room.
Type:
  • number
Default Value
  • 5

name :string

Name of the Room.
Type:
  • string

password :string

Password to join the Room (optional).

If the password is set to an empty string, the Room won't be password protected.

Type:
  • string
Default Value
  • (empty string)

permissions :RoomPermissions

Maximum number of Room Variables allowed for the Room.

Permissions include: name and password change, maximum Users change and public messaging. If set to null, the permissions configured on the server side are used (see the SmartFoxServer Administration Tool documentation).

Default Value
  • null

proximityListUpdateMillis :number

Frequency at which the SFSEvent.PROXIMITY_LIST_UPDATE event is sent by the server.

In an MMORoom, the regular User List is replaced by a Proximity List, which keeps an updated view of the Users currently within the Area of Interest of the client. The frequency at which these updates are fired by the server is regulated by this parameter, which sets the minimum time between two subsequent updates.

Note that values below the default one may be unnecessary for most applications, unless they are in realtime.

Type:
  • number
Default Value
  • 250

sendAOIEntryPoint :boolean

Indicates whether the entry points of the other Users in the client's Area of Interest should be transmitted in the SFSEvent.PROXIMITY_LIST_UPDATE event.

If this setting is set to true, when a User enters the AoI of another User, the server sends the coordinates where the former "appeared" inside the AoI. This option should be turned off in case these coordinates are not needed, in order to save bandwidth.

Type:
  • boolean
Default Value
  • true

userMaxLimboSeconds :number

Number of seconds after which a User without a physical position set inside the MMORoom is kicked from the Room.

As soon as the MMORoom is joined, the User still doesn't have a physical position set in the coordinates system of the Room, therefore it is considered in a "limbo" state. At this point the User is expected to set its position (via the SetUserPositionRequest) within the amount of time expressed by this value.

Type:
  • number
Default Value
  • 50

variables :Array.<SFSRoomVariable>

Maximum number of Room Variables allowed for the Room.
Type:
Default Value
  • (empty array)