Who Makes Decisions

World in Flames is the computer version of Australian Design Group classic board game. World In Flames is a highly detailed game covering the both Europe and Pacific Theaters of Operations during World War II. If you want grand strategy this game is for you.

Moderator: Shannon V. OKeets

Shannon V. OKeets
Posts: 22165
Joined: Wed May 18, 2005 11:51 pm
Location: Honolulu, Hawaii
Contact:

Who Makes Decisions

Post by Shannon V. OKeets »

I have been working on standardizing how the program processes decision making by the players. This is quite complex given the different modes of play, number of players, and wide variety of decision making defined in rules as written (RAW). Here is some of the documentation I am writing code to.

// ****************************************************************************
// Each phase and subphase in the game has an associated TWhoDecides value which
// determines who makes decisions during the phase. The codes mean:
//
// wMWIF: the decision is made by MWIF and the players informed (many)
// wAllAny: all major powers make separate decisions in any order (8)
// wSideAny: all major powers on a side make separate decisions in any order (many)
// wOneDecider: a single major power makes the decision, sometimes on behalf of the entire side (many)
// wOrder: major powers from either side make separate decisions in a specific order - some DOW subphases & for partisans (4)
// wUSFirst: the US decides first then the other major powers on the Allied side in any order - used for declarations of war (2)
// wSetupOrder: major powers from either side make separate decisions in the order given in the Scenario setup - China is special (1)
// wPlayers: players decide separately in any order - used for bidding (1)
// ****************************************************************************
// Variables maintained identically on all computers:
//
// DeciderMPGroup: Major powers currently deciding; MWIF is deciding, this = [].
// DeciderMP: Major power making decision; not used when 2+ players deciding.
// DeciderP: Player deciding when 2 players are playing HeadToHead on 1 computer.
//
// Variables maintained with possibly different values on each computer:
//
// LocalDeciding: is True when the local player is currently making a decision.
// LocalDeciderMPGroup: Local MPs for whom decisions need to be made.
// LocalMajorPower: Local major power currently deciding
// ****************************************************************************

When a player is not deciding, then LocalMajorPower can be changed by the player to examine his units freely. This will become more important if I get time to enable the feature for Preplanned Decisions (the player enters decisions in advance and then when it is his turn to move/decide, either confirms or changes the moves/decisions).

To understand some of the complexities, it helps to 'see' which major powers each player controls. Hence the following diagram (indispensible to me when writing this code).



Image
Attachments
Deciders1782007.jpg
Deciders1782007.jpg (117.32 KiB) Viewed 334 times
Steve

Perfection is an elusive goal.
User avatar
Neilster
Posts: 2989
Joined: Mon Oct 27, 2003 1:52 pm
Location: Devonport, Tasmania, Australia

RE: Who Makes Decisions

Post by Neilster »

Doesn't "solitaire" generally refer in wargaming to when one plays oneself? If I'm right, that could cause confusion.

Cheers, Neilster
Cheers, Neilster
Shannon V. OKeets
Posts: 22165
Joined: Wed May 18, 2005 11:51 pm
Location: Honolulu, Hawaii
Contact:

RE: Who Makes Decisions

Post by Shannon V. OKeets »

ORIGINAL: Neilster

Doesn't "solitaire" generally refer in wargaming to when one plays oneself? If I'm right, that could cause confusion.

Cheers, Neilster
Ah, not in my experience. But your point is a good one. Right now HeadToHead can be played by 1 player against himself - which is your definition of solitaire. I'll think about this.
Steve

Perfection is an elusive goal.
User avatar
Jimm
Posts: 607
Joined: Thu Jul 27, 2006 7:28 pm
Location: York, UK

RE: Who Makes Decisions

Post by Jimm »

Forgive me but I dont know if you've discussed how you are going to cope with non-active player interactions, eg interceptions (both naval & air), ground support etc etc.

will this have to be pre-decided by the inactive player (presumably it would have to be for pbem?) or do you see it being live- and if so, how would it be prompted?



Jimm
User avatar
Froonp
Posts: 7998
Joined: Tue Oct 21, 2003 8:23 pm
Location: Marseilles, France
Contact:

RE: Who Makes Decisions

Post by Froonp »

ORIGINAL: Jimm

Forgive me but I dont know if you've discussed how you are going to cope with non-active player interactions, eg interceptions (both naval & air), ground support etc etc.

will this have to be pre-decided by the inactive player (presumably it would have to be for pbem?) or do you see it being live- and if so, how would it be prompted?
See here tm.asp?m=1142048 (how PBEM games will be handled ? sticky thread)
Shannon V. OKeets
Posts: 22165
Joined: Wed May 18, 2005 11:51 pm
Location: Honolulu, Hawaii
Contact:

RE: Who Makes Decisions

Post by Shannon V. OKeets »

ORIGINAL: Jimm

Forgive me but I dont know if you've discussed how you are going to cope with non-active player interactions, eg interceptions (both naval & air), ground support etc etc.

will this have to be pre-decided by the inactive player (presumably it would have to be for pbem?) or do you see it being live- and if so, how would it be prompted?
For PBEM, it would be handled by Standing Orders which the non-phasing player has entered the last time he "had control" (was the phasing player typically).

For Internet play the decision will have to be made 'live' by every player who could intercept a naval move. This is how the game plays over the board. The question would be posed to the non-phasing player(s) when a phasing player wants to move a naval unit(s) out of a sea area that it has just entered. Simply entering a sea area doesn't require a response from the non-phasnig player, since the phasing player may be stopping in the sea area anyway.

So, if a naval unit(s) wants to exit a sea area that it has just entered and there are enemy units that could intercept, then the players who own the intercepting units would have to decide whether to Intercept or Ignore. There might be several major powers controlled by a single player that could intercept. In that case the player would answer once for all his major powers. If there is more than 1 major power that could intercept and they are controlled by different players, then each player would have to decide (all answer Ignore or 1 answers Intercept).

Note that the phasing player is commited to moving the naval units to the new sea area if the non-phasing player(s) say Ignore. There is no opportunity to retract the move once even 1 non-phasing player has decided.

This might take some time, but the Internet players should all be on-line during naval movement; during some other phases it is not as important. To do this any other way would have a major effect on game play.
Steve

Perfection is an elusive goal.
User avatar
Jimm
Posts: 607
Joined: Thu Jul 27, 2006 7:28 pm
Location: York, UK

RE: Who Makes Decisions

Post by Jimm »

ORIGINAL: Shannon V. OKeets

ORIGINAL: Jimm

Forgive me but I dont know if you've discussed how you are going to cope with non-active player interactions, eg interceptions (both naval & air), ground support etc etc.

will this have to be pre-decided by the inactive player (presumably it would have to be for pbem?) or do you see it being live- and if so, how would it be prompted?
For PBEM, it would be handled by Standing Orders which the non-phasing player has entered the last time he "had control" (was the phasing player typically).

For Internet play the decision will have to be made 'live' by every player who could intercept a naval move. This is how the game plays over the board. The question would be posed to the non-phasing player(s) when a phasing player wants to move a naval unit(s) out of a sea area that it has just entered. Simply entering a sea area doesn't require a response from the non-phasnig player, since the phasing player may be stopping in the sea area anyway.

So, if a naval unit(s) wants to exit a sea area that it has just entered and there are enemy units that could intercept, then the players who own the intercepting units would have to decide whether to Intercept or Ignore. There might be several major powers controlled by a single player that could intercept. In that case the player would answer once for all his major powers. If there is more than 1 major power that could intercept and they are controlled by different players, then each player would have to decide (all answer Ignore or 1 answers Intercept).

Note that the phasing player is commited to moving the naval units to the new sea area if the non-phasing player(s) say Ignore. There is no opportunity to retract the move once even 1 non-phasing player has decided.

This might take some time, but the Internet players should all be on-line during naval movement; during some other phases it is not as important. To do this any other way would have a major effect on game play.

So effectively the game hangs for the active player while the inactive player/s makes his/their decisions. Is a time limit for a response in order do you think?

Do you think that players on the same side might be able to make proxy decisions for each other?


Jimm
Shannon V. OKeets
Posts: 22165
Joined: Wed May 18, 2005 11:51 pm
Location: Honolulu, Hawaii
Contact:

RE: Who Makes Decisions

Post by Shannon V. OKeets »

"The game hangs" is not technically correct. It implies that a player can do nothing with the mouse and keyboard. Actually, while any player is making decisions, other players can examine the map and information screens using any of the major powers they control ("any of the major powers" only makes a difference for the US player since he is the only one who can 'see' the US Entry status).

And yes, you have to wait. This is no different from playing the board game.

Proxy decisions would be tricky to implement.

Right now I am going through the code I just wrote to let players continue "working with" their current major power when a decision maker changes. So if you are looking at the US when the production phase starts, the program will let you start with the US for production rather than automatically switching to the CW just because it is the first major power in the list of ones you control. This is something that could be really annoying while playing; but coding it for all possible conditions is rather tedious, sigh.

One possibility would be to let the Team Leader for a side make decisions. When/under what conditions that would be permitted is not clear to me right now.
Steve

Perfection is an elusive goal.
User avatar
Jimm
Posts: 607
Joined: Thu Jul 27, 2006 7:28 pm
Location: York, UK

RE: Who Makes Decisions

Post by Jimm »

ORIGINAL: Shannon V. OKeets

"The game hangs" is not technically correct. It implies that a player can do nothing with the mouse and keyboard. Actually, while any player is making decisions, other players can examine the map and information screens using any of the major powers they control ("any of the major powers" only makes a difference for the US player since he is the only one who can 'see' the US Entry status).

And yes, you have to wait. This is no different from playing the board game.
sorry, a misuse of terminology on my part, but you confirm what I thought. I take your point about it being no differnt to the board game. However in that situation you can see the guy thinking about his decision, and if they are very slow you can chivy them along. With Mwif you will not necessarily know that they are even in the same room as the PC!

Ok, you could email or message them. What might be nice is some kind of mouse-clickable "I'm Thinking" icon which the inactive player could activate and the other players can see, to acknowledge that they know their decision is being waited for and they are on the case.

Proxy decisions would be tricky to implement.

One possibility would be to let the Team Leader for a side make decisions. When/under what conditions that would be permitted is not clear to me right now.

Thats kind of what I was thinking. Even just a manual permission would be a possibility?
Jimm
Shannon V. OKeets
Posts: 22165
Joined: Wed May 18, 2005 11:51 pm
Location: Honolulu, Hawaii
Contact:

RE: Who Makes Decisions

Post by Shannon V. OKeets »

Well, here is one possibility. It is a little heavy handed but within the scope of the current design.

The current design calls for the team/side leader being permitted to add and remove players from the game. The idea here is that after France falls the French player may want to drop out of the game - or for many other reasons a player may drop out. By giving the Team Leader the ability to reconfigure his team (even designating someone else as Team Leader), the game can continue without punishing all the other players.

So, a Team Leader could appropriate any and all MPs to himself and make decisions in a player's absence. Then Mr. TL could restore the previous configuration of who is playing what. Not a very clean implementation, but it should be functional.
Steve

Perfection is an elusive goal.
User avatar
composer99
Posts: 2931
Joined: Mon Jun 06, 2005 8:00 am
Location: Ottawa, Canada
Contact:

RE: Who Makes Decisions

Post by composer99 »

It might be a good idea to have the Team Leader be able to do things like that in case people have to drop out for reasons of work, going on vacation without being able to bring their MWiF along (or without wanting to bring it along), caring for ill relatives, and so on and so forth.
~ Composer99
Shannon V. OKeets
Posts: 22165
Joined: Wed May 18, 2005 11:51 pm
Location: Honolulu, Hawaii
Contact:

RE: Who Makes Decisions

Post by Shannon V. OKeets »

ORIGINAL: composer99

It might be a good idea to have the Team Leader be able to do things like that in case people have to drop out for reasons of work, going on vacation without being able to bring their MWiF along (or without wanting to bring it along), caring for ill relatives, and so on and so forth.
It is definitely part of the NetPlay design.
Steve

Perfection is an elusive goal.
User avatar
Zorachus99
Posts: 789
Joined: Fri Sep 15, 2000 8:00 am
Location: Palo Alto, CA

RE: Who Makes Decisions

Post by Zorachus99 »

Sounds good, however what happens in the case of a missing team leader?

The other thing that is concerning me is error handling in the case of players who drop network connection in a less than graceful fashion. IP addresses change, network cables get tripped over, routers crash, etc...

Have you decided on ports and protcols to be used in Netplay? For all of us behind NAT, port forwarding may be neccessary if we have to host by IP. Though it might be more work, a mutual place for negotiating the connection between players may remove the need to deal with forwarding issues. Applications like Hamachi negotiate ad hoc VPN tunnels through NAT/PAT connections.

The core of this capability is that 'almost always' a connection can be established outbound, however incoming connections need to be forwarded often by static rules that create vulnerabilities in the protection a router/firewall is designed to provide. Bypassing this issue will increase the technical knowledge needed by players to host a game.
Most men can survive adversity, the true test of a man's character is power. -Abraham Lincoln
Shannon V. OKeets
Posts: 22165
Joined: Wed May 18, 2005 11:51 pm
Location: Honolulu, Hawaii
Contact:

RE: Who Makes Decisions

Post by Shannon V. OKeets »

ORIGINAL: Zorachus99
Sounds good, however what happens in the case of a missing team leader?

The other thing that is concerning me is error handling in the case of players who drop network connection in a less than graceful fashion. IP addresses change, network cables get tripped over, routers crash, etc...

Have you decided on ports and protcols to be used in Netplay? For all of us behind NAT, port forwarding may be neccessary if we have to host by IP. Though it might be more work, a mutual place for negotiating the connection between players may remove the need to deal with forwarding issues. Applications like Hamachi negotiate ad hoc VPN tunnels through NAT/PAT connections.

The core of this capability is that 'almost always' a connection can be established outbound, however incoming connections need to be forwarded often by static rules that create vulnerabilities in the protection a router/firewall is designed to provide. Bypassing this issue will increase the technical knowledge needed by players to host a game.
Well, I got your drift but I only understood about 1/4 of the terms you used.

The MWIF structure for sending information is the simplest I could think of: an ASCII string, comma delimited. The first data field in the string is the code for the string type (which defines what the rest of the fields are) and subsequent parameters identify an entry # and transaction # for the game record log.

Each event in the game that affects the "game state" generates a game record log entry (GRL). When several GRLs are interdependent they have a common transaction #. For example, if 3 german units overrun a USSR unit, then the movement of each German unit from hex to hex is a separate GRL and all their movements together, plus GRL for the destruction of the USSR unit, have the same transaction #.

Transmission between players will be by entry if the entry is "stand alone", an isolated decision (e.g., who won the initiative die roll). Otherwise GRLs are grouped together and sent as a single Transaction.

I intend to encrpyt/decrypt the transmissions eventually.

Getting transmissions through firewalls is not something I know anything about.
-------------------------
As for a missing team leader, there will be one team leader (Allied side) who is MasterMWIF and can assign a new team leader to the other side (Axis). If the game falls apart because the Allied Team Leader goes AWOL, well, ... I have no solution at the present.
-------------------------
The entry # and transmission # design permits validating that a player has not 'missed' an entry #, and that linked entry #s are not processed until all the entry pieces have been received. I expect it to be used to bring players up-to-date who have stepped away from the game for whatever reason. Saved games store the last entry # they received, so by processing the GRLs, a game can be brought up-to-date rather easily. I also dream of being able to play the game backwards using the GRL entries. In database terms these are roll forward and roll backward transaction processing.
Steve

Perfection is an elusive goal.
User avatar
Neilster
Posts: 2989
Joined: Mon Oct 27, 2003 1:52 pm
Location: Devonport, Tasmania, Australia

RE: Who Makes Decisions

Post by Neilster »

Well, I got your drift but I only understood about 1/4 of the terms you used.

That reminds me of a classic bit of The Simpsons, where Homer becomes the "Internet King".

http://www.youtube.com/watch?v=qlTAPZUriWc

Cheers, Neilster
Cheers, Neilster
User avatar
Zorachus99
Posts: 789
Joined: Fri Sep 15, 2000 8:00 am
Location: Palo Alto, CA

RE: Who Makes Decisions

Post by Zorachus99 »

The 'simple' firewall

When PC's communicate by IP address, they establish a connection on a port, usually using the TCP method which provides a measure of insurance your packets either make it to the destination or need to be retransmitted.

An application opens a random port on the local machine and sends to the target IP on a specific port.

The target machine recieves the packet from the random port and coming into the specific port your application is listening on. The target pc responds to the random port that the transmission has been recieved.

If a 'simple' firewall is present on the target PC the packet will be blocked and dropped because a connection hasn't been established previously. Some software firewalls will detect an application listening on a port and offer to allow the connection into whatever program is listening. Other software firewalls will block the packet.

Hardware firewalls almost always block the intial packet in unless it's configured to forward the packet to a specific IP address behind the firewall.

This is just the tip of the iceberg. The only way to completely avoid the port forwarding firewall configuration issue is to host a server which establishes connections between peers. True peer-to-peer connections will always cause a certain level problems for players because firewalls exist.

Every DSL connection that AT&T installs (my large ISP in California) includes a router with a built-in firewall.

----------------

"Hey get that 50 lb. Gorrilla off the stage!"



Most men can survive adversity, the true test of a man's character is power. -Abraham Lincoln
amwild
Posts: 105
Joined: Mon Feb 09, 2004 9:31 am

RE: Who Makes Decisions

Post by amwild »

ORIGINAL: Zorachus99

The 'simple' firewall

When PC's communicate by IP address, they establish a connection on a port, usually using the TCP method which provides a measure of insurance your packets either make it to the destination or need to be retransmitted.

An application opens a random port on the local machine and sends to the target IP on a specific port.

The target machine recieves the packet from the random port and coming into the specific port your application is listening on. The target pc responds to the random port that the transmission has been recieved.

If a 'simple' firewall is present on the target PC the packet will be blocked and dropped because a connection hasn't been established previously. Some software firewalls will detect an application listening on a port and offer to allow the connection into whatever program is listening. Other software firewalls will block the packet.

Hardware firewalls almost always block the intial packet in unless it's configured to forward the packet to a specific IP address behind the firewall.

This is just the tip of the iceberg. The only way to completely avoid the port forwarding firewall configuration issue is to host a server which establishes connections between peers. True peer-to-peer connections will always cause a certain level problems for players because firewalls exist.

Every DSL connection that AT&T installs (my large ISP in California) includes a router with a built-in firewall.

----------------

"Hey get that 50 lb. Gorrilla off the stage!"

Don't forget that some routers are UPnP, meaning that with the right commands (what they are, I don't know), they can automatically open and close appropriate ports through their firewall, while other routers do not have this capability. UPnP router support would be good for those who don't really know how to configure their routers.
User avatar
Zorachus99
Posts: 789
Joined: Fri Sep 15, 2000 8:00 am
Location: Palo Alto, CA

RE: Who Makes Decisions

Post by Zorachus99 »

True UPnP works in many cases, however it's not a solution for everyone, and Steve has to learn how to program a UPnP aware application...
Most men can survive adversity, the true test of a man's character is power. -Abraham Lincoln
Shannon V. OKeets
Posts: 22165
Joined: Wed May 18, 2005 11:51 pm
Location: Honolulu, Hawaii
Contact:

RE: Who Makes Decisions

Post by Shannon V. OKeets »

ORIGINAL: Zorachus99

True UPnP works in many cases, however it's not a solution for everyone, and Steve has to learn how to program a UPnP aware application...
Ahh, if you forum members with expertise in this area can reach agreement on the preferred design solution, that will make my life easier.[:)]
Steve

Perfection is an elusive goal.
bj_rohde
Posts: 14
Joined: Fri Aug 03, 2007 12:01 pm
Location: Norway

RE: Who Makes Decisions

Post by bj_rohde »

ORIGINAL: Shannon V. OKeets

Note that the phasing player is commited to moving the naval units to the new sea area if the non-phasing player(s) say Ignore. There is no opportunity to retract the move once even 1 non-phasing player has decided.

But according to RAW, you can choose to intercept when enemy naval unit(s) enters the sea area, with no requirement of continuing regardless of the intercept attempt. I have several times "tricked" the other player into intercepting a force that was going to end there anyways, possibly preventing him from having face-up units there at the return to base step, and thus not being able to intercept units with cargo, for example.

So unless I interpret RAW wrong (it has happened), I don't think the player should be forced to continue the move.
Post Reply

Return to “World in Flames”