forked from incompl/cloak
-
Notifications
You must be signed in to change notification settings - Fork 0
ServerConfiguration
Greg edited this page Sep 2, 2013
·
19 revisions
These are passed to cloak.configure() before calling cloak.run() See ServerAPI for more details on running the server.
-
portto run on -
gameLoopSpeedhow frequently do game loop "pulses" happen in ms. default 100 -
defaultRoomSizeMaximum number of players in a room. Default null (no maximum) but can be any number 1 or greater. Set to 1 for a single player game. -
autoJoinLobbydefault true. Players automatically join the lobby after connecting, when leaving a room, etc. -
autoCreateRoomsdefault false. create rooms as soon as there are enough users in the lobby to meet theminRoomMembers. When a room is created, players in the lobby are automatically added. -
minRoomMembersMinimum number of players required for a room to be created. Use withautoCreateRooms. If a room drops below this number of members, all members are kicked and the room is closed. -
reconnectWaithow long the server waits (in milliseconds) for a user to reconnect before deleting them and removing them from any rooms they're in. default 10000. set tonullto wait forever -
reconnectWaitRoomlessoverridereconnectWaitfor users that are not in a room. defaultnullwhich means same asreconnectWaitNote: this wait time refers to how long they have been disconnected total, not how long since they left a room. -
roomLifehow long in ms a room is open before it automatically closes. set to null for infinite. default null -
messages- custom events to handle messages from client
-
room-
initcallback on new room -
pulsecalled periodically for rooms -
newMembercalled when a new member joins the room.thisis the room, function arg is the user -
memberLeavescalled when a member leaves the room.thisis the room, function arg is the user -
closecallback on closing of room
-
-
lobby- has the same events as
room(see above) but they only apply to the lobby
- has the same events as
All documentation on this wiki is licensed under a Creative Commons Attribution 3.0 Unported License. To attribute simply link to this wiki.