multiplayer game, network controller

Discussion of all aspects of the game engine, including development of new and existing features.

Moderator: Forum Moderators

Post Reply
User avatar
ChaosRider
Posts: 846
Joined: April 15th, 2012, 1:15 pm

multiplayer game, network controller

Post by ChaosRider »

Hello,
Anonymissimus wrote:The controller attribute of sides is ambiguous.
E.g. if you have a mp game on the server with 2 human players and 1 ai, for player 1's (human, host) BfW instance:
side[1].controller -> "human"
side[2].controller -> "network"
side[3].controller -> "ai"

But for player 2's (human but no host) BfW instance:
side[1].controller -> "network"
side[2].controller -> "human"
side[3].controller -> "network"

And side 3 is a true ai.
wml events are executed simultaneously on each of the clients (instances) independently. Thus, if you base in your wml a decision on the value of side.controller, these wml events can get executed differently on the clients => OOS.
It's from this topic
My question is about side controller which is seen as network. Could you think in future about split it into two options, like "network_ai", "network_human"? Right now basing in mp scenario code on side controller is a oos maker (so for now its usable only in single scenario).
Creator of WOTG (+2880 units), MWC (+615 units), SurvivorsArea, RandomColosseum, RC WOTG, RC MWC, ColosseumRandomClonesBattle, BetweenDarknessAndLight, StealingWeapons, MoreUnitsForms, MoreDamageTypes, CanBeOnlyOne, ColosseumOneWinner, BonusSpam, CriticalStrike - available at 1.12 Wesnoth server.
User avatar
ChaosRider
Posts: 846
Joined: April 15th, 2012, 1:15 pm

Re: multiplayer game, network controller

Post by ChaosRider »

Im not saying that I need this change now, Im so capable (as for now) to find always other way to reach my goal (Im not giving up easily).
Example: You're doing a code for stealing enemies weapons:
- you want allow players to choose it (do they want new weapon from dead enemy, or not)
(here are 2 problems with solution
1. is the side which will choose to pick up or not weapon is a human or ai
2. sometimes your unit will get weapon while defending (so not in own turn) - this problem can be fixed to limit to offense picking up new weapon
My way to make it without problems:
- don't ask about picking or not weapons (so we can not worry about is it a human or ai, also problem with who is now turn is no longer a pain)
- add option on each of units to drop useless weapons.)

But such a change could be useful in future (maybe in other situation/code - where you won't have to use lua :P).
Creator of WOTG (+2880 units), MWC (+615 units), SurvivorsArea, RandomColosseum, RC WOTG, RC MWC, ColosseumRandomClonesBattle, BetweenDarknessAndLight, StealingWeapons, MoreUnitsForms, MoreDamageTypes, CanBeOnlyOne, ColosseumOneWinner, BonusSpam, CriticalStrike - available at 1.12 Wesnoth server.
Post Reply