Timer.jsx
component that represents the stage timer and shows players how much time is left at that stage. stage
has to be passed down to it as a prop. For example, in the PlayerProfile.jsx
of your first Empirica experiment:Timer.jsx
component, what makes the timer is that it extracts the remainingSeconds
from the stage
, and that it imports the StageTimeWrapper
to export the Timer with export default (Timer = StageTimeWrapper(timer));
. About
. For example:client/main.js
you can set your custom component for the About section. client/main.js
with:Empirica.about
line in client/main.js
or deleting it if it is already written.client/main.js
with:Reset Player
and New Player
buttons during development, you can surround each of your important components (e.g., Round.jsx, Intro steps, etc.) with this special component:client/main.js
you can set your custom component for the Breadcrumb. client/main.js
with:handleUpdate
) and when the player clicks the submit button (handleSubmit
) so that in the end it is using the handleNewPlayer()
method that will set the player's id as the string submitted and moves the player to the first Intro Step.NewPlayer.jsx
file, or create a new one and set it in the client/main.js
.client/main.js
with:Timeout Type
(whole lobby or individual)Timeout Duration in Seconds
Timeout Strategy
(fail, ignore)Extend Count
player
and the gameLobby
. The gameLobby
can be used to extract the following properties in the customising of your Lobby:gameLobby.treatment.playerCount
will give you how many players the Game expectsgameLobby.queuedCount
will give you the total number of players queued for this game, including ready players and players currently going through the intro steps. gameLobby.readyCount
will give you the number of players ready to play. They have completed the intro steps, and they are on the lobby page.client/main.js
with:LobbyChat
component of this package in your experiment's client/main.js
file, like this:chat
expects 2 required props:player
: the current playerscope
: object that the chat will be attached to, can be game, round, or stage objects.customKey
string prop to differentiate different chats within the same scope. This changes which get/set key on the given scope the chat will be recorded.Chat
also displays a name for each participant, which you need to set in the experiment independently of the playerId
: player.set('name', "myPseudonym")
timeStamp
date prop to add the timestamp attribute on each message sent.