Comments (4)
That is strictly correct, however I still don't see the practical difference. It is always the case that the number of connected player is larger than group size if the number of players to dispatch is larger than group size AND a dispatch is happening (see line 1340). Am I missing something?
from nodegame.
Here is some clarification. The initial post has been edited to better reflect the issue.
Line 1340:
This code runs when game are dispatched and not enough players are connected to fill them. It logs a message
Line 1350:
This code runs when we need to dispatch more than 1 game.
Line 1404:
This code runs when game are dispatched and more players are connect then the amount needed to fill them.
The problem with line 1350:
- If GROUP_SIZE = 2 and POOL_SIZE = 3 in waitingroom.settings.js, nPlayers will probably equal 3 when games are dispatch.
- This means that numberOfGames = 1 and groupSize = 2.
- On line 1338 nPlayersToDispatch is set to 2.
- On line 1350 no sorting will occur because nPlayersToDispatch equals groupSize.
- Line 1404 runs anyways.
The DOC makes it seem like sorting would happen on line 1404. It says that sorting should occur when nPlayers > groupSize.
from nodegame.
Thanks for the clarification, it makes sense now. I feel the documentation is correct, but the code isn't, so I am marking it as a bug.
The fix should be changing line 1350 this way:
// Old line
// if (nPlayersToDispatch > groupSize) {
// New line
if (nPlayers > groupSize) {
Am I right? If so, do you want to make a Pull Request and become a contributor?
from nodegame.
Fixed in v7
from nodegame.
Related Issues (20)
- Debug Mode should output all errors to screen in overlay layer HOT 1
- Calls to stager.stepBlock prevent to correctly close stageBlocks
- Repeated client game sessions HOT 8
- PhantomJS causes installation to fail HOT 1
- Add installation option to not install the ultimatum game HOT 1
- Clarification on documentation for SYNC_STAGE HOT 4
- WAIT_TIME = 0 might cause problems if all players minus one are DONE
- Replying node.on.done on localhost might send msgs too early HOT 1
- Visual Timer Widget bug on level change HOT 1
- Memory Database: Intro WIKI invalid code example HOT 1
- setup settings not applied to waiting room
- Improve REMOTE_DISPATCH in wait room
- Handle SIGTERM gracefully
- Allow search by player id in the Monitor
- Create Auth link from the monitor interface
- Allow adding weights to treatments, so that some get sampled more or less often
- item.from and item.player: use a unique identifier
- Consent Widget and DisconnectBox
- Asterisk in survey widgets needs options
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nodegame.