Do all the scripts run only on host machine in mp games?
Do all the scripts run only on host machine in mp games?
In an MP game, with multiple human players, do all the scripts (rules.js, scavfact.js, AIs, etc) only run on the host machine or do some of them also run on client machines as well?
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
-- https://warzone.atlassian.net/wiki/display/GO
- Shadow Wolf TJC
- Regular
- Posts: 1047
- Joined: 16 Apr 2011, 05:12
- Location: Raleigh, NC
Re: Do all the scripts run only on host machine in mp games?
I think that rules.js is supposed to run on both the host and client machines. Otherwise, there would be desyncs.
Creator of Warzone 2100: Contingency!
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100
Re: Do all the scripts run only on host machine in mp games?
That's what I thought, but I'm not 100% sure if that is the case. Specifically, I was wondering if the hackNetOn() and hackNetOff() have something to do with sending out player set-up data (limits, techs, etc) in some sort of special "game initialisation" packet to all players?
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
-- https://warzone.atlassian.net/wiki/display/GO
Re: Do all the scripts run only on host machine in mp games?
Shadow Wolf is right. rules.js runs on all peers, while AIs only run on host. hackNetOn/Off() stops the underlying code from sending out net messages, which would duplicate/undo changes done by rules.js on each peer. As the name indicates, this is a stopgap solution, until a better design solution is found.
- Shadow Wolf TJC
- Regular
- Posts: 1047
- Joined: 16 Apr 2011, 05:12
- Location: Raleigh, NC
Re: Do all the scripts run only on host machine in mp games?
And I presume that scavfact.js is run on the host player as well, since it's basically an AI script for Scavengers?
Creator of Warzone 2100: Contingency!
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100
Founder of Wikizone 2100: http://wikizone2100.wikia.com/wiki/Wikizone_2100
Re: Do all the scripts run only on host machine in mp games?
Correct.Shadow Wolf TJC wrote:And I presume that scavfact.js is run on the host player as well, since it's basically an AI script for Scavengers?