Download as pdf or txt
Download as pdf or txt
You are on page 1of 129

Institute of Information Technology

University of Dhaka

SPL - II SRS
Course Code: SE406

Project Name: The Restoration Project

Submitted by:
Fahim Morshed (1102)
Kazi Muktadir Ahmed (1111)

Supervised By:
Dr Ahmedul Kabir
Designation: Assistant Professor
Institute of Information Technology
University of Dhaka
Prefix
Project Name: The Restoration Project

Group: 11

Members: Fahim Morshed (BSSE 1102)


Kazi Muktadir Ahmed (BSSE 1111)

Supervisor: Dr Ahmedul Kabir


Assistant Professor
IIT, DU

(Signature of The Supervisor)

1
Table of content
1. Introduction 9
1.1 Purpose 9
1.2 Document Conventions 9
1.3 Intended Audience and Reading Suggestions 9
1.4 Product Scope 9
2. Description of the Project 10
2.1 Identifying Stakeholders 10
2.2 Identifying and resolving multiple viewpoints 10
2.2.1 Gamers Viewpoints 10
2.2.2 Developers Viewpoints 10
2.2.3 Guardians Viewpoints 10
2.2.4 Contradictory Viewpoints 11
2.2.5 Resolution 11
2.3 Product Function Summary 11
2.4 Operating Environment 11
2.5 User Documentation 11
2.6 Assumptions and dependencies 12
3. External Interface Requirements 12
3.1 User Interfaces 12
3.2 Software Interfaces 12
3.3 Communication Interfaces 12
4. Quality Function Deployment 13
4.1 Normal Requirements 13
4.1.1 Movement 13
4.1.2 Combat 13
4.1.3 Weapon 13
4.1.4 Health 13
4.1.5 User Profile 13
4.1.6 Co-op mode 13

2
4.1.7 Third-person view 13
4.1.8 Open world settings 14
4.1.9 Engaging storyline 14
4.2 Expected Requirements 14
4.2.1 Performance Requirements 14
4.2.2 Security Requirements 14
4.2.3 Software Quality Attributes 14
4.2.4 Menu/Lobby 15
4.2.5 Inventory System 15
4.2.6 Party Management 15
4.2.7 Level Up Mechanism 15
4.2.8 Game Settings 15
4.3 Exciting Requirements 15
4.3.1 Unique Health Mechanics 15
4.3.2 Unique Economic System 15
4.3.3 Futuristic Megacity setting 16
4.3.4 Integrated Stealth gameplay 16
4.3.5 AI Companion, NPC and Enemy 16
4.3.6 Interactive Environment 16
5. Usage Scenario 16
5.1 Open-World 16
5.1.1 Interactive Environment 17
5.2 Movement 17
5.2.1 Driving 17
5.2.2 Basic Movement 17
5.3 Combat 17
5.3.1 Shooting Combat 17
5.3.2 Bladed Combat 18
5.3.3 Barehanded Combat 18
5.3.4 Weapon Mechanics 18
5.3.4.1 Weapon Swapping 18
5.3.4.2 Weapon Dropping 18
5.3.4.3 Weapon Upgrading 18

3
5.3.4.4 Ammo Reload 18
5.3.4.5 Scope 18
5.4 In-game AI 19
5.4.1 Enemy AI 19
5.4.2 NPC 19
5.4.3 AI Companion 19
5.6 Level Up Mechanics 19
5.7 Health Mechanics 19
5.7.1 Continuous Decrease 19
5.7.2 Health transferability & economy 20
5.7.3 Healing 20
5.8 Picking Up and Inventory Management 20
5.9 Saving Game State 20
6. Use Case Diagram 20
ID 1: Level 0 20
ID 2: Level 1 21
ID 3: Level 1.2 23
ID 4: Level 1.3 24
ID 5: Level 1.6 25
ID 6: Level 1.6.1 27
ID 7: Level 1.6.1.2 28
ID 8: Level 1.6.1.2.1 29
ID 9: Level 1.6.2 31
ID 10: Level 1.6.2.4 33
ID 11: Level 1.6.3 35
ID 13: Level 1.7 37
ID 14: Level 1.8 38
ID 15: Level 1.8.4 39
7. Activity Diagram 40
ID 1: Level 1 40
ID 2: Level 1.2 42
ID 3: Level 1.3 42
ID 4: Level 1.6 43

4
ID 5: Level 1.6.1 43
ID 6: Level 1.6.1.2 43
ID 7: Level 1.6.1.2.1 44
ID 8: Level 1.6.2 44
ID 9: Level 1.6.2.4 45
ID 10: Level 1.6.3 46
ID 12: Level 1.7 46
ID 13: Level 1.8 47
ID 14: Level 1.8.4 47
8. Swimlane Diagram 47
ID 1: Level 1 47
ID 2: Level 1.2 49
ID 3: Level 1.3 49
ID 4: Level 1.6 50
ID 5: Level 1.6.1 50
ID 6: Level 1.6.1.2 51
ID 7: Level 1.6.1.2.1 51
ID 8: Level 1.6.2 52
ID 9: Level 1.6.2.4 53
ID 10: Level 1.6.3 54
ID 12: Level 1.7 54
ID 13: Level 1.8 54
ID 14: Level 1.8.4 55
9. Data-Based Modeling 56
9.1 Data Object Identification 56
9.2 Final Data Object 58
9.3 Data Object Relationship 58
9.4 ER Diagram 58
9.5 Schema Diagram 58
10. Data-Flow Diagram 60
Level 0 60
Level 1: The Restoration Project 60

5
Level 1.3: Game 61
Level 1.3.4: Render Game World 61
Level 1.3.4.1: Set Environment 62
Level 1.3.4.1.1: Game Object Interaction 62
Level 1.3.4.1.1.2: In-Game Item Interaction 63
Level 1.3.4.1.1.3: Vehicle Interaction 64
Level 1.3.4.1.2: Combat 64
Level 1.3.4.1.3: Quest 65
Level 1.3.4.3: Character Mechanics 66
Level 1.3.5: Initiation 67
11. Class-Based Modeling 68
11.1 List of Nouns 68
11.2 List of Verbs 70
11.3 General Classification 72
11.4 Selection Criteria 76
11.5 Analysis 77
11.6 Attribute and Method Identification 80
11.7 Class responsibility and collaboration 85
11.8 Class cards 88
11.9 CRC Diagram 101
ID 1: The restoration Project 101
ID 2: Open World 101
ID 3: Character 101
ID 4: Player 103
ID 5: Environment 104
ID 6: Game Object 104
ID 7: Vehicle 105
ID 8: Bot 105
ID 9: In-Game Items 106
ID 10: Weapon 106
ID 11: Shooting-Based Weapon 107
ID 12: Ammunition 107
ID 13: Bladed Weapon 108

6
ID 14: Instant Heal Pack 108
ID 15: Inventory 108
ID 16: Party 109
ID 17: Quest 109
ID 18: Single-Player Mode 110
12. Behavioural Modeling 111
12.1 Event Table 111
12.2 State Transition Diagram 117
ID 1: Player 117
ID 2: The Restoration Project 118
ID 3: Single Player Mode 119
ID 4: Open World 119
ID 5: Environment 120
ID 6: Character 120
ID 7: Vehicle 122
ID 8: Weapon 122
ID 9: Game Object 122
ID 10: Shooting Based Weapon 122
ID 11: Bladed Weapon 122
ID 12: Quest 123
12.3 Sequence Diagram 124
Part 1: Sign in and Sign up 124
Part 2: Starting and Loading Game 125
Part 3: Move, Defend, Take Cover, Item Interaction 126
Part 4: Attacking 127
Part 5: Weapon, Quest, Trade and Game State 128
Complete Sequence Diagram 129

7
1. Introduction
1.1 Purpose
“The Restoration Project” is an open-world third-person PC Role Playing Game
(RPG) that will have both Single-player and Co-operative (co-op) mode. The
gaming industry has been changing for a long time throughout the whole world.
The story-based single-player games lacked the enjoyment of hanging out together
with friends, while multiplayer games lacked the story and any sense of connection
with the game world. With both of these concepts, came the online co-op mode of
gaming where two or more players can play along in the same story as different
characters. We want to use this idea to make our game more enjoyable. The
gaming industry in Bangladesh hasn’t yet fully flourished while the global market
is thriving, which shows us a very promising future where we can be a part of it.
This project is our attempt at that. Although we intend to learn from this project
primarily, eventually we will release this as a product in the global market.

1.2 Document Conventions


The Document is typed font Times New Roman, size 14. The structure of the
document has been maintained close to that provided by IEEE for the SRS
template.

1.3 Intended Audience and Reading Suggestions


This document is intended for software developers, project managers, marketing
staff, users, testers, and documentation writers. The rest of the document contains
SRSA (software requirement specification and analysis) starting from product
features, all the way to diagrams and plan of implementation. This document is
best read serially from top to bottom.

1.4 Product Scope


Developing a PC shooting game that can be played in single-player mode with
shrunk down open-world features with detailed 3D animation. The game will
feature interactable AI bots as Non-Playable Characters (NPC) and Enemy AIs. It
will feature Basic movement and combat mechanics.

8
2. Description of the Project
2.1 Identifying Stakeholders
Stakeholders refers to any person or group who will be affected directly or
indirectly by the project. Stakeholders, in this case, are
1. Gamers
2. Developers
3. Guardian’s of underage gamers
All stakeholders are expected to have the very basic technical expertise necessary
to operate a computer (or similar device) with an internet connection. Users of any
level of education with or above basic literacy are welcome to use the product.

2.2 Identifying and resolving multiple viewpoints


2.2.1 Gamers Viewpoints
Gamers want some nuance in vision from the game. A meaningful exploration in a
huge open world is also a trending demand. The game should have some unique
premise over gameplay and the weapons should be balanced. They also don’t want
any pay barrier to win.

2.2.2 Developers' Viewpoints


For this project, the scope of the project is restricted due to time constraints. So the
developers can implement only a limited portion of what the gamers want in an
open-world RPG. Again, not every wish of a gamer is neither feasible nor viable to
implement in a game.

2.2.3 Guardians Viewpoints


The game should maintain community standards at all costs. And it should not
glorify the violence in the game.

9
2.2.4 Contradictory Viewpoints
The following demands from gamers contradict that of developers:
1. Detailed and vast open-world.
2. Intricate weapon and combat system.
3. Immersive and realistic AI interactions.
Developers' Response to these demands:
The open-world feature has to be limited due to the scope of the project. The
combat system will also be basic in its nature. AI interaction will also be
minimalistic.

2.2.5 Resolution
These features will be down-sized within the current scope of the project. They
might be developed later.

2.3 Product Function Summary


A very high-level function summary is provided below. The functions are
discussed in greater detail in section 5.
The product will provide:
● Third-person gaming experience
● Action-based game
● Sci-fi environment in a futuristic dystopian megacity
● Interaction with 3D animated environment & NPC
● Freedom of exploration in the open-world
● Engaging story and challenging enemy AI

2.4 Operating Environment


The product will operate as a native application on windows.

2.5 User Documentation


A softcopy of the user manual is intended to be delivered with the product.

10
2.6 Assumptions and dependencies
We assume that the product will be used in a gaming computer.

3. External Interface Requirements


3.1 User Interfaces
User interfaces consisting of graphical objects are required for the product.

3.2 Software Interfaces


Software Interfaces of Unity by Unity technologies are to be used.

3.3 Communication Interfaces


For server-client play, interfaces of Unity and Steam.

11
4. Quality Function Deployment

4.1 Normal Requirements


The following is the set of requirements that our stakeholders have explicitly
demanded from our product:

4.1.1 Movement
Players need to be able to move by running, walking, crouching, jumping
etc.

4.1.2 Combat
Players should be able to fight the enemies in different fashions and styles
like shooting, bladed and bare-handed fighting.

4.1.3 Weapon
Players can buy, pick, swap, drop and store different weapons.

4.1.4 Health
Player health will be updated when he/she gets hit or heals him/herself.

4.1.5 User Profile


Players can create a profile with their name, avatar and other information.

4.1.6 Co-op mode


Multiple players can play with each other in the same storyline. If the player
plays alone the other characters would be controlled by an AI.

4.1.7 Third-person view


The player will be able to view the open-world map from the perspective of
a third person.

12
4.1.8 Open world settings
The game world would be open-world in nature meaning the player would
be free to explore different parts of the world.

4.1.9 Engaging storyline


The gameplay will have an engaging storyline making the player get hooked
on the world and its lore.

4.2 Expected Requirements


The following are the requirements that were not demanded explicitly but are
nevertheless necessary for a complete system.

4.2.1 Performance Requirements


Must be able to run smoothly on host devices.

4.2.2 Security Requirements


The game should protect the personal information of every player and
control who can or can not access a particular game in co-op mode.

4.2.3 Software Quality Attributes


The following quality attributes are desired:
● Adaptability and flexibility
● Availability
● Correctness
● Interoperability
● Maintainability
● Portability
● Reliability and Usability
● Reusability
● Robustness
● Testability

13
4.2.4 Menu/Lobby
There needs to be a Menu for players to take different actions. A lobby
system also should be implemented to implement the co-op mode

4.2.5 Inventory System


No RPG is truly an RPG until it has a functional and effective inventory
system.

4.2.6 Party Management


The host players need to have control of the game party.

4.2.7 Level Up Mechanism


Every RPG relies heavily on the Level Up mechanism to make the gameplay
rewarding and meaningful.

4.2.8 Game Settings


The players need to have control over graphics, audio and other game
variables.

4.3 Exciting Requirements


The following are the requirements that were not demanded nor expected but we
are implementing them for our product to stand out.

4.3.1 Unique Health Mechanics


Unlike a normal RPG, where you don’t lose any health unless you get hit,
here in this game, the player's health is tied down to time making him lose
health constantly. So the player will have to be constantly on the move and
have to do some mission to have a steady supply of time/money/health.

14
4.3.2 Unique Economic System
The game will feature an economic system where the player’s health is tied
down to the time which is the game currency making your health the
effective currency. One can either opt to live a little longer or choose to buy
something from a store making the gameplay unique and challenging.

4.3.3 Futuristic Megacity setting


The game will take place in a futuristic megacity making the exploration of
the game more intriguing and dystopian in nature.

4.3.4 Integrated Stealth gameplay


The game will feature some stealth gameplay mechanics by giving some
advantage to the player from terrain features.

4.3.5 AI Companion, NPC and Enemy


The game will feature some AI bots which might play roles as companions,
NPC or enemies to the player.

4.3.6 Interactive Environment


There will be an interactive environment around the player allowing him/her
to interact with it freely.

15
5. Usage Scenario

5.1 Open-World
The Game will feature a vast and detailed open world ready to be explored and
interacted with by the players. The game will feature a lot of side storylines hidden
within the game world which can be participated in by the players.

5.1.1 Interactive Environment


As the game will be based on Open-world principles, a lot of the game objects
will be interactable to steer the player to the main storyline.

5.2 Movement
As an RPG, The player will be able to move freely in the world. He/she can mainly
move in the following ways:

5.2.1 Driving
The players can drive/operate different types of vehicles. Each with some
futuristic look on them.

5.2.2 Basic Movement


The player can also perform basic movement mechanics like running, jumping,
walking, crouching.

5.3 Combat
As an action RPG, the game will have a big focus on different kinds of combats to
progress the game. The following mechanics will be implemented for the Combat
mechanics of the game to work:

16
5.3.1 Shooting Combat
The players and the bots can shoot others using different types of shooting-based
weapons like Handguns, Rifles, Automatic Rifles, Machine Guns, Shotguns. All
of these weapons will be based on similar mechanics and have a nuanced
futuristic spin in them. These weapons would have a Range and damage to be
dealt with.
5.3.2 Bladed Combat
The players and the bots can also fight using blades of varying sizes in close
quarters. These weapons will have an Area of Effect and Damage dealt.

5.3.3 Barehanded Combat


The players and the bots can also engage in barehanded fights like punching and
kicking. These weapons will have an Area of Effect and Damage dealt.

5.3.4 Weapon Mechanics


The Game will also feature different kinds of mechanisms for operating the
weapons. They are described in the following:

5.3.4.1 Weapon Swapping


Players and bots can swap their active weapons if there is some alternate
weapon to choose from or needed due to low ammunition (ammo) or the other
option being favourable.

5.3.4.2 Weapon Dropping


The players and bots can drop any weapon if needed.

5.3.4.3 Weapon Upgrading


The players can upgrade their weapons to be more effective.

5.3.4.4 Ammo Reload


The players and bots can reload their weapons.

17
5.3.4.5 Scope
Some weapons like a Sniper would have scope to be more precise when using.

5.4 In-game AI
The game will feature 3 types of in-game AI’s. They are:

5.4.1 Enemy AI
These AI’s will work against the players and their companions and will be able
to shoot or fight them. It will be able to respond against the players and AI
companion’s actions by crouching / taking cover while fighting.

5.4.2 NPC
The game will also feature a lot of non-combatant NPCs. They will generally
mind their own business in the game and occasionally provide the player with
additional side-quests. They will be interactable and retaliate if the player attacks
them.

5.4.3 AI Companion
The game will feature some AI companions while playing in the single-player
mode. These AI’s will partake in the missions with the players and generally act
as allies for him/her.

5.6 Level Up Mechanics


As an RPG this game will also feature a levelling up mechanism. The player can
increase his/her skills and specs by gathering XP (experience) and later using those
XPs to level up.

5.7 Health Mechanics


A unique health mechanic is a basic premise and one of the cornerstones of our
game. The hp (health point) of the characters are bound with time making
time/health the basic currency of the world. The mechanics are described below:

18
5.7.1 Continuous Decrease
The Hp of the player and other characters will continuously decrease as time
passes as time is basically their hp.

5.7.2 Health transferability & economy


The players and NPCs can transfer their hp to others or take hp from others and
increase their hp. There is no hp cap. The players and the AIs can also buy
different in-game items with their hp reducing their hp and time to live and also
selling in-game items in exchange for hp. The whole game economy revolves
around the idea of exchanging time as a currency.

5.7.3 Healing
The player can heal him/herself after getting hit using insta-heal pacs bought
using their hp. They can also steal hp from other game characters after knocking
them unconscious or killing them.

5.8 Picking Up and Inventory Management


The player can pick up items left around or from killed enemies. These items can
be stored in an Inventory which the player can manage by keeping, dropping,
buying or selling different items. The player can also craft different items with two
or more items from his/her inventory.

5.9 Saving Game State


The player can save the game state for playing later. The game will be autosaved
after each mission completion. The player can pause the game and restart it at any
point.

19
6. Use Case Diagram
ID 1: Level 0
Primary Actor: Player
Secondary Actor: Steam

Description of the Level:


Level 1: The Restoration Project: The project is named The restoration project.
The player will act as primary actors by giving input into the project and the Steam
API is going to act as the secondary actor here.

20
ID 2: Level 1
Name: The Restoration Project
Primary Actor: Player
Secondary Actor: Database, Steam.

21
Description of the Level:

Level 1.1: Open world: The game will feature an Open-world setting. Meaning
that the player can move around and explore the world freely.

Level 1.2: Visual: This module would handle all the rendering of the game objects
into a visual form. The Open-world module would act as a primary actor for this
module as the background of the game scene will be rendered by it.

Level 1.3: Bots: This Module would handle all the AI’s in the game. The NPCs,
the enemy AI’s as well as the companion AIs will be handled by this module.

Level 1.4: Single-Player: This Module will handle the main story campaign part
of the game.

Level 1.5: Game mechanics: This Module will handle player control, movement,
health mechanics, level up and progression mechanics, inventory system and
in-game economics, in-game combat.

Level 1.6: Party control: This Module will handle the party mechanics in the
game.

Level 1.7: Game state: This Module will handle the game state and checkpoints to
save player progression throughout the game.

Level 1.8: Settings: This Module will handle the in-game display, HUD, controls,
graphics and other accessibility controls. This module will enable a user to tweak
these settings to his likings.

22
ID 3: Level 1.2
Name: Visual
Primary Actor: Player, Open World, Bots

Description of the Level:

Level 1.2.1: Static Visual: This module would handle all the visuals of the game
environment that do not change with time. These are shown to the player based on
their location and movement.

Level 1.2.2: Dynamic Visual: This module would handle all the visuals of the
game environment that change with time. This contains 3D animation for player
movement, NPC movement and interaction, also world events

23
ID 4: Level 1.3
Name: Bots
Primary Actor: Player

Description of the Level:


Level 1.3.1: Enemy: The game system will use AI to generate responsive and
adaptive or intelligent behaviour primarily in non-player characters (NPC). This
module will handle the logic for all enemy NPC which will be hostile towards our
player character and will actively try to attack the player on sight.

Level 1.3.2: NPC: The game will feature NPCs who will not be hostile to the
player immediately. These characters will provide story content/additional lore
behind the world.

Level 1.3.3: Companion: The game will also have some NPCs which will help the
player character in actual combat situations. Players will be able to issue some
special commands to the companion NPCs and can use them in combat situations.

24
ID 5: Level 1.6
Name: Game Mechanics
Primary Actor: Player, Bots

25
Description of the Level:

Level 1.6.1: Movement: The module will deal with standard player movement,
running, jumping, walking, stealth elements like crouching, taking cover behind an
object, giving directions etc.

Level 1.6.2: Combat: This module would deal with all combat-related objects and
functions like weapons, shooting mechanics, melee combat (barehanded combat),
stealth takedown.

Level 1.6.3: Health: This Module will manage the health management system.
Player health will be used as the in-game economy inside the game world. The
module will be discussed further in the latter part.

Level 1.6.4: Levelling up and game progression: This Module will manage the
part for player progression and levelling up mechanics inside the game.

Level 1.6.5: Inventory management: This Module will deal with the in-game
objects that the player would likely have in his possession (for example weapons,
cloths, binoculars, health vile, in-game currency, notes from other NPCs).

26
ID 6: Level 1.6.1
Name: Movement
Primary Actor: Player, Bots

Description of the Level:

Level 1.6.1,1: Basic movement: The module will deal with standard player
movement, running, jumping, walking, crouching, taking cover behind an object.

Level 1.6.1.2: Driving: This module would deal with all vehicle-related controls
for the player character. Enemy bots will also be able to use these controls to drive
vehicles.

27
ID 7: Level 1.6.1.2
Name: Driving
Primary Actor: Player, Bots

Description of the Level:

Level 1.6.1,2.1: Vehicles: The module will manage all types of vehicle objects in
the game world.

Level 1.6.1.2.2: Operating: This module would deal with the controlling of the
vehicles by player character and NPC.

28
ID 8: Level 1.6.1.2.1
Name: Vehicles
Primary Actor: Player, Bots

29
Description of the Level:

Level 1.6.1.2.1.1: Waterway vehicles: The module will deal with all vehicle
mechanics which will roam on the waterway.

Level 1.6.1.2.1.2: Motorway vehicles: This module would deal with all vehicle
mechanics that will roam on roads and highways.

Level 1.6.1.2.1.3: Railway vehicles: This module would deal with vehicles that
will run on a railway system.

Level 1.6.1.2.1.4: Airway vehicles: This module would deal with vehicles that
will roam through the sky.

30
ID 9: Level 1.6.2
Name: Combat
Primary Actor: Player, Bots

31
Description of the Level:

Level 1.6.2.1: Shooting: The module will deal with input controls for shooting and
aiming mechanics and corresponding output for the input.

Level 1.6.2.2: Bladed: This module would deal with input controls for bladed
combat and corresponding output for the input.

Level 1.6.2.3: Barehand: This module would deal with input controls for bladed
combat and corresponding output for the input.

Level 1.6.2.4: Weapon system: This Module will be discussed in the next section.

32
ID 10: Level 1.6.2.4
Name: Weapon mechanics
Primary Actor: Player, Bots

33
Description of the Level:

Level 1.6.2.1: Weapon swapping: The module will deal with input and logic for
swapping the current weapon at hand with the next weapon in the inventory slot.

Level 1.6.2.2: Bladed: This module would deal with input controls for bladed
combat and corresponding output for the input.

Level 1.6.2.3: Barehand: This module would deal with input controls for bladed
combat and corresponding output for the input.

Level 1.6.2.4: Weapon system: This Module will be discussed in the next section.

34
ID 11: Level 1.6.3
Name: Health
Primary Actor: Player, Bots

35
Description of the Level:

Level 1.6.3.1: Continuous decreasing health: The module will manage the health
mechanism in the game. Player characters HP(health point) will continuously
decrease with time. The player can use health vials to increase the remaining HP.

Level 1.6.2.2: Economy: This module would manage the economic system using
the player HP. The player can buy or sell in-game objects (weapons, clothes,
vehicles) with his HP. Health vials can also be purchased for a small added fee.

Level 1.6.2.3: Healing: This module would manage the healing system in the
game. Players can buy/collect health vials from the open world. Health vials are
used to some amount of HP.

36
ID 13: Level 1.7
Name: Game state
Primary Actor: Player

Description of the Level:

Level 1.8.1: Character creation: The module will deal with creating the player
character at the start of the campaign journey.

Level 1.8.2: Saving game: The module will deal with saving player progression
and world state so that the player can start from right where he left off whenever he
wants.

37
ID 14: Level 1.8
Name: Settings
Primary Actor: Player
Secondary Actor: Steam

Description of the Level:

Level 1.9.1: Graphics settings: The module will manage the graphical settings
that the player can tweak inside the game while playing. This will give the player
an interface to play around with the graphics setting.

Level 1.9.2: Audio settings: The module will deal with all types of audio
operations inside the game (master volume, music volume, SFX volume). Players
can change these settings inside the game whenever they like.

Level 1.9.3: User profile: This module will be discussed further in the next part.

38
ID 15: Level 1.8.4
Name: User profile
Primary Actor: Player
Secondary Actor: Steam

Description of the Level:

Level 1.9.1: Profile creation: The module will deal with creating the character
profile at the start of the game.

Level 1.9.2: Profile modification: The module will deal with all modifications to
the player profile that is made within the game by the player.

Level 1.9.3: Profile deletion: This module will deal with deleting a player profile
by the player.

39
7. Activity Diagram
ID 1: Level 1
Reference: Use Case Diagram Level 1

40
ID 2: Level 1.2
Reference: Use Case Diagram Level 1.2

ID 3: Level 1.3
Reference: Use Case Diagram 1.3

41
ID 4: Level 1.6
Reference: Use Case Diagram Level 1.6

ID 5: Level 1.6.1
Reference: Use Case Diagram Level 1.6.1

42
ID 6: Level 1.6.1.2
Reference: Use Case Diagram Level 1.6.1.2

ID 7: Level 1.6.1.2.1
Reference: Use Case Diagram Level 1.6.1.2.1

43
ID 8: Level 1.6.2
Reference: Use Case Diagram Level 1.6.2

44
ID 9: Level 1.6.2.4
Reference: Use Case Diagram Level 1.6.2.4

ID 10: Level 1.6.3


Reference: Use Case Diagram Level 1.6.3

45
ID 12: Level 1.7
Reference: Use Case Diagram Level 1.8

ID 13: Level 1.8


Reference: Use Case Diagram Level 1.8

ID 14: Level 1.8.4


Reference: Use Case Diagram Level 1.8.4

46
8. Swimlane Diagram
ID 1: Level 1

47
ID 2: Level 1.2

ID 3: Level 1.3

48
ID 4: Level 1.6

ID 5: Level 1.6.1

49
ID 6: Level 1.6.1.2

ID 7: Level 1.6.1.2.1

50
ID 8: Level 1.6.2

51
ID 9: Level 1.6.2.4

52
ID 10: Level 1.6.3

ID 12: Level 1.7

53
ID 13: Level 1.8

ID 14: Level 1.8.4

54
9. Data-Based Modeling
9.1 Data Object Identification

Sl. No. Noun Attribute Problem/Solution Space


1 The Restoration Project p
2 open-world p
35, 36, 38, 40, 46, 55, 56, 57,
3 player 46 s
4 side storylines p
5 game world p
6 Environment p
7 game objects p
8 main storyline. p
9 Movement p
10 Vehicles p
11 the bots p
12 weapons p
13 shooting-based weapons p
14 Handguns p
15 Rifles p
16 Automatic Rifles p
17 Machine Guns p
18 Shotguns p
19 Bladed Combat p
20 Blades p
21 Barehanded Combat p

55
22 Weapon Mechanics p
23 active weapons p
24 alternate weapon p
25 Ammunition p
26 Scope p
27 Sniper p
28 Enemy AI p
29 Companions AI p
30 NPC p
31 Single-player mode p
32 Co-op Mode p
33 Level Up Mechanics p
34 Skills p
35 Specs s
36 XP s
37 Health Mechanics p
38 Hp s
39 the characters p
40 Time s
41 Currency p
42 Economy p
43 hp cap p
44 in-game items p
45 instant-heal packs p
46 Inventory p
47 Game State p
48 Autosave p

56
49 Range p
50 Area of Effect p
51 Damage p
52 Log in info 53, 54, 55 s
53 email address s
54 Password s
55 User name s
56 records s
57 achievements s

9.2 Final Data Object


1. Player
2. Log in Info

9.3 Data Object Relationship

9.4 ER Diagram

57
9.5 Schema Diagram

Data Object Attribute Type Size


Player -username Varchar 40
-specs Varchar 40
-xp Number 10
-hp Number 10
-time Varchar 40
-record Varchar 200
-achievement Varchar 400
LogInInfo -email Varchar 60
-passwordhash Varchar 16
-username Varchar 40

58
10. Data-Flow Diagram

Level 0

Level 1: The Restoration Project

59
Level 1.3: Game

Level 1.3.4: Render Game World

60
Level 1.3.4.1: Set Environment

Level 1.3.4.1.1: Game Object Interaction

61
Level 1.3.4.1.1.2: In-Game Item Interaction

62
Level 1.3.4.1.1.3: Vehicle Interaction

63
Level 1.3.4.1.2: Combat

Level 1.3.4.1.3: Quest

64
Level 1.3.4.3: Character Mechanics

65
Level 1.3.5: Initiation

66
11. Class-Based Modeling
11.1 List of Nouns

Serial No. Noun


1 The Restoration Project
2 open-world
3 players
4 side storylines
5 game world
6 Environment
7 game objects
8 main storylines
9 Movement
10 Vehicles
11 the bots
12 weapons
13 shooting-based weapons
14 Handguns
15 Rifles
16 Automatic Rifles
17 Machine Guns
18 Shotguns
19 Bladed Combat
20 Blades
21 Barehanded Combat
22 Weapon Mechanics

67
23 active weapons
24 alternate weapons
25 Ammunition
26 Scope
27 Sniper
28 Enemy AI
29 Companions AI
30 NPC
31 Single-player mode
32 Co-op Mode
33 Level Up Mechanics
34 Skills
35 Specs
36 XP
37 Health Mechanics
38 Hp
39 the characters
40 Time
41 Currency
42 Economy
43 hp cap
44 in-game items
45 instant-heal packs
46 Inventory
47 Game State
48 Autosave
49 Range

68
50 Area of Effect
51 Damage
52 Log in info
53 email address
54 Password
55 User name
56 records
57 achievements

11.2 List of Verbs

SL No Verb
1 Explore
2 Interact
3 Hide
4 Participate
5 Steer
6 Move
7 Drive
8 Operate
9 perform
10 Run
11 Jump
12 Walk
13 Shoot
14 Crouch
15 Progress

69
16 Fight
17 engage
18 use
19 Bladed combat
20 Punch
21 Kick
22 Barehanded combat
23 swap
24 drop
25 upgrade
26 reload
27 aiming/scoping
28 attack
29 create
30 play
31 Increase
32 Hp transferring
33 buy
34 sell
35 reduce
36 Heal
37 hit
38 steal
39 Knock out
40 kill
41 store
42 Save

70
43 auto-save
44 craft
45 complete
46 pause
47 restart
48 state
49 manage

11.3 General Classification


Candidate classes were then characterized in seven general classes. The seven
general characteristics are
as follows:
1. External entities
2. Things
3. Events
4. Roles
5. Organizational units
6. Places
7. Structures
Potential nouns to become a class after general classification criteria:

SL No Noun General Classification


1 The Restoration Project 2, 3, 5, 7
2 open world 2, 6, 7
3 player 2, 4, 7
4 side storylines 2, 3, 7
5 game world 2
6 Environment 2, 3, 5
7 game objects 2, 5, 7
8 main storylines 3, 6, 7

71
9 Movement 3
10 Vehicles 2, 3, 7
11 Bots 3, 4, 7
12 weapons 2, 3, 7
13 shooting-based weapons 2, 3, 7
14 Handguns 2
15 Rifles 2
16 Automatic Rifles 2
17 Machine Guns 2
18 Shotguns 2
19 Bladed Combat 3
20 Blades 2, 3, 7
21 Barehanded Combat 2, 3, 7
22 Weapon Mechanics 3
23 active weapons 3
24 alternate weapon 3
25 Ammunition 2, 3, 7
26 Scope 2
27 Sniper 2, 3, 7
28 Enemy AI 3, 4, 7
29 Companions AI 3, 4, 7
30 NPC 3, 4, 7
31 Single-player mode 3, 5, 6
32 Companion 3, 4, 7
33 Party 2, 5, 7
34 Level Up Mechanics 3
35 Skills 3

72
36 Specs 2
37 XP 2
38 Health Mechanics 3
39 Hp 2
40 Characters 2, 4, 5
41 Time 2, 3, 7
42 Currency 2
43 Economy 3
44 hp cap 3
45 in-game items 2, 5, 7
46 instant-heal packs 2, 5, 7
47 Inventory 2, 5, 7
48 Game State 2, 3, 7
49 Autosave 3
50 Range 3
51 Area of Effect 3
52 Damage 3

Selected Candidate Class:


1. The restoration Project
2. Open World
3. Player
4. Side Storyline
5. Environment
6. Game Object
7. Main Storyline
8. Vehicles
9. Bots
10.Weapons
11.Shooting-based Weapons

73
12.Blades
13.Barehanded Combat
14.Ammunation
15.Sniper
16.Enemy AI
17.Companion AI
18.NPC
19.Single-player mode
20.Companion
21.Party
22.Characters
23.Time
24. In-game Items
25. Instant heal packs
26. Inventory
27. Gamestate

74
11.4 Selection Criteria
The candidate classes are then selected as classes by six Selection Criteria.
A candidate class generally becomes a class when it fulfils around three
characteristics.
1. Retain information
2. Needed services
3. Multiple attributes
4. Common attributes
5. Common operations
6. Essential requirements
Potential general classified nouns to become a class after selection criteria
SL No Candidate Class Selection Criteria
1 The restoration Project 1, 2, 3, 6 (Selected)
2 Open World 1, 2, 3, 6 (Selected)
3 Player 1-6 (Selected)
4 Side Storyline 1-5
5 Environment 2-6 (Selected)
6 Game Object 3-6 (Selected)
7 Quest 1-6 (Selected)
8 Vehicles 2-6 (Selected)
9 Bots 2-6 (Selected)
10 Weapons 2-6 (Selected)
11 Shooting-based Weapons 2-6 (Selected)
12 Blades 2-6 (Selected)
13 Barehanded Combat 2-6
14 Ammunition 2-6 (Selected)
15 Sniper 2-6
16 Enemy AI 2-6
17 Companion AI 2-6
18 NPC 1-6
19 Single-player modes 1-6 (Selected)

75
20 Companion 2-6
21 Party 2-6 (Selected)
22 Characters 2-6 (Selected)
23 Time 2-6
24 In-game Items 2, 4, 5, 6 (Selected)
25 Instant heal packs 2, 4, 5, 6 (Selected)
26 Inventory 1-6 (Selected)
27 Gamestate 1-6 (Selected)

11.5 Analysis
The Restoration project - this will become the driver class for the project which
will encompass every object in the project and run them accordingly. This class
will also manage player profiles and save in-game progression for future sessions.

Open world - this class will handle the open-world map portion for the project
where the player and environment-class will interact with each other.

Character - this class will have all the basic movement and combat mechanics.
This will act as a superclass for inheritance needs in other classes.

Player (Inherits character) - this will represent the main character of the story
which the player will take control of and play the whole single-player campaign.

Environment - various game objects that the player can interact with inside the
open world will be handled by this class.

Game objects - various elements of the environment that the player can interact
with. For example, the player can interact with a vehicle to drive inside the open
world.

Vehicles (Inherits game objects) - this vehicle can be driven by the player or an
NPC.

76
Bots (Inherits character) - this class will handle all NPC (non-playable
characters), enemies, AI companions in the game.

Weapons (Inherits in-game item) - this class will encompass every basic weapon
mechanism and act as a superclass for further inheritance.

Shooting based weapons (Inherits weapon) - this class will manage every
weapon that uses a shooting mechanic. For example, automatic rifles, sniper rifles,
pistols etc will be under this class.

Ammunition (Inherits weapon) - this will act as the projectile thrown from a
ranged weapon.

Bladed weapon (Inherits weapon) - this class will manage every melee weapon
that uses an area of effect to deal damage. For example, knives, katana etc.

Party - this will manage the companions NPCs that the player will be able to issue
commands to during a combat situation,

Single-player mode - this class will manage the mission queue and lay it out on
the open-world map. The mission queue will include 2 types of story content. Main
storyline quest and side quests. Both of them will be handled by the single-player
mode.

In-game item - this class will act as a superclass for any in-game object that the
player can store in his inventory. This includes weapons, instant heal packs, clothes
etc.

Instant heal-pack (Inherits in-game item) - this class will manage a special
in-game item that the player can use to increase their remaining HP (health point).

Inventory - this class will manage all the in-game items currently the player can
use. The player can take an item from his inventory and put it in his equipment slot

77
to use it. Players can add items to the inventory and also drop an item from their
inventory any time they want.

Game state - this class represents the current state of the player's profile. His HP,
skills, inventory, main story progression, side story progression etc. This object
will be used to save a player's in-game progress for multiple game sessions.

Quest - this class will manage a single-story quest of the storyline of the game

Selected classes are -


1. The Restoration project
2. Open world
3. Character
4. Player (Inherits character)
5. Environment
6. Game objects
7. Vehicles (Inherits game objects)
8. Bots (Inherits character)
9. Weapons (Inherits in-game item)
10.Shooting based weapons (Inherits weapon)
11.Ammunition (Inherits weapon)
12.Bladed weapon (Inherits weapon)
13.Party
14.Single-player mode
15.In-game item (Inherits game object)
16.Instant heal-pack (Inherits in-game item)
17.Inventory
18.Quest

78
11.6 Attribute and Method Identification

Class name Attribute Method


The Restoration Project -gameState +loadGame()
-playerProfile +saveGame()
+startGame()
+pauseGame()
+resumeGame()
+promptMenu()
+promptSettings()
+createPlayerProfile()
+updatePlayerProfile()
Open World -gameObjects[] +render()
-environment +getGameObjects()
-player +getEnvironment()
-bots[] +getBots()
-singlePlayerMode +getPlayer()
+getSinglePlayerMode()
+setGameObjects()
+setEnvironment()
+spawnBots()
+spawnPlayer()
+setSinglePlayerMode()
+setPhysics()
+getQuestLocation()
Character -inventory[] +getInventory()
-id +getId()
-name +getName()
-hp +getHP()
-specs[] +getSpecs()
-skills[] +getSkills()
-time +getTime()
-activeWeapon +getActiveWeapon()
-activeItem +getAlternateWeapons()

79
-alternateWeapons[] +getActiveItem()
+setInventory()
+setId()
+setName()
+setHP()
+setSpecs()
+setSkills()
+setTime()
+setActiveWeapon()
+setAlternateWeapons()
+setActiveItem()
+walk()
+jump()
+run()
+crouch()
+drive()
+interact()
+die()
+useItem()
+attack()
+swapWeapon()
+swapItem()
+tradeItem()
+takeCover()
+takeDamage()
Player (inherits Character) -xp +getXP()
+setXP()
+loot()
+decreseHP()
+increaseHP()
+levelUP()
+upgradeWeapon()
+buyItem()
+sellItem()
Environment -gameObjects[] +getGameObjects()
-vehicles[] +getVehicles()
+setGameObjects()
+setVehicles()

80
+interactWithObject()
Game Object -hp +getHp()
-price +setHP()
-breakable +isBreakable()
+break()
+takeDamage()
+getPrice()
+setPrice()
+interact()
+spawn()
+despawn()
Vehicles (inherits Game -specs +getSpecs()
Objects) -driver +getDriver()
-passengers[] +getPassengers()
-storage[] +getStorage()
-fuel +getFuel()
-speed +getSpeed()
+setSpecs()
+setDriver()
+setPassengers()
+setStorage()
+setFuel()
+setSpeed()
+useFuel()
+move()
+enter()
+exit()
+start()
+stop()
+accelerate()
+collision()
Bots (inherits Character) +spawn()
+despawn()
+checkIfEnemy()
+patrolling()
In-Game Items (Inherits +use()

81
Game Object) +drop()
+store()
Weapons (Inherits -specs[] +getSpecs()
In-Game Items) -Damage +getDamage()
+setSpecs()
+setDamage()
+dealDamage()
+upgradeWeapon()
Shooting based weapons -ammunition[] +getAmmunition()
(Inherits weapon) +setAmmunition()
+haveAmmunition()
+shoot()
+aim()
+reload()
Ammunition (Inherits -initialVelocity +getInitialVelocity()
weapon) +setInitialVelocity()
+hitTarget()
Bladed weapon (Inherits -areaOfEffect +getAreaOfEffect()
weapon) +setAreaOfEffect()
+startAttackAnimation()
+hitTarget()
Instant heal-pack (Inherits -healAmount +getHealAmount()
in-game item) +setHealAmount()
+heal()
Inventory -storedItems[] +getStoredItems()
+setStoredItems()
+storeItem()
+dropItem()
+equipItem()
Party -leader +getLeader()
-members +getMembers()
+setLeader()
+setMembers()
+createParty()

82
+addMembers()
+removeMembers()
+issueCommandToMember()
Quest -xpReward +getXPReward()
-rewardItem +getObjectives()
-objectives[] +getRewardItem()
-questLocation +getQuestLocation()
+setRewardItem()
+setXPReward()
+setObjectives()
+start()
+completed()
+failed()
+rewardPlayer()
Single player mode -mainStoryQuests[] +getMainStoryQuests()
-sideQuests[] +getSideQuests()
-currentProgression +getCurrentProgression()
+setMainStoryQuests()
+setSideQuests()
+setCurrentProgression()
+updateProgression()
+removeQuestFormQueue()
+showProgression()

83
11.7 Class responsibility and collaboration

Class name Responsibility Collaborator


The Restoration ● Act as the driver class for the Player, Open
Project project world, Single
● Manage player profile player mode,
● Mange game progression Quest
● Save game progression for future
session
Open world ● Render the open world map Player, Character,
● Add appropriate environment Bot, Single
● Spawn in NPC and enemies player mode,
● Spawn in game objects quest,
● Place quest locations Environment,
● Spawn player Game object, In
game item
Character ● Act as the super class for player Open world,
and bots Game object, In
● Manage all basic movement Game Item,
mechanics Weapon, Vehicle
● Manage all basic combat
mechanics
● Include inventory system for
storing items
● Interact with in game objects
Player (inherits ● Manage XP Open world,
Character) ● Level up when Xp reaches a Game object, In
certain threshold Game Item,
● Implement continuous decreasing Weapon, Vehicle,
health mechanics Single player
● Start or complete quests mode
● Manage interaction with in game
objects
● Mange looting dead NPCs
inventory

84
Environment ● Manage interaction with game Character, Game
objects and characters object, Player,
Bots, In Game
Item
Game Object ● Spawn and objects in the game Character, Open
world as needed world,
● Manage breakable objects Environment
● Manage the price for buying and
selling the objects
Vehicles (inherits ● Manage vehicle movement Character, in
Game Objects) mechanics game item,
● Manage item storage inside Player, Bots,
vehicle Open world
● Manage vehicle collision
● Manage fuel system in vehicles
Bots (inherits ● Manage spawn and despawn of Player, Open
Character) NPCs world, Inventory,
● React to player character Game objects, in
according to the bot type game items
● Manage individual item
inventory
● Interact with in game objects
In-Game Items ● Can be used by the character in Character, Bots,
(Inherits Game possen of it Player, Vehicle,
Object) ● Can be stored into character of Inventory
vehicle inventory
Weapons (Inherits ● Can deal damage to the target Character, Bots,
In-Game Items) character or game object Player
● Can be upgraded for more
damage
Shooting based ● Mange shooting mechanism Character, Bots,
weapons (Inherits ● Manage weapon aiming Player,
weapon) ● Manage weapon ammunition Ammunition

85
Ammunition ● Can hit target object or character Weapon,
(Inherits weapon) to deal damage Character, Bots,
Player
Bladed weapon ● Manage melee combat mechanics Character, Bots,
(Inherits weapon) ● Can deal damage if target is in Player
the area of effect
Instant heal-pack ● Heal the player character for a set Player, Character
(Inherits in-game amount of HP
item)
Inventory ● Manage storing the in game item Character
for a character
Party ● Manage party members Character, Player,
● Issue command form the party Bots
leader to the party member
Quest ● Manage the objective queue that Player, Open
the player needs to complete world, Game
● Manage the XP and item reward object
for completing a quest
Single player mode ● Manage the quest queue for main Player, Open
story line world, Quest
● Manage side quest queue
● Remove quest from queue if
completed
● Manage quest location in the
open world
● Mange player progression
through the campaign

86
11.8 Class cards

The Restoration Project


Attribute Method
-gameState +loadGame()
-playerProfile +saveGame()
+startGame()
+pauseGame()
+resumeGame()
+promptMenu()
+promptSettings()
+createPlayerProfile()
+updatePlayerProfile()
Responsibilities Collaborator
● Act as the driver class for the Player, Open world, Single player
project mode, Quest
● Manage player profile
● Mange game progression
● Save game progression for future
session

87
Open world
Attribute Method
-gameObjects[] +render()
-environment +getGameObjects()
-player +getEnvironment()
-bots[] +getBots()
-singlePlayerMode +getPlayer()
+getSinglePlayerMode()
+setGameObjects()
+setEnvironment()
+spawnBots()
+spawnPlayer()
+setSinglePlayerMode()
+setPhysics()
+getQuestLocation()
Responsibilities Collaborator
● Render the open world map Player, Character, Bot, Single player
● Add appropriate environment mode, Quest, Environment, Game
● Spawn in NPC and enemies object, In game item
● Spawn in game objects
● Place quest locations
● Spawn player

88
Character
Attribute Method
-inventory[] +getInventory()
-id +getId()
-name +getName()
-hp +getHP()
-specs[] +getSpecs()
-skills[] +getSkills()
-time +getTime()
-activeWeapon +getActiveWeapon()
-activeItem +getAlternateWeapons()
-alternateWeapons[] +getActiveItem()
+setInventory()
+setId()
+setName()
+setHP()
+setSpecs()
+setSkills()
+setTime()
+setActiveWeapon()
+setAlternateWeapons()
+setActiveItem()
+walk()
+jump()
+run()
+crouch()
+drive()
+interact()
+die()
+useItem()
+attack()
+takeCover()
+takeDamage()
+swapItem()
+swapWeapon()
+tradeItem()

89
Responsibilities Collaborator
● Act as the super class for player Open world, Game object, In Game
and bots Item, Weapon, Vehicle
● Manage all basic movement
mechanics
● Manage all basic combat
mechanics
● Include inventory system for
storing items
● Interact with in game objects

Player (inherits Character)


Attribute Method
-xp +getXP()
+setXP()
+loot()
+decreseHP()
+increseHP()
+levelUP()
+upgradeWeapon()
+buyItem()
+sellItem()
Responsibilities Collaborator
● Act as the super class for player Open world, Game object, In Game
and bots Item, Weapon, Vehicle
● Manage all basic movement
mechanics
● Manage all basic combat
mechanics
● Include inventory system for
storing items
● Interact with in game objects

90
Environment
Attribute Method
-gameObjects[] +getGameObjects()
-vehicles[] +getVehicles()
+setGameObjects()
+setVehicles()
+interactWithObject()
Responsibilities Collaborator
● Manage interaction with game Character, Game object, Player, Bots,
objects and characters In Game Item

Game object
Attribute Method
-hp +getHp()
-price +setHP()
-breakable +isBreakable()
+break()
+takeDamage()
+getPrice()
+setPrice()
+interact()
+spawn()
+despawn()
Responsibilities Collaborator
● Spawn and objects in the game Character, Open world, Environment
world as needed
● Manage breakable objects
● Manage the price for buying and
selling the objects

91
Vehicles (inherits Game Objects)
Attribute Method
-specs +getSpecs()
-driver +getDriver()
-passengers[] +getPassengers()
-storage[] +getStorage()
-fuel +getFuel()
-speed +getSpeed()
+setSpecs()
+setDriver()
+setPassengers()
+setStorage()
+setFuel()
+setSpeed()
+useFuel()
+move()
+enter()
+exit()
+start()
+stop()
+accelerate()
+collision()

Responsibilities Collaborator
● Manage vehicle movement Character, in game item, Player, Bots,
mechanics Open world
● Manage item storage inside
vehicle
● Manage vehicle collision
● Manage fuel system in vehicles

92
Bots (inherits Character)
Attribute Method
+spawn()
+despawn()
+checkIfEnemy()
+patrolling()
Responsibilities Collaborator
● Manage spawn and despawn of Player, Open world, Inventory, Game
NPCs objects, in game items
● React to player character
according to the bot type
● Manage individual item
inventory
● Interact with in game objects

In-Game Items (Inherits Game Object)


Attribute Method
+use()
+drop()
+store()
Responsibilities Collaborator
● Can be used by the character in Character, Bots, Player, Vehicle,
possen of it Inventory
● Can be stored into character or
vehicle inventory

93
Weapons (Inherits In-Game Items)
Attribute Method
-specs[] +getSpecs()
-Damage +getDamage()
+setSpecs()
+setDamage()
+dealDamage()
+upgradeWeapon()
Responsibilities Collaborator
● Can deal damage to the target Character, Bots, Player
character or game object
● Can be upgraded for more
damage

Shooting based weapons (Inherits weapon)


Attribute Method
-ammunition[] +getAmmunition()
+setAmmunition()
+haveAmmunition()
+shoot()
+aim()
+reload()
Responsibilities Collaborator
● Mange shooting mechanism Character, Bots, Player, Ammunition
● Manage weapon aiming
● Manage weapon ammunition

94
Ammunition (Inherits weapon)
Attribute Method
-initialVelocity +getInitialVelocity()
+setInitialVelocity()
+hitTarget()
Responsibilities Collaborator
● Can hit target object or character Weapon, Character, Bots, Player
to deal damage

Bladed weapon (Inherits weapon)


Attribute Method
-areaOfEffect +getAreaOfEffect()
+setAreaOfEffect()
+startAttackAnimation()
+hitTarget()
Responsibilities Collaborator
● Manage melee combat Character, Bots, Player
mechanics
● Can deal damage if target is in
the area of effect

95
Instant heal-pack (Inherits in-game item)
Attribute Method
-healAmount +getHealAmount()
+setHealAmount()
+heal()
Responsibilities Collaborator
● Heal the player character for a Player, Character
set amount of HP

Inventory
Attribute Method
-storedItems[] +getStoredItems()
+setStoredItems()
+storeItem()
+dropItem()
+equipItem()
Responsibilities Collaborator
● Manage storing the in game item Character
for a character

96
Party
Attribute Method
-leader +getLeader()
-members +getMembers()
+setLeader()
+setMembers()
+createParty()
+addMembers()
+removeMembers()
+issueCommandToMember()
Responsibilities Collaborator
● Manage party members Character, Player, Bots
● Issue command form the party
leader to the party member

97
Quest
Attribute Method
-xpReward +getXPReward()
-rewardItem +getObjectives()
-questLocation +getRewardItem()
-objectives[] +getQuestLocation()
+setRewardItem()
+setXPReward()
+setObjectives()
+start()
+completed()
+failed()
+rewardPlayer()
Responsibilities Collaborator
● Manage the objective queue that Player, Open world, Game object
the player needs to complete
● Manage the XP and item reward
for completing a quest

98
Single player mode
Attribute Method
-mainStoryQuests[] +getMainStoryQuests()
-sideQuests[] +getSideQuests()
-currentProgression +getCurrentProgression()
+setMainStoryQuests()
+setSideQuests()
+setCurrentProgression()
+updateProgression()
+removeQuestFormQueue()
+showProgression()
Responsibilities Collaborator
● Manage the quest queue for main Player, Open world, Quest
story line
● Manage side quest queue
● Remove quest from queue if
completed
● Manage quest location in the
open world
● Mange player progression
through the campaign

99
11.9 CRC Diagram
ID 1: The restoration Project

ID 2: Open World

100
101
ID 3: Character

ID 4: Player

102
ID 5: Environment

ID 6: Game Object

103
ID 7: Vehicle

ID 8: Bot

104
ID 9: In-Game Items

ID 10: Weapon

105
ID 11: Shooting-Based Weapon

ID 12: Ammunition

106
ID 13: Bladed Weapon

ID 14: Instant Heal Pack

ID 15: Inventory

107
ID 16: Party

ID 17: Quest

108
ID 18: Single-Player Mode

109
12. Behavioural Modeling
12.1 Event Table
Associated
SL Event Name State Name Initiator Collaborator Method
No
1 Log In log_in Player The +logIn()
Restoration
Project
2 Sign Up sign_up Player The +signUp()
Restoration
Project
3 Verify Log In verify_login The Player +verify()
Information Restoratio
n Project
4 Record New register_new_ The Player +register()
User user Restoratio
n Project
5 Start new start_new_ga Player Single Player +startGame()
Game me Mode
6 Load Saved load_game Player The +loadGame()
Game Restoration
Project
7 Create New new_open_wo Single Open World +createGame()
Game World rld Player
Mode
8 Fetch Game fetch_world_d Single +fetchSavedDate()
World Info ata Player
from Saved Mode
File

110
9 Load Game load_game_w Single Open World +loadWorld()
World orld Player
Mode

10 Render render_enviro Open Environment, +render()


Environment nment World Game Object,
In-game
Items,
Weapons,
Ammunation,
Shooting-base
d Weapons,
Bladed
Weapons,
Vehicles,
Instant Heal
Pack

11 Set Physics set_physics Open Environment +setPhysics()


World
12 Spawn Player spawn_player Open Player, +spawnPlayer()
World Environment
13 Populate spawn_npc Open Bots, +spawnBots()
NPCs World Environment
14 Mark Quest get_quests Open Single Player +getQuestLocation(
Location World Mode )

111
15 Load Game load_game_o Environme Game Object, +getGameObjects()
Objects bject nt In-game
Items,
Weapons,
Ammunation,
Shooting-base
d Weapons,
Bladed
Weapons,
Vehicles,
Instant Heal
Pack
16 Generate generate_ques Single Open World, +getMainStoryQue
Quest t Player Quest st()
Mode +getSideQuest()
17 Move move_charact Character Open World +walk()
er +run()
+jump()
+crouch()
18 Enter Vehicle enter_vehicle Character Vehicle +interact()
19 Let in let_in Vehicle Character, +enter()
Character Player, Bot +setDriver()
+setPassengers()
20 Drive drive Character Vehicle +drive()
21 Move Vehicle move_vehicle Vehicle Open World +start()
+move()
+accelerate()
+stop()
22 Exit Vehicle exit_vehicle Character Vehicle +interact()
23 Let Out let_out Vehicle Character, +exit()
Character Player, Bot
24 Pick Up loot_item Player In Game +loot()

112
Items
25 Store Item In store_item Inventory Vehicle, +storeItem()
Inventory Player
26 Use Fuel use_fuel Vehicle +useFuel()
27 Set Active set_active_we Character Weapon +setActiveWeapon(
Weapon apon )
+swapWeapon()
28 Attack attack Character Weapon +attack()
29 Deal Damage deal_damage Weapon Game Object, +dealDamage()
Character
30 Take Damage take_damage_ Character +takeDamage()
(Character) character
31 Take Damage take_damage_ Game +takeDamage()
(GameObject) object Object
32 Shoot shoot Shooting Ammunition +shoot()
Based
Weapon
33 Hit Target hit_target Ammuniti Game Object, +hitTarget()
on Character
34 Attack with attack_blade Bladed Game Object, +startAttackAnimat
Blade Weapon Character ion()
+hitTarget()
35 Reload reload Character Shooting +reload()
Weapon Based
Weapon,
Ammunition
36 Drop item drop_item Character In Game +drop()
Item,
Inventory

37 Swap Weapon swap_active_ Character Weapon, +swapWeapon()

113
weapon Inventory
38 Swap Item swap_item Character In Game +swapItem()
Item,
Inventory
39 Use Item use_Item Character In Game +Interact()
Item,
Inventory
40 Be Interacted be_interacted In Game Character +use()
With Item
41 Defend defend Character Open World, +takeCover()
Game Object +crouch()
42 Accept Quest accept_quest Player Quest, Open +Interact()
World
43 Start Quest start_quest Quest Open World, +start()
Player, Bot
44 Quest quest_succesf Quest Player +completedFunctio
Successful ul n()
+rewardPlayer()
45 Quest Failed quest_failed Quest +failed()
+updateProgression
46 Update update_progre Single Quest ()
progression ssion Player +removeQuestFro
Mode mQueue()
+showProgression(
)
47 Level Up level_up Player +levelUp()
48 Upgrade upgrade_weap Player Weapon +upgradeWeapon()
weapon on
49 Pause/Resume pause_resume The +pauseGame()
Restoratio +resumeGame()
n Project

114
50 Save Game save_game_st The +saveGame()
ate Restoratio
n Project
51 Character charecter_deat Character +die()
death h
52 Object break break_object Game +break()
Object +despawn()
53 Decrease HP decrese_HP Player +decreseHP()
54 Increase HP increse_HP Player +increaseHP()
55 Buy Item buy_item Player Bots, In +tradeItem()
Game Item, +buyItem()
Inventory +storeItem()
56 Sell Item sell_item Player Bots, In +tradeItem()
Game Item, +buyItem()
Inventory +dropItem()
57 Healing healing Player Instant +interact()
heal-pack +use()
+heal()

115
12.2 State Transition Diagram
ID 1: Player

116
ID 2: The Restoration Project

117
ID 3: Single Player Mode

118
ID 4: Open World

ID 5: Environment

119
ID 6: Character

120
ID 7: Vehicle

ID 8: Weapon

ID 9: Game Object

ID 10: Shooting Based Weapon

ID 11: Bladed Weapon

121
ID 12: Quest

122
12.3 Sequence Diagram
Part 1: Sign in and Sign up

123
Part 2: Starting and Loading Game

124
Part 3: Move, Defend, Take Cover, Item Interaction

125
Part 4: Attacking

126
Part 5: Weapon, Quest, Trade and Game State

127
Complete Sequence Diagram

128

You might also like