Overview

Server functions

essential.addPlayer
essential.createPlayerInfo
essential.disconnectedPlayer
essential.getGameStateData
essential.getScore
essential.handlePacket
essential.handleState
essential.playerAddedToIdleGame
essential.reconnectedPlayer
essential.removePlayer
essential.setupGameRoom
essential.storeHighScore
essential.winnerResult

helper.bootPlayer
helper.calcScoreFromTime
helper.getAllPlayerInfos
helper.getAllPlayerNames
helper.getCurrentTime
helper.getPlayerInfo
helper.getPlayerPosition
helper.getSpecialStat
helper.getSquizQuestion
helper.getStat
helper.numberOfPlayersInGame
helper.postNewState
helper.postPacketToAll
helper.postPacketToPlayer
helper.postPacketToRest
helper.removeCheater
helper.setLobbyStatus
helper.setPlayerInfo
helper.storeStat
helper.trace

Client methods

chat.addText
chat.connectToLobby
chat.connectToPlayerComponent

lobby.addEventListener
lobby.exitToLobby
lobby.getInviteAddress
lobby.getSettings
lobby.sendPacket
lobby.setGameName
lobby.setLocal
lobby.updateSettings

player.clearPlayerInfo
player.updatePlayerInfo

Smuck API Overview

This is the quick reference for the Smuck API. You can download Smuck from http://www.spogg.com/developer It is highly recommended that you start by reading Smuck - Programmer's Guide before you dig into the reference.

The reference is divided into two sections, one with all server functions and one with the interface for the client components.

The server section contains essential and helper functions. The essential functions must be implemented in the server script and the helper functions can be used from within the script. To get started quickly, use the Server script skeleton, in the Bare bones example folder.

The methods in the client section refers to the chat, lobby and player components.