-
Notifications
You must be signed in to change notification settings - Fork 18
PushManager v7
- status: complete
- version: 7.x
- follows from: Size Handlers
The push manager "pushes" clients that are lagging behind in the game sequence to go to the next step.
To enable, in the logic client type, add the property pushClients
to the steps and stages that require this feature, like in the example below:
// In logic.js
// Enable pushClients with default settings.
stager.extendStep('step_with_default_push', {
pushClients: true,
});
// Or with custom settings.
stager.extendStep('step_with_custom_push', {
pushClients: {
offset: 20000, // Default: 5000
reply: 5000, // Default: 2000
check: 2000 // Default: 2000
});
Note: Make sure that the steps with pushClient
enabled have a timer set either in the
TIMER
object in game.settings.js or directly as a step property.
-
When the step timer expires, if there are still clients that have not yet finished the current step (stageLevel equals to DONE), then the push manager will start a timer of duration
offset
. -
At the end of this timer, clients that are not yet DONE (or that have not stepped forward) will be pinged.
-
Upon receiving the ping, the client will try to call the step timeup function, and then try to step forward.
-
The reply to the ping must arrive to the logic before
reply
milliseconds, otherwise the client will be disconnected. -
If a reply is received in time, then another timer is started of duration
checkPush
, after which it will be checked if the client has successfully stepped forward. If not, the client will be disconnected.
Go back to the wiki Home.
Copyright (C) 2021 Stefano Balietti
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.