Releases: empiricaly/empirica
@empirica/core@1.12.0
Minor Changes
-
d99bca1: Add
preferUnderassignedGames
andneverOverbookGames
assignment options.The default player assignement algorithm assigns randomly to all games in the
first batch that still has game that haven't started. This algorithm will
notably "overbook" games, meaning that it will assign more players than the
game can handle. This is useful to ensure that games start quickly, while
maintaining good randomization. When the game starts, the players that are not
ready yet (because they are still in the intro steps) are automatically
reassigned to other games, with the same treamtent, if available.However, in some cases, you may want to avoid overbooking games, or prefer to
assign players to games that are underassigned. This is now possible with the
preferUnderassignedGames
andneverOverbookGames
options.The
preferUnderassignedGames
option will try to assign players to games that
are underassigned, before assigning to games that are already full, resuming
the assignment process as usual if no underassigned games are available, in the
current batch (this option does not try to prefer games that are underassigned
across batches).The
neverOverbookGames
option will never assign players to games that are
already full. This will push players into the next batches, if no games are
available in the current batch. If no games are available in the next batches,
the player will be sent to exit. This option is a bit more strict than
preferUnderassignedGames
and it can result in longer waiting times for
players, and potentially game that never start if a player never finishes the
intro steps.Given the radical nature of the
neverOverbookGames
option, it is recommended
to usepreferUnderassignedGames
option if you do not want the normal behavior
of the assignment algorithm. If you use a single batch,
preferUnderassignedGames
should fill optimally.Note that
neverOverbookGames
takes precedence overpreferUnderassignedGames
,
meaning that if both options are set totrue
,preferUnderassignedGames
will
be ignored.To apply these options, in
server/src/index.js
, you can add the following
options to theClassic
function:ctx.register( Classic({ preferUnderassignedGames: true, }) );
ctx.register( Classic({ neverOverbookGames: true, }) );
Patch Changes
@empirica/core@1.11.6
Patch Changes
-
33260a4: Remove extra directory creation in
empirica
command.An extra directory was created if the path of the project contained spaces when
running theempirica
command.
@empirica/core@1.11.5
Patch Changes
- 9f492da: Upgrade Tajriba to v1.7.1 (concurrency fixes).
@empirica/core@1.11.4
Patch Changes
-
fac2ea9: Support export of
null
attributes.Previously,
null
attributes would crash the export process. Now, they are
exported asnull
in the CSV file.
@empirica/core@1.11.3
Patch Changes
- bc4ede4: Expand export buffer size from 64kb to 2mb
@empirica/core@1.11.2
Patch Changes
- 3123aed: Replaying with a different set of of players would fail to load the game state.
@empirica/core@1.11.1
Patch Changes
-
992d5f1: Fix reassign Player to a new Game after they played and finished a first Game.
There were 2 problems:
- the
player.get("ended")
field was not cleared - the reassignment would not trigger the game to start if the introDone was not
reset (you don't want the player to go through intro steps again), since we
would never get the introDone signal, and just sit there...
- the
-
97c6837: Fix lobby fail strategy and similar straight to exit steps cases.
There was a check for the presence of the
player.game
object in front of the
exit steps. If the game never starts, theplayer.game
object is never
created, and the exit steps are never executed. This also addresses the case
where the player is never assigned a game at all (custom assignment).
@empirica/core@1.11.0
Minor Changes
-
efc0fd5: Export now supports passing a tajriba.json file as the first argument to export
the data directly from a file instead of automatically detecting the file from
the current project.# At the root of the project. empirica export # Anywhere, although it uses the global version of empirica (not the version # locked in your project). Upgrade to the latest version of empirica with: # `empirica upgrade --global` empirica export path/to/tajriba.json
@empirica/core@1.10.0
Minor Changes
-
2d4e245: Add ephemeral attribute support.
This allows you to define attributes that are not persisted to the database, but
are available to the client and server while the server is still running. These
attributes will sync with all players as normal attributes. This is useful for
data that that would be unreasonable to persist to the database due to size or
volatility, but is still useful to share between clients and the server.For example, you could use this to sync the mouse movements of the players.
player.set("mouse", { x: 123, y: 456 }, { ephemeral: true }); player.get("mouse"); // { x: 123, y: 456 }
Patch Changes
-
2d4e245: Ensure game and players are ready in exit steps.
The presence of the game and players were not checked in the exit steps, as they
are during the game. This could lead to the game or players not being available
in the exit steps callback (to select the steps) or the exit steps themselves. -
2d4e245: Make player reset in admin UI work again.
@empirica/core@1.9.9
Patch Changes
- 9197232: Attribute callbacks could be run out of order.