Use Cases

From FIFE development wiki
Jump to: navigation, search

This article is outdated and is just stored for archive purposes. Archived.png

This article became outdated and is just stored for archive purposes in this wiki. There are several reasons why an article could become outdated. The development team may have decided to use a different concept or even the author itself felt that the article is not really up-to-date with the current development status of the project anymore.

Introduction

The intent of this article is to explain what FIFE users should be able to accomplish with FIFE. Use cases don't concern the implementation responsibility (e.g. mod vs. engine) nor implementation language (c++ vs script). Their sole purpose is to help us to understand the requirements that are set to the engine. The layout of use case descriptions follow closely the one described in here

Contents

Diablo like game

Character creation

ID

UC_DIABLO_1

Summary

Player creates a character using the widgets provided by the game mod. Also keyboard can be used to enter player infos.

Preconditions

  • Game has been started

Triggers

  • User has selected "play new game" from main menu and start animation has finished

Basic course of events

  1. User sees one screen full of widgets that can be used to adjust character properties
  2. User types character name on player name widget
  3. User adjusts the following player characteristics through slider widgets: Strength, stamina, intelligence, magic
  4. User selects 3 traits out of 10 using radio button like controls that allow only 3 buttons to be selected at the time
  5. User presses "accept" button to start the game
  6. Game starts by showing another animation

Alternative paths

2a & 6: User forgets to enter character name. When pressing "accept", game validates the data and shows dialog "please enter a name for the character"

Postconditions

User has entered all the information that is needed to be able to use the character in the game.

Notes

Shopping for new equipment

ID

UC_DIABLO_2

Summary

User shops new equipment for the player character. Player character money is consumed and inventory is changed. User goes through several discussion dialogs.

Preconditions

The user has started the game and the player character has entered a shop building inside the game world

Triggers

Player has clicked on a shop keeper npc with right mouse button and selected "do shopping" from pop-up menu. Game has been switched into a mode where game situation is shown on top of the screen and dialogue options are shown in the bottom of the screen.

Basic course of events

  1. User selects dialogue option that says "Say to shopkeeper: I would like to buy some things from you". Selection is done by clicking on the text. When mouse is moved on top of the text, text is highlighted. Clicking on it will actually do the action (say things).
  2. Above dialogue options, there is a text screen that shows responses from NPC. Now it shows "Shopkeeper: Yeah? What would you like to have today?". At the same moment dual list box slides on top of the screen showing inventories from both the shopkeeper and the player.
  3. User moves his mouse on top of shopkeeper inventory. At the same time items get highlighted (hover) and their price is shown next to the mouse cursor. In case all things don't fit into inventory list, user can scroll items by using arrow keys associated with the list controls.
  4. User decides to purchase new boots for his player character. He clicks and drags boots from shopkeeper list into his own list. After that he still buys a new hat by repeating the dragging for the hat. After this user selects dialogue option "I'll take these" from dialogue menu.
  5. Shopkeeper responds "ok" and amount of hat + boots is removed from player character's money.
  6. User decides to finish shopping and selects dialogue option "That's it for now, thanks and bye". Game moves back into normal play mode (player is able to move again).

Alternative paths

Postconditions

  • Player has new items in his inventory. His money is reduced.

Notes

  • During shopping, player cannot move. Some games might prefer to show text using bubbles like in comics. Engine should provide support for both floating text + bubbles.

Fighting in the dungeons

ID

UC_DIABLO_3

Summary

Player character encounters hostile creatures and first gets beaten. After this he decides to launch the player character's "incredible destruction" spell wiping whole screen from enemies

Preconditions

Triggers

Basic course of events

  1. The player character spots hostile creatures in the map area and the user decides to attack them.
  2. When moving closer to creatures, creatures hear player character coming and therefore they move into defense positioning (melee creature in front and bow owning creatures in the back).
  3. Player character moves towards the pack. Melee creature attacks forward while bow creatures starts shooting further back.
  4. Player character swings his axe when melee creature is near. First swing is a miss since player character was too far away. This instead gives opportunity for melee creature to hit (due to better timing). Melee creature's club swing reaches player and player flies to his back in a forceful blow. At the same time bow creatures arrow is missed since player now lays on the ground.
  5. Player character takes count for 1 second.
  6. Player character is able to move again and he reaches the club swinger. With spell of "incredible destruction", player sends circular fireball that fills the whole screen. When fireball reaches opponents, they turn first into skeletons. After that they turn into dust that falls into the ground.
  7. Player character has killed the enemies on screen and continues to wander in the dungeons.

Alternative paths

Postconditions

Notes

Chess game

Chess gaming

ID

UC_CHESS_1

Summary

User plays multiple turns on a chess game board.

Preconditions

Chess game is started.

Triggers

User gets to start his turn.

Basic course of events

  1. User decides his movement based on current piece positioning
  2. User clicks on white pawn and tries to move it like a horse (by dragging the piece to the new location). Game notices illegal move and
    1. Moves piece back to previous position (with sliding animation).
    2. Shows modal dialog "illegal move".
  3. User clicks again on a white pawn and now makes legal move. Game accepts the movement and aligns the piece exactly to the chess game tile grid.
  4. Movement triggers turn for the game to run AI. After AI analysis, game makes a move of black horse (piece slides on board). Turn goes back to the user.

Alternative paths

Postconditions

Notes

Fallout like game

Some combat turns

ID

UC_FALLOUT_1

Summary

Player character goes through one turn in turn based combat situation.

Preconditions

  • Don't be in turn based mode.

Triggers

  • Player character has successfully hit another character (or even an object).
  • Player clicked the turn based button.
  • Player character is being attacked.
  • User has decided to let the player character attack enemies in his field of view.

Basic course of events

  1. User has decided to move his player character on play area. User presses "move to" button and moves his mouse on screen. While mouse is moving, game shows how many action points the movement would take (by rendering the path + action points on top of it onto the map). To be able to do this, each time mouse is moved path is calculated again.
  2. User decides the target for movement and presses mouse. Player character moves along the path that was shown just a moment ago on screen.
  3. Player character has consumed all his action points while moving. Turn is transferred to AI.
  4. AI decides to shoot player character with a shotgun. Because the amount of action points for AI character, shotgun is shot twice. First shot misses player character (status screen shows "enemy didn't manage to hit you with a shotgun". Second shot hits the player (status screen shows "enemy hit you with a shotgun. You lose 6 points from your health"). After each shot, player character points (e.g. health) are recalculated.
  5. AI has consumed all action points and turn is transferred to player character. User decides to use revolver to shoot enemy. User selects revolver from UI menus. When mouse is moved to map area, cursor is shown as a crosshair. When crosshair moves on top of enemy, cursor changes again so that crosshair + consumed action points are shown. User presses mouse when crosshair is on top of enemy. Shooting is shown (animations) and status screen shows "you hit the enemy with 10 point. Enemy is dead". Since enemy died, death animation is shown. After this game notices that there is no more threats for the player and moves away from the turn based mode into realtime mode.

Alternative paths

1 or 2: player press the "End of turn" button, go to #3

Postconditions

Notes

  • An attacking ennemy may interrupt a dialog with an NPC.
  • At any moment the player can press either the "End of turn" of "End of combat" buttons.
    • End of turn: the player is passing his turn by wasting his remaining actions.
    • End of combat: quit the turn based mode if there are no nearby enemies.

Aimed shot, crippled limbs

ID

UC_FALLOUT_2

Summary

Player character makes an aimed shot at an enemy.

Preconditions

  • Player character is in turn-based mode.

Triggers

Basic course of events

  1. User right-clicks on the weapon of his player character in the menu to set it to aimed mode.
  2. User right-clicks mouse on view screen to toggle between actions, chooses combat crosshair.
  3. User selects an enemy with combat crosshair.
  4. A new window appears. Window contains a centered image box of the enemy, with lines leading out from each bodypart, to the left and right edges of the window. Above these lines are text boxes containing the names of each area, for example 'head', 'torso', 'legs'. When hovered over with the mouse they change color to indicate that they can be clicked. Next to each text field is another text field containing probable hit chances for the body part in question.
  5. User selects 'the right leg'.
  6. Shot is fired. Player character scores a critical hit. Player character's action points are decreased.
  7. A specific hit animation is played for the limb in question, say limb getting blown off. Enemy is now also crippled in its right leg.
  8. X amount of hit points are deducated from enemy.

Alternative paths

1: Player character don't have enough action points, end of use case.

5a: Player misses shot, nothing occurs.

5b: Enemy is already crippled, # 7 is skipped.

Postconditions

  • Enemy is permanently crippled.

Notes

NPC interaction

ID

UC_FALLOUT3

Summary

User attempts to start a conversation with an NPC. NPC reacts to player character's response/circumstances/character qualities.

Preconditions

  • Player character encounters NPC.
  • Player character is not in turn based mode.

Triggers

User attempts to initiate conversation with NPC.

Basic course of events

  1. User clicks on NPC to initiate dialog.
  2. Dialog window appears, with an image box at the top, which contains the NPCs talking head. Text appears below the head and below this are multiple answer alternatives.
  3. User selects wrong answer and enrages NPC. Talking head expression becomes angry and NPC ends conversation.
  4. User attempts to initiate conversation again. NPC responds: "Not you again. Go away".
  5. Player character gives NPC booze. Attempts to start conversation again and succeeds.

Alternative paths

Postconditions

Notes

Moving, shooting and throwing grenades

ID

UC_FALLOUT_4

Summary

User moves behind a window that cannot be walked through. Shooting and throwing grenades is possible. Further away there is another obstacle that hides enemy. Obstable cannot be shot through, grenade is possible to be tossed above it.

Preconditions

Game has started, player is inside a room. Enemy is lurking outside the building behind steel fence over 2 meters tall. Player has a rifle and a grenade.

Triggers

User wants to harm the enemy behind the steel wall, but doesn't want to use the door to exit the building (there could be e.g. enemy group behind it)

Basic course of events

  1. User tries to move outside using the window. Game shows that it is not possible (e.g. by showing a cross cursor on tiles outside when they are clicked)
  2. User stops by the window and selects rifle. User tries to aim the enemy behind the wall. Crosshair cursor shows that player cannot hit the enemy.
  3. User selects grenade. While moving the crosshair again on the enemy, crosshair shows that attack is possible
  4. User clicks on top of enemy with the crosshair. Player throws grenade towards the enemy, enemy is hit by the grenade that explodes.

Alternative paths

Postconditions

Enemy is harmed.

Notes

-


Escaping in the swamps

ID

UC_FALLOUT_5

Summary

User escapes the enemy in swamp area. Some of the paths are more wet resulting slower movement for player.

Preconditions

Game has started, enemy is chasing the player.

Triggers

User decides to flee the enemy

Basic course of events

  1. User moves the mouse cursor to the other side of the swamp and clicks it marking that player should move across swamp (with automatic routing)
  2. Player moves 8 cells in swamp map choosing non-wet tiles if available
  3. Enemy chases with 6 cells each turn
  4. In the middle of swamp, user spot a shotgun in the middle of wet terrain. He clicks that spot indicating that player should move exactly there.
  5. Player heads to wet areas resulting slower movement. Enemy start to catch him
  6. Player reaches shotgun and picks it up. User aims and shoots the enemy with remaining action points.

Alternative paths

Postconditions

Player is standing in the middle of the swamp wet area with a shotgun, enemy is dead

Notes

-

Arcanum-like game

Crafting

ID

UC_ARCANUM_1

Summary

The player character combines two different items into a single new one.

Preconditions

  • The player character knows the build schemata (called "recipe" in this use case) of the item that he wants to craft.
  • The player character has both items he wants to combine in his inventory or in the inventory of a member of his party.
  • The player character has the needed skill level in (a) certain domain(s) (e.g. science and / or firearms) to actually combine the two items into a new one.

Triggers

  • The user presses a key that brings up the crafting interface.

Basic course of events

  1. The user decides to combine two items that he has in his inventory into a single new one. Therefore he brings up the crafting interface by pressing the "t"-key.
  2. The interface shows the different recipes the player character knows. There are two categories for build plans: build plans you learn by reading them (you could have aquired them via looting, buying them from a merchant or stealing them from an NPC) and build plans you always know.
  3. The user can switch between the two recipe categories by clicking on two different labels. If you hover the label it will get highlighted; if the user finally clicks on it it'll turn red and a sound will be played to indicate the category change. When categories are switched, the recipe widget will change to the first available recipes of this category and domain.
  4. Both categories contain recipes for different domains (e.g. chemistry, electric, explosives or firearms). While you automatically know about all available schemata of the first category, schemata of the second category will be just listed if you've aquired them somehow and have read them.
  5. Browsing through the different domains will update the recipe widget to always show the first available recipe of that domain.
  6. A single domain can offer a number of different recipes for crafting. Each recipe can require different items and different domain levels that the player character needs to have / fullfil.
  7. After the user decided for one recipe he presses the "combine"-button.
  8. The game does check if the player character has the needed items in his inventory or the inventory of his party. An additional check if the player has reached a sufficent skill level in the required domains will be made.
  9. If all requirements are met the two items will be removed from the inventory of the player character and the new combined item will be added to it. A text widget in the crafting interface will report that crafting has succeeded.

Alternative paths

  • If not all requirements are met for the recipe, the required items won't be removed from the inventory and no new item will be added either. The text widget in the crafting interface will indicate that crafting has failed, list the reason why it failed and play a fail sound.

Postconditions

  • The two items that were required for the recipe will be removed from the inventory of the player character / his party.
  • The crafted item will be added to the inventory of the player character.

Screenshot

UC ARCANUM 1.jpg

Possible variations

  • The skill requirements for the domains could be removed and replaced by a system where you have the chance to succeed, critically succeed, fail or critically fail, influenced by your skill level in different domains.
    • If you succeed the two items will be removed from the inventory and a new one will be added.
    • If you critically succeed the two items will be removed from the inventory but two new items of the same kind will be added to your inventory.
    • If you fail, the two items won't be removed but no new item will be added to your inventory either.
    • If you critically fail the two items will be removed from your inventory but no new item will be added to it.

Notes

Keys of Naand Use Cases

Ingame story telling mode

ID

UC_KoN_1

Summary

We have decided to use ingame story telling mode for our "cutscenes".

Preconditions

  • The game is running.
  • An ingame story telling mode is not already being run.

Triggers

  • A story event requiring ingame story telling is started.

Basic course of events

  1. Controls become unresponsible. (Game menu should still be accessible (pauses the game))
  2. GUI and mouse cursor smoothly dissapear by fading to transparent.
  3. PCs, NPCs and monsters perform scripted movement, actions, fighting and spell casting. Conversations are shown with texts above the apropriate characters. (It should be possible to place a semi-transparent background box for the text so that the text can be more easily read against a non-uniform background. The texts with the background boxes will be faded via transparency.)
  4. When the cutscene is over the game GUI and the mouse cursor fades back and the controls become responsible again.

Alternative paths

  • If there's a dialog the cutscene is paused and a special GUI appears from the bottom of the screen. Mouse cursor fades to visible and is positioned on the center of the dialog GUI for easy spotting. The screen shows the dialog options to choose from while the text to be answered to is shown above the apropriate character. When the player chooses an option to say, the text is shown above his character and the cutscene continues. He can select options to say with mouse and maybe also with number keys. When the dialog ends the GUI is disappeared to the bottom of the screen.

Postconditions

  • Game continues running normaly.

Screenshot

Example screenshot if the use case is based on existing games or applications.

Notes

  • All the fading times need to be adjustable by the developers.

FIFEdit Use Cases

Modifying Tiles

ID

UC_FIFEDIT_1

Summary

The user modifies a tile on the map.

Preconditions

  • A map has been loaded (or a blank map has been created)
  • A selection has been made on the map and the selection is in-bounds

Triggers

The user pressed the 'T' key to edit the tile at the current selection.

Basic course of events

  1. The "Select Tileset" dialog opens, presenting the user with a list of available tile datasets.
  2. The user selects a tile dataset and clicks OK. The "Select Tile" dialog opens, presenting the user with pictures of the tiles in the selected dataset.
  3. The user selects a tile, and presses OK; the tile on the map is modified accordingly.

Alternative paths

  1. The user desires a tile that is not available in any of the map's tileset. At the "Select Tileset" dialog, the user clicks the "Add Tileset" button, and is presented an "Add Tileset" dialog. In this dialog, the user navigates the directory tree, finds the desired dataset, and clicks "Add". The course of events then proceeds.

Postconditions

The internal representation of the map now contains the changed tile. A save command must be issued before this data is saved to xml.

Screenshot

None.

Notes

None.

Modifying Objects

ID

UC_FIFEDIT_2

Summary

The user creates/modifies an object on the map.

Preconditions

  • A map has been loaded (or a blank map has been created)
  • A selection has been made on the map and the selection is in-bounds

Triggers

The user pressed the 'O' key to edit objects at the current selection.

Basic course of events

  1. The "Select Object" dialog opens, presenting the user with a list of current objects in the selection.
  2. The user selects an object and clicks OK. The "Edit Object" dialog opens, presenting the user with the object's current attributes.
  3. The user edits these attribute fields, and presses OK; the object is modified accordingly. Editing attributes may involve further gui elements.

Alternative paths

  1. The user wants to create a new object. At the "Select Object" dialog, the user clicks the "New Object" button, and a new object is added to the list of objects with default values. The user selects this object and proceeds.
  1. The user wants to delete an object. At the "Select Object" dialog, the user selects an object and clicks "Delete".

Postconditions

The internal representation of the map now contain an updated list of objects. A save command must be issued before this data is saved to xml.

Screenshot

None.

Notes

None.

Generating a New Map

ID

UC_FIFEDIT_3

Summary

The user creates a new map.

Preconditions

  • The editor is running

Triggers

The user pressed 'ctrl-N'.

Basic course of events

  1. The user is given a text-field dialog box. The user enters name/comments/author. The dialog has an option for creating further text fields, which will be stored as metadata.
  2. The user is prompted to build a map geometry using the "Create Geometry" dialog (see the Creating a Geometry use case), and is then prompted for a map size. A generic layer is then generated on elevation 0 using this geometry and size.

Alternative paths

  1. Another map was already loaded. The user is prompted to save that map, and then the basic course of events begins.

Postconditions

A map has been loaded. Operations such as Modifying Tiles and Modifying Objects may now be performed.

Screenshot

None.

Notes

None.

Creating a Geometry

ID

UC_FIFEDIT_4

Summary

The user creates a geometry.

Preconditions

  • A map is loaded (or in the process of being created).

Triggers

The user has pressed the 'G' key, or the "Create Geometry" dialog has been otherwise initialized

Basic course of events

  1. TODO

Alternative paths

Postconditions

A new geometry has been created, and may be used in new layers.

Screenshot

None.

Notes

I'm not sure quite how we want to present geometry creation to map-makers. Discussion on this topic would be welcome.

Creating a Layer

ID

UC_FIFEDIT_5

Summary

The user creates a new layer on the map.

Preconditions

  • A map is loaded.

Triggers

The user has pressed the 'L' key

Basic course of events

  1. The user is presented with a "Create Layer" dialog. The user may enter width and height data into text boxes. The user may select a geometry from a drop-down box, or click the "Create New Geometry" button to enter the Geometry Creation dialog (see UC_FIFEDIT_4). The user may also create metadata fields, which are appended to the form as textboxes.

Alternative paths

None.

Postconditions

A new layer has been created, and may be edited.

Screenshot

None.

Notes

None.

Template

The following can be used as a template when creating new use cases.

<Use case name>

ID

UC_EXAMPLE_1

Summary

This is an example use case template.

Preconditions

These conditions need to be met.

Triggers

The final trigger that leads to the use case.

Basic course of events

  1. Step 1
  2. Step 2
  3. Step 3
  4. etc.

Alternative paths

What kind of branching could apply to the use case so it leads to a different temporary or even final outcome compared to what's described in the course of events section.

Postconditions

Conditions after the use case situation is finished.

Screenshot

Example screenshot if the use case is based on existing games or applications.

Notes

Addtional notes and remarks.