-
Notifications
You must be signed in to change notification settings - Fork 15
[pom-lite] multiplayer study workflow #982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pom-lite will be the base for solo and 'simplified' multiplayer game modes all lobbies (including for pom-lite multiplayer will inherit from the same base lobby)
and simplify the lobby that will be used for multiplayer games
implements the lite multiplayer game room with commands/lobby transfer and lots of refactoring in order to extract reuse shared functionality between the solo lite and multiplayer lite versions the lobby is working, however the game room itself is not and is missing persistence to the db + multiplayer specific UI elements
these all share common base classes, and solo records will ideally be migrated to lite records once all of the other components are TODO: uncomment/migrate lite entities
* added player tracking for multiplayer study participants + squashed with prior migration TODO: add client side transition for the game reset TODO: implement litegame service methods that the game logic (commands) now need
* add lite game events/treatments fixtures, which are a copy of the solo ones (as with everything else here, until lite game can replace solo)
and fix the game not resetting properly by restarting the game loop after clearing the room clock TODO: fully integrate the study participant status into the flow
and instructions on the 'round 0' waiting period (which need to be updated)
TODO: add handling for when players abandon the group, currently the game simply proceeds and allows them to rejoin
onJoin will revert it back since we give them the opportunity to rejoin in the case of disconnection, etc. also, properly dispose of the game by calling EndGameCmd if all players leave
and some style/linter fixes
the shared lobby queue is now FIFO, which, in conjunction with a timeout that starts when the last player joins the lobby ensures that players will not wait in the lobby for more than TIMER * (NUM_PLAYERS - 1), or 10 min in the case of 3-player games with a 5 minute timeout also: * scale the event card thresholds by the same system health scaling factor (num of players) * correct max rounds for prolific variable game to 11 * give more time (45s for reading instructions)
more 'and the other players' language
by checking whether we are on the 2nd game + gameOver OR study complete instead of just study complete
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Lite game mode
This adds a new game mode referred to as
lite
which is based on the solo game mode but allows for a variable amount of players. This means that the solo game mode should be able to be completely replaced by lite game configurations, assuming data is migrated (or the legacy data is kept around)Note
most of the
Solo*
andLite*
classes/entities inherit from the same base class to make this eventual refactor/migration a bit easiermultiplayer study
the
lite
game is used to implement a 3-player prolific study flow similar to the existing solo study flow. Multiplayer studies can be created in the same place in the admin interface and the configuration/treatments/event cards remain the samethe entry-point for each mode is:
<HOST>/study/prolific/solo?prolificId=<PROLIFIC_PARTICIPANT_ID>&studyId=<PROLIFIC_STUDY_ID>
<HOST>/study/prolific/multiplayer?prolificId=<PROLIFIC_PARTICIPANT_ID>&studyId=<PROLIFIC_STUDY_ID>
configuration
npm run migrate
npm run load-fixtures:prod