Game Initialization/Turn Group

The file for our HW4 presentation can be found here. If that doesn't work click here for the file. *** Warning the page may have images with large file sized I'll try to get the file sizes down soon


Use Cases | Game-Turn Overview | AI | Scenarios | VP Activity Diagrams | VP Collaboration Diagram | Class Diagrams | GUI Dialogs

Use Cases

Use Case Descriptions (first three by Carrie)

Name: Start Game
Summary: The human user (Rebel player) starts a new game.
Steps:
1. User starts FITG program. 2. System brings up opening game selection dialog.
3. User selects game type in dialog. 4. System lists possible scenarios and grays out others.
5. User selects scenario.
6. User selects game difficulty.
7. User clicks on New Game button in the dialog. 8. System initializes new game.
Alternatives: Users quits or loads a saved game (at step 3 or beyond).
Name: Save Game
Summary: The human user (Rebel player) saves a game.
Steps:
1. User selects Saved Game from the Game Menu, or presses CTRL-S. 2. System brings up a dialog with a text field input field.
3. User types in desired file name for saved game.
4. User clicks Save Game button in the dialog box, or presses the Enter key. 5. System creates the saved game file in a directory.
Alternative: User clicks the Cancel button in the dialog and the system returns to the game sequence.
Name: Exit Game
Summary: The human user (Rebel player) exits a game.
Steps:
1. User selects Quit Game from the Game Menu or presses the Escape key (Esc). 2. System brings up a dialog asking if the user if they wish to quit.
3. User clicks the Yes button in the dialog. 4. System checks if the game is saved at its current state. If it was not saved system prompts user with dialog asking if the wish to save the game, otherwise skip to step 7.
5. User clicks the Yes or No button. 6. System uses Save Game if yes, otherwise it skips to step 7.
7. System terminates the running of the program.
Alternative: User clicks the Cancel button in step 3 and the game resumes.

By Amelia

Victory Points



Use Case Descriptions

Use case: Earning Victory Points
Actor: Human Player
Goal: To earn victory points when a particular condition exists at the end of the game.
Precondition: Neither Human Player nor AI Player has achieved instant victory at the end of Game Play. Possible during game play.
Summary: When Human Player meets a particular condition during game play in which the scenario helps him or her cause,
he or she will lose a certain number of points.
Related use case: Losing victory points.
Steps:
1) Choose a scenario.2) Tallies how many VP wins the game.
3) Plays the game.4) Keep track of possible instant victor
5) Make decision how to play game.6a) Certain condition happens.
6b) Addvictory points.
7) Finish playing game.8) Calculates victory points earned.
86a) Compares total victory points to the scenario and game.
Postcondition: Human player has won or lost the game depending on the comparison of number of victory points the human player
has been awarded to the number of victory points to win the game.

Use case: Losing Victory Points
Actor: Human Player
Goal: To lose victory points when a particular condition exists at the end of the game.
Precondition: Neither Human Player nor AI Player has achieved instant victory at the end of Game Play. Possible during game play.
Summary: When Human Player meets a particular condition during game play in which the scenario does not help him or her cause,
he or she will lose a certain number of points.
Related use case: Earning victory points.
Steps:
1) Choose a scenario.2) Tallies how many VP wins the game.
3) Plays the game.4) Keep track of possible instant victory
3a) Certain condition happens.4a) Remove victory points.
5) Finish playing game.6) Calculates victory points earned.
6a) Compares total victory points to the scenario and game.
Postcondition: Human player has won or lost the game depending on the comparison of number of victory points the human player
has been awarded to the number of victory points to win the game.

Use case: Instant Victory in the Star System Game in the Start of Rebellion Scenario.
Actor: Human Player
Goal: To win an instant victory during Star System Game in the Start of Rebellion Scenario.
Precondition: Any Planet is ever Rebel-controlled.
Summary: The Human Player wins instant victory if any of the planet is ever Rebel-controlled during game play.
Related use case: Imperial player or AI player wins instant victory.
Steps:
1) Choose Star System game.
1a) Choose Start of Rebellion Scenario2) Determines condition for instant victory.
3) Plays the game.4) Keep track of possible instant victory
4a) Gives instant victory to Human Player.

Postcondition: End of game.

Back to top


Overview of a Game-Turn in a Star System Game:


(By Aileen)

Updated version of game flow for star system game:

while( true ) // loop until broken {
Indicate current Game turn:
someLabel.setText( "" + gameType.GameTurn );
Indicate rebel player turn:
someLabel.setText( "rebel" );
Indicate Operations Phase, Movement
someLabel.setText( "operations" );
someOtherLabel.setText( "movement" );
rebelPlayer.move(); // movement called from human player class
      // movement function responsible for calling
      // combat if necessary
Indicate Operations Phase, Enemy Reaction
aiPlayer.react(); // ai player class calls movement&search
Indicate Search Phase
someLabel.setText( "search" );
aiPlayer.search(); // calls on movement&search team functions
      // also automatically calls combat if necessary
Indicate missions phase
someLabel.setText( "missions" );
humanPlayer.setMissions(); // automatically passes to missions team
      // from within human player class
Indicate imperial, operations, movement;
somelabel.setText("Imperial");
someLabel.setText("operations");
someOtherLabel.setText(" movement" );
aiPlayer.move(); // as above
Indicate Operations phase, enemy reaction:
humanPlayer.react();
Indicate Search phase:
someLabel.setText("search");
humanPlayer.search();
Indicate Missions Phase:
aiPlayer.setMissions();
Indicate game Interphase
(previously declared int) win = gameType.checkWinConditions();
if( win == 1 ) winner = human;
else if( win == 2 ) winner = imperial;
if( win != 0 ) break;
gameType.gameTurn += 1;
} show winner; closing credits; return to window for new game perhaps?

Back to top


AI:


(By Aileen)

AI intelligence level/decision making strategy/ priorities:
In the interest of meeting time constraints, the AI just leaned quite a bit toward the Random side of things. Please see the (in progress) AI class and associated javadoc info for summaries of the individual methods and the decisions to which they relate. Note that this is not yet finished and the programming/pseudocode which has been done thus far creates an AI with a distinct favoritism towards killing and combat. Hey, the empire IS evil, after all. Movement in general is quite a bit more random and I need to talk to the movement team about the best way to interface with them before much more progress is made on this front. Further, I request that the character class include a char variable to represent the immediately previous mission attempted by that character. In relation to functions not yet titled and far from being written, I intend to stick to the "evil empire" view and aim for death and destruction wherever possible. I do intend to add some conditions relating to priorities depending on the start-rebellion/armageddon situation. Other priority-related changes can be made later, should the sun crash into the earth and we find ourselves with free time on our hands :)
AI access to partial information, as requested:
Every entity in the game (ie. characters, possessions, spaceships, etc.) needs to have 2 attributes: 1) boolean value to tell whether or not the AI player can "see" the entity and 2) another boolean value to tell whether or not the human player can "see" the entity (ie. whether or not it appears somewhere in the GUI).
AI central vs. Decentralized decisions, as requested:
As yet, the only headway I've made in this direction is to request a variable to represent the most recent mission attempted by a character. I also would like a variable in each military unit which the AI can read and manipulate; a string would be ideal. This would be useful as a flag which the AI can set, meaning, for example "leave this unit in this environ" or other strategic decisions which override the random portion of the AI.
What I still need to work on the AI:
1) functions from combat so I know how to interface with them for combat and the distribution of wounds among characters
2) more ideas about what the AI looks like to the human player and associated photos. ie. would Dr. J. mind a quick photo-shoot of his face from various angles for non-surjically connecting to the body of Napolean
3) discussion with various other teams as their classes grow
4) functions and requests from the province/galactic team so I know what additional AI decisions I need to write functions for.

Back to top


Star System Game Senarios


(we know this is just straight out of the manual it's just here for reference for creating methods and such)

(By Ameilia)

General Rules

  • Victory Points are earned only by Rebel Player
  • if particular conditions exists at the end of the game, Victory Points are awarded or subtracted

    (16.2) Flight To Egrix (6 gameTurns) Rebellion Scenario

    • Imperial wins instant victory if all Rebel characters are killed or captured and all planets are Imperial-controlled
    • At the end of the Sixth Game Turns and no player has achieved instant victory, Victory Points are calculated:
      • Victory Points >= 12; Rebel Player wins the game
      • Victory Points < 12; Imperial Player wins the game

    (16.3) The Varu Powderkeg (7 gameTurns) Armageddon Scenario

    • Rebel Player wins an instant victory if Cercis and one other planet are both Rebel-controlled, at any point
    • Imperial Player wins an instant victory if all three planets are Imperial-controlled and at least three Rebel characters are killed or captured, at any time
    • At the end of the Seventh Game Turn and neither player has achieved instant victory, Victory Points are calculated:
      • Victory Points >= 20; Rebel Player wins the game
      • Victory Points < 20; Imperial Player wins the game

    Victory Points Schedule

            Planet Rebel Controlled					9 VPs
            Planet in rebellion (but not Rebel-controlled)		6 VPs
            Planet in Unrest (but not in rebellion)			3 VPs
            Planet at Patriotic				       -2 VPs
            Imperial character killed       			1 VP
            Imperial character captured				2 VPs
            Rebel character killed				       -1 VP
            Rebel character captured			       -2 VPs
            Rebel Player completes Gather Information 
                mission (as described on the Mission Card)		1 VP
            Imperial Player completes Gather Information 
                mission (as described on the Mission Card)	       -1 VP
    

Back to top


VP Activity Diagrams: (They're labeled as state charts, this was an error)


(By Ameilia)






Back to top


Collaboration Diagrams:


(By Ameilia)



Back to top



Class Diagrams:


(By Lauren, just focused on Star System game for now)

Game Class Diagram




Player Class Diagram




Back to top


GUI Dialogs:



(Carrie did this part)

This is the opening dialog for the game. It would open with default settings for a new game, where the user can change the game type, senario, and difficulty level. The opening window would also give access to a player to open a saved game. The player can either go onto a game or quit from this window.



This would be part of the permanent GUI in the game. It just graphically shows the game player where the game play is currently at, in terms of Game Turn, Player Turn, Phase, and Segment.



This is also part of the GUI, it would probably be next to the box above that indicates the current game play. The human player would click this button when they wish so skip through a segment/phase.

Back to top




The Game menu in the GUI will give the player access to basic game options like starting a new game, saving a game, opening a saved game, or exiting a game. Saving a game isn't necessarily essential for the game to run, but I think we will still try to make that feature work for the prototype.

Here's a rough outline of how we think dialogs/changes in the GUI will appear through a game turn:

Game-Turn: There will be a red button in the GUI to skip phases and segments. Changes in the game-turn, player-turn, phased, and/or segment will be represented graphically in the GUI.
Rebel Player-Turn:
Operations Phase:
Movement Segment:


Enemy Reaction Segment:


Military Combat segment:
Search Phase:

Mission Phase:
Imperial Player-Turn: (primarily handle without dialogs except for rebel player are prompted for situations such as combat)
End Game-Turn: right before the game turn ends there is an interphase where the system will check if any of the planets have become rebel controlled, if some have we need to represent the resulting change in stuff like victory points with a dialog and/or something in the GUI, signifying the change.

Back to top