Analysis_Report_for Bomberman
Transcript of Analysis_Report_for Bomberman
Bilkent University
CS 319 Object-Oriented Software Engineering
ANALYSIS REPORT BOMBERMAN
Grop-3I
ANIL TAN MUSTAFA SOYLU MEHMET GÜNAY
EDA ÖZOĞAN
[29/12/2009]
2
TABLE OF CONTENTS
1.1. What is Bomberman? .................................................................................................................. 4
1.2. Why did we choose bomberman? .............................................................................................. 4
1.3. Differences in our game .............................................................................................................. 5
1.3.1.Monsters .................................................................................................................................... 5
1.3.2. Bonuses ..................................................................................................................................... 5
1.3.3. Levels ......................................................................................................................................... 6
2. DOMAIN ANALYSIS .............................................................................................................................. 7
3. REQUIREMENTS ................................................................................................................................... 9
3.1. Functional Requirements ............................................................................................................ 9
3.1.1. Play the Game ........................................................................................................................... 9
3.1.1.1. New Game .......................................................................................................................... 9
3.1.1.2. Load Game .......................................................................................................................... 9
3.1.2. Settings ...................................................................................................................................... 9
3.1.2.1. Language Settings ............................................................................................................... 9
3.1.2.2. Sound Settings .................................................................................................................. 10
3.1.3. Help ......................................................................................................................................... 10
3.1.4. Save Game ............................................................................................................................... 10
3.1.5. Pause Game ............................................................................................................................. 10
3.1.6. High Scores .............................................................................................................................. 10
4. SYSTEM MODELS ............................................................................................................................... 11
4.1. Use Case Analysis ....................................................................................................................... 11
Use Case – 1................................................................................................................................... 11
Use Case – 2................................................................................................................................... 12
Use Case – 3................................................................................................................................... 13
3
Use Case – 4................................................................................................................................... 13
Use Case – 5................................................................................................................................... 14
Use Case – 6................................................................................................................................... 14
Use Case – 7................................................................................................................................... 15
4.2.Dynamic Models ......................................................................................................................... 16
4.2.1.Sequential Diagrams................................................................................................................. 16
4.2.1.1.Play a New Game............................................................................................................... 16
4.2.1.2. Save Game ........................................................................................................................ 18
4.2.1.3. Load Game ........................................................................................................................ 20
4.2.1.4. Change Settings ................................................................................................................ 22
4.2.1.5. See High Scores ................................................................................................................ 23
4.2.1.6. Exploding a Bomb and Killing a Monster .......................................................................... 26
4.2.1.7.Getting Bonus – LiveBonus ................................................................................................ 28
4.2.1.8. Getting Bonus – MultipleBomb Bonus ............................................................................. 29
4.2.1.9. Getting Bonus – Speed Bonus .......................................................................................... 31
4.2.1.10. Getting Bonus – FreezeMonster Bonus .......................................................................... 32
4.2.1.11. Getting Bonus – BombRange Bonus ............................................................................... 33
4.2.1.12. Bomberman Killed by a Monster .................................................................................... 35
4.2.1.13.Pause Menu ..................................................................................................................... 37
4.2.1.14. Game Over and High Score ............................................................................................ 39
4.2.1.15. Complete Game .............................................................................................................. 41
4.2.2. Activity Diagram ...................................................................................................................... 43
4.2.3. State Diagrams ........................................................................................................................ 45
4.2.3.1. Bomberman ...................................................................................................................... 45
4.3.Screen Mock-ups ........................................................................................................................ 47
5. CONCLUSION ..................................................................................................................................... 52
4
1.INTRODUCTION
1.1. What is Bomberman?
Bomberman is a strategic computer and video game which is developed by Hudson
Soft. It was published in 1983 and it is being developed today with newer versions.
In the original Bomberman, he has an exact number of bombs. He should be able to
complete the level without finishing the bombs he has. Therefore a Bomberman player
should consider all the possibilities not to comsume all the bombs. In the Bomberman
map, there are walls and obstacles; walls are concrete, they are not destructible by any
bomb. Obstacles are destructible. Exploding a bomb will destroy the obstacles which are
in bombs range. There are also enemies which harmsor kill Bomberman by touching him.
Fortunately, enemies are also destructable by bombs. Bombs kill or harm the enemies.
Furthermore, if Bomberman is also in bomb’s range, he can get hurt or sometimes get
killed by the bomb he put. If there is powerups in the game, bombs destroy them, too.
One bomb also triggers another bomb, which is in range, to explode, too.
There is an exit door in the game which is mostly activated when all the enemies are
dead. It leads Bomberman to the next level. Through the levels, the enemies skills might
increase (chasing Bomberman or moving faster etc.), and powerups might develop (
extra bombs or extra life etc.). Also the map can change and become more complex. The
main goal is to place less bombs and kill more enemies with collecting more powerups.
Throughout the game, Bomberman should pay attention to his lives in order not to finish
them before the game finishes.
1.2. Why did we choose bomberman?
Almost all of us remembers Bomberman. When we were a kid, Bomberman was one
of the most popular games. It was not very hard or not too much developed but it was
fun. We definitely don’t disdain Bomberman because it is simply the pure foundation of
almost all newer games. We all like Bomberman as a group. Therefore we choose
Bomberman.
5
1.3. Differences in our game
In our game, different from almost all other Bomberman games, we don’t have a
limitation of bombs. The Bomberman player can use any number of bombs, but the
faster Bomberman passes to next level, the more points he gets. The bricks and walls are
the same as the original Bomberman, walls are stable, they can’t be blown up. Bricks are
exploded by bombs and under them, there are bonuses and an exit wall to the next level.
There are totaly 10 levels in our Bomberman game. Through each level it gets harder to
pass to the next level. Also, Bomberman shouldn’t waste his lives till the end of the game
or it will be game over. Monsters and bonuses are explained further in the fallowing
subsections.
1.3.1.Monsters
There are 3 types of monsters. They are seperated by their colors. Each color
represents one type of monster with one different attribute. The first one is grey. It is a
typical monster which moves with normal speed. It is the only monster in the first level.
The second type is blue. Blue monsters move faster than the grey monsters. The last type
is red. Red monsters are highly intelligent. They are able to chase Bomberman. This type
of monsters appear in higher levels.
1.3.2. Bonuses
Just like every other game, we designed bonuses which increases Bomberman’s skills,
too. Bonuses are hidden under obstacles and Bomberman should destruct them to get
the bonus. Some of the bonuses have limited time before they are “out of order” after
Bomberman fetches them. There are 5 types of bonuses; speedIncreaser bonuses,
incrementBombRange bonuses, freezeMonster bonuses and extraLife bonuses and
multipleBomb bonuses.
SpeedIncreaser bonuses speeds up the Bomberman. That way he can move faster and he
can pass to the next level sooner. This will earn him more points for finishing the level
earlier. It has a time limitation.
6
incrementBombRange bonuses increases the range of a bomb. So, the possibility to kill or
harm a monster increases. Of course, Bomberman should make sure that he is far away
from the bomb enough.
FreezeMonster bonuses gives Bomberman a chance to kill monsters much easier. As
explained earlier, there are fast and intelligent monsters in the game. With a
freezeMonster bonus, Bomberman should easily kill them. This bonus has a time
limitation.
ExtraLife bonuses gives the Bomberman an extra life.
MultipleBomb bonuses let the Bomberman put more than one bomb at a time before it
reaches the time limitation. A bomb also triggers another bomb to explode.
Each bonus has a point and they are added up in the end of the level. Bonuses, for sure,
increases the chance of Bomberman to finish the game but strategy is also one
important way that should not be forgotten.
1.3.3. Levels
There are 10 levels in our game. Each level has different combinations of monsters
and bonuses but the higher level is, the harder it gets. Therefore, it is a good gam efor
people who are looking for some difficulty.
7
2. DOMAIN ANALYSIS
Figure 2.1. Domain Class Diagram
Each object that Game Map has has a location. Bomberman’s location is controlled
by the user and limited by the Game Map. Bomberman has 3 lives as a default when the
game first started. He can increase his lives with collecting an extraLife bonus. Bomberman
also has a score. The more he kills monters and collects bonuses, the more points he gets.
His score also depends on the time he spent for that level. The less time he spends, the more
points he gets. Bomberman also has alterable speed. When he picks a speedIncreaser bonus,
his speed changes and he starts to move faster.
Bombs are also located on the Game Map by the Bomberman. Each of them has a
timer and at the end of the specified time, the bomb explodes and destroys bricks and kills
monsters if they are in range. Bombs are also affected by bonuses; multpile-bomb bonuses
8
and incrementBombRange bonus and multipleBomb bonus. BombRange bonuses increases
the bombs’ range and multipleBomb bonuses let Bomberman put more than one bombs at
a time.
Game Map is the screen which is seen by the user during the game. On the Game
Map, there are Bonuses, Bombs, Monsters, the exit Door, Bricks, Walls and Bomberman.
They all act on Game Map. There is only one Bomberman and one exit door on the Game
Map.
The exit door is hidden under a brick. If there are no monsters left on the Game Map, the
door opens.
Just like all other Bomberman games, a monster can kill Bomberman. When
Bomberman collides a monster, he dies. He can start over from the same level with the same
game map and all other necessary game features. When Bomberman puts a bomb, if there is
at least one monster in bomb range when the bomb time finishes, the bomb kills the
monster. If Bomberman is also in bomb’s range, then he dies, too. If he has more than 1 life,
then it won’t be game over.
Bombs can also explode the bricks. A brick might be hiding one of the 5 types of
bonuses. Bomberman can pick up bonuses and increase his speed, lives or increase bomb
range, freeze monsters and put more than 1 bombs at a time.
Walls and bricks block the monsters’ and Bomberman’s path. They can not walk
through a wall or a brick. Bomberman can blow up a brick to pass it.
9
3. REQUIREMENTS
3.1. Functional Requirements
3.1.1. Play the Game
Every game has a start option, so does our Bomberman. As a main requirement, start
game is an option. When start game is choosen, there are two options for the user
3.1.1.1. New Game
The game will start from the first level and Bomberman, monsters, bricks and walls
are brand new. Bomberman has the default lives, which is three, and he is ready to
encounter monsters, collect bonuses and blow up some bricks.
3.1.1.2. Load Game
User can start playing a saved game. When he/she chooses a saved game, that game
will be loaded with the saved Bomberman lives, score, monsters and bricks. The user can
continue from where he left off. He/she will see the same structure when he/she first saved
the game.
3.1.2. Settings
Settings is an essential option where users can adjust some settings accoring to their
personal desires. The features of the game itself (bombs, bonuses etc. ) can not be editted
but the user can change the language and turn on / off the music.
3.1.2.1. Language Settings
Normally Bomberman is in English, however if the user wants to use it in Turkish,
he/she can always change the language. There are two language options, Turkish and English
(default).
10
3.1.2.2. Sound Settings
The sounds of the game is not fixed, they can be changed from sound settings. There are two
sound settings: music and effects. Music is the one which is always playing at the
background, effects are the ones which play according to actions. For example when a bomb
is exploded, there is an explosion effect. All the sounds of the game (music and effects)
can be increased, decreased or completely turned off according to user's choice.
3.1.3. Help
Users can reach any information required to play the game with this option.
Information about rules and goal of the game, control of the bomberman is provided in this
section.
3.1.4. Save Game
Save option makes it possible to continue from a previously reached score. When a
game is saved, all of its features, the structure of the map, the level and the points
Bomberman collected so far are also saved. Due to save game option, players doesn’t have
to start from first level everytime they play the game. Since there will be 10 levels in the
game, save game option is crucial.
3.1.5. Pause Game
The user can pause the game anytime. It can be paused for a limitless time during any
part of a level and continues only if the user wants. The score, level and all the data will be
stored and when user wants to continue, he/she can play the game from where he left off.
3.1.6. High Scores
The list of highest scores will be kept by the game and users will be able to check it
any time they want. Since game asks for the name of the user before game starts, every
player will understand which are their own scores. High Scores are good for the player to
improve himself since they are able to see their previous highest score.
11
4. SYSTEM MODELS
4.1. Use Case Analysis
Figure 4.1. Use Case Diagram
Use Case – 1
Use Case Name Play a New Game
Primary Actor Player
Level Subfunction
Stakeholders and Interests Player: Wants to start a new game.
Preconditions Player has opened the game “Bomberman”.
12
Success Guarantee The new game starts from the level-1, after player enters his/her
name.
Main Success Scenario 1.Player selects the new game.
2.Player enters his/her name.
3.The name has not been entered yet by another user.
4.The new game starts from level-1.
Extensions 3.a. If the name, player just entered, already exists in saved game
files, a warning appears and asks user to enter another name.
Use Case – 2
Use Case Name Save Game
Primary Actor Player
Level Subfunction
Stakeholders and Interests Player: Wants to save the current game in order to be able to
continue any time in future.
Save Game:Wants to save the current session completely and
successfully.
Preconditions Player has to be playing in one of the levels of the game
“Bomberman”.
Success Guarantee The current game is saved successfully and player returns the pause
menu or quits if s/he requested before.
Main Success Scenario 1. Player pauses the game
2. Player saves the game
3. Game returns to pause menu.
Extensions 3.a. If player requested to quit the game and after the question
“Would you like to save the current game before quit?” if s/he
decided to save the game, after saving operation the game would
close.
b. If player saves the game from the pause menu directly, game
would return the pause menu again after save operation.
13
Use Case – 3
Use Case Name Load Game
Primary Actor Player
Level Subfunction
Stakeholders and Interests Player: Wants to load the game completely which s/he saved before.
Load Game: Wants to load the session that player wants to continue.
Preconditions - The game has to be saved by user in past.
- Player has to remember the name correctly and choose the
correct name from the saved games list.
Success Guarantee Player chooses the name from the saved games list, and can continue
the game session with same variables such as point of bomberman
and live of bomberman
Main Success Scenario 1. Player clicks on load from the main menu,
2. The saved games list appears.
3. Player chooses the game that s/he wants to load by choosing name
from the list.
4. The loaded game starts with its last variables.
Extensions 2.a. If there is no saved game, the list wouldn’t be appeared.
3.a. If player chooses wrong name, another game would loaded.
Use Case – 4
Use Case Name Pause Game
Primary Actor Player
Level Subfunction
Stakeholders and Interests Player: Wants to pause the game.
Preconditions Player has to be playing in one of the levels of the game
“Bomberman”.
14
Success Guarantee The game will be paused successfully and the pause menu screen will
appear. Player will be able to save the game, quit the game, resume
the game and change language and sound settings.
Main Success Scenario 1. Player presses the esc buton from the keyboard.
2. Pause menu screen appears.
Extensions 2.a. Any time player presses the esc buton again, game will continue.
Use Case – 5
Use Case Name Get Help
Primary Actor Player
Level Subfunction
Stakeholders and Interests Player: Wants to get help about the game. For example; how to play,
or what are the bonus types etc.
Game: Wants to explain game completely.
Preconditions Player must on main menu screen or pause menu screen.
Success Guarantee Player will learn what s/he needs to know about the game.
Main Success Scenario 1. Player click the get help buton
2. Help window appears and player can reach all of the information
about the game by reading.
Extensions 1.a. Player can find the get help buton both from the main menu
screen and pause menu screen.
Use Case – 6
Use Case Name See High Scores
Primary Actor Player
Level Subfunction
Stakeholders and Interests Player: Wants to see the high scorers of game up until that time as a
name list.
15
See High Scores: Wants to show the high scores list to the player.
Preconditions Player must on main menu screen.
Success Guarantee Player will see the top 10 high scores and names.
Main Success Scenario 1. Player click the get help buton
2. High score window appears and shows player the high scorers as a
name and point list.
Use Case – 7
Use Case Name Change Settings
Primary Actor Player
Level Subfunction
Stakeholders and Interests Player: Wants to make necessary changes of the game such as
language and sound.
Preconditions Player must on main menu screen or pause menu screen.
Success Guarantee Player will open the settings window and make the changes about
language and sound.
Main Success Scenario 1. Player clicks on change options button in the main menu or pause
menu.
2. Player changes the options.
3. Player turns to menu where s/he came after changing options.
Extensions *a Anytime player presses on esc;
1. Player turns back to menu where s/he came.
2a. Player changes sound options. 1. Player sets the sound on.
2. Player sets the sound off. 2c. Player changes the language of the game.
1. Player sets language TR. 2. Player sets language ENG.
3a. Player clicks to back button and turns to main menu.
16
4.2.Dynamic Models
4.2.1.Sequential Diagrams
4.2.1.1.Play a New Game
Osman opens the game "Bomberman" and clicks to new game. After he enters his name,
new game starts from level-1.
Figure 4.2. Sequence Diagram – Start a New Game
17
In this scenario, Osman wants to starts a new game. When he clicks the new
game, a register screen is created by the GUIManager. This reg ister screen is
necessary to get the name of the player. As it is seen, after GUI manager create
the register screen, it also display it. After Osman enters his name, register
screen asks Data Manager to check the name. Data Manager has responsibilities
to save the game, load the game and save the high scores. Therefore, it can
easily check, was the name that osman enters entered from other user in past.
In this scenario, the name "osman" was entered by another user, so register
screen ask osman to enter another name. When osman enters "bombacı osman",
it is a valid name and GUIManager starts the game by creating the game engine.
The next step is, GameEngine creates the map of the game.
18
4.2.1.2. Save Game
Osman wants to save the game while he is playing the game. He clicks the esc button and
the pause menu screen exist then he clicks the save option and the game saved.
Figure 4.3. Sequence Diagram – Save Game
In this sequence diagram, player interacts with GameScreen then GameScren
interact with GameEngine that determines what the sub systems required.
GameEngine issue a command to GuiManager to create a PauseMenuScreen.
GuiManager responsible to create screens for interaction. After the call
Guimanager create PauseManuScreen and display the screen to be seen by user.
19
The PauseManuSreen objects have several options like save game, load game,
exit and resume the game. In this scenario , player clicks the save option then
DataManager saves the GameEngine object that keep the all informations to be
needed by load process to File as an GameObject object . And also DataManager
saves the player name to the ArrayList to check the player is registered before
and to find the specific GameEngine object to load the game. PauseManuScreen
calls the GuiManager to create SaveScreen. Then GuiManager creates
SaveScreen to confirm the save process. Then SaveScreen interacts with
GuiManager to destroy itself and create the PauseMenuScreento return the
previous screen.
20
4.2.1.3. Load Game
In this scenario, Osman wants to load the game that he saved before. He clicks the load
game from the main menu screen and the loaded game starts.
Figure 4.4. Sequence Diagram – Load Game
In this scenario, Osman clicks the load game from the main menu screen. After
this action, the GUI Manager creates a Load Screen which is responsible to show
saved games list to Osman. Load Screen get the saved games list from the Data
Manager and shows Osman. Then, Osman wants to load the game which is saved
by the name "osman" before. LoadScreen sends the specified gameEngine name
to GUIManager then GUIManager gets the gameEngine object from
21
DataManager. Then GUIManager sets the local GameEngine to sended
gameEngine object. And GUIManager destroy the LoadScreen to create
GameScreen.
22
4.2.1.4. Change Settings
In this scenario, after starting the application, Osman choses the settings option from the
main menu to make some changes before starting to play the game. Since Osman doesn't
know English well, he changes the language settings as Turkish, which was English before
defaultly. After realizing that all the sound effects and music of the game are horrible, he
can't endure and closes them all (Sets sound effects and music to off which was on defaultly
- there's no other choices, sounds are on or off). When he changed all the settings he want,
Osman returns to main menu.
Figure 4.5 Sequence Diagram – Change Settings
23
Osman choses settings in main menu screen. To create a settings screen, Menu
Screen interacts with GUI Manager. GUI manager creates a settings screen which
is English by default. After Osman changed the language from English to Turkish,
settings screen informs the GUI Manager about the change, GUI Manager
destroys the Settings Screen(English), Menu Screen(English) then creates and
displays Menu Screen(Turkish) and Settings Screen(Turkish), respecticely. After
Osman sets music and sound effects to off, settings screen informs the sound
manager about the changes and Sound Manager closes the music and sou nd
effects. Then Osman choses the return to menu option, settings screen informs
the GUI Manager and GUI Manager destroys the settings screen. Since Menu
screen was already existing in the background, Osman sees the Menu after this
process.
4.2.1.5. See High Scores
After played the game for several hours and returned to main menu, Osman wonders about
the scores of other players and choses the high-scores option. Unfortunately, Osman is
second in the list, first one is a chinese boy who died while playing bomberman.
Figure 4.6 Sequence Diagram – See High Scores
24
After Osman choses the high-scores option in menu, menu screen informs the
GUI Manager about the High-Scores screen request. However, GUI Manager can
not create the screen by itselfs, it needs the data to be able to display the list.
GUI Manager takes the data from data manager, creates the screen using this
data and finally displays it on the screen.
25
26
4.2.1.6. Exploding a Bomb and Killing a Monster
In this scenario, Osman puts a bomb during the game. After the waiting time,
bomb explodes and it kills one monster. Also a liveBonus appears under the
brick.
27
28
Figure 4.7. Sequence Diagram – Exploding a bomb
At the beginning of this scenario, Osman push the put bomb button to the game
engine. Game Engine gets the location of the bomberman and creates a new
bomb object according to this location. Bomb would be created at the same
location with bomberman. After bomb has been created, it starts its own timer.
When its time expired, it send the explode message to the game engine. At this
level, game engine checks the collisions in the range of the bomb, by asking to
the game map. As it is seen above, after every collision check, it says to game
map what to do. For example; when the liveBonus appears under the brick, it
creates the bonus object and says game map to put that bonus object on the
map. It sends objects to the game map as parameter.
4.2.1.7.Getting Bonus – LiveBonus
In this scenario, Osman sees a bonus at two unit up of the bomberman, moves the
bomberman two unit up, and takes the lives bonus, and bomberman lives increased one.
29
Figure 4.8. Sequence Diagram – Getting LiveBonus
In this scenario player moves the bomberman to up two units, there have to be a checking
process of target coordination to see if there's a brick, wall, monster, bomb, bonus or a door.
To check the target coordination, game engine first needs the coordination of the
bomberman. Game engine takes the x and y coordinates of the bomberman one by one
(which are 23 and 12 in this case) interacting with bomberman object, decrement the
requested movement to this coordination (in this case, decreases Y coordination 1 unit) and
sends this information to game map. Game Map keeps the list of all the objects in the map
(according to their coordinates) in a 2 dimensional array and returns the object at the target
coordination to the game engine, which is a null. GameEngine set the bomberman one unit
up to GameMap. Player moves the bomberman one unit up again and same process to be
applied by GameEngine. This time GameMap returns the lives bonus to GameEngine then
GameEngine increases the lives of Bomberman object.
4.2.1.8. Getting Bonus – MultipleBomb Bonus
In this scenario, Osman sees a bonus at one unit right of the bomberman, moves the
bomberman one unit right, and takes the multiple bomb bonus, a time-limited bonus which
lets him to put unlimited number of bombs.
30
Figure 4.9. Sequence Diagram – Getting MultipleBomb Bonus
After Osman moves the bomberman to right one units, there have to be a checking process
of target coordination to see if there's a brick, wall, monster, bomb, bonus or a door. To
check the target coordination, game engine first needs the coordination of the bomberman.
Game engine takes the x and y coordinations of the bomberman one by one (which are 6
and 4 in this case) interacting with bomberman object, adds the requested movement to this
coordination (in this case, increases x coordination 1 unit) and sends this information to
game map. Game Map keeps the list of all the objects in the map (according to their
coordinations) in a 2 dimensional array and returns the object at the target coordination to
the game engine, which is a multipleBomb bonus. A time-limited bonus that allows
bomberman to put unlimited number of bombs. Since there aren't any objects that blocks
the way(wall, brick, bomb, monster) game engine updates the coordination of the
bomberman according to Osman's movement.
31
4.2.1.9. Getting Bonus – Speed Bonus
In this scenario, Memo sees one speed bonus one unit above. Moves Bomberman
one unit up and takes speedbonus and it's speed is doubled. This bonus has a time limit and
during that time Memo makes use of this bonus. And after the time expired bomberman's
speed decreases to it's normal value.
Figure 4.10. Sequence Diagram – Getting Speed Bonus
When bomberman tries to move up GameEngine takes X and Y coordinates of Bomberman
and checks if there is any obeject. It checks it from Gamemap using the coordinates of the
unit bombarman wants to move. In this case GameMap returns bonus1 which is
speedBonus. GameEngine destroy bonus1 before bomberman moves there. Then
bomberman moves up and takes bonus1. After he takes bonus1 a
Timer is created to keep the limit of speedBonus time. And then GameEngine increases
bomberman's speed. Until the time of speedBonus is expired bomberman moves faster.
When the time is up, timer gives a message to GameEngine indicating that time expired.
And then GameEngine destroys Timer and set Bomberman's speed as it's default speed.
32
4.2.1.10. Getting Bonus – FreezeMonster Bonus
In this scenarion Memo sees one freezeMonster bonus one unit above. Moves Bomberman
one unit up and takes freezeMonsterBonus. This bonus stops the monsters but it has a time
limit and after the time expired, monsters start to move as before.
Figure 4.11. Sequence Diagram – Getting FreezeMonster Bonus
When bomberman tries to move up GameEngine takes X and Y coordinates of bomberman
and checks if there is any obeject. It checks it from Gamemap using the coordinates of the
unit bombarman wants to move. In this case GameMap returns bonus3 which is
freezeMonsterBonus. GameEngine destroy bonus3 before bomberman moves there. Then
bomberman moves up and takes bonus3. After he takes bonus3 a
Timer is created to keep the limit of freezeMonsterBonus time. And then GameEngine sets
the speed of all monsters as "0". Until the time of freezeMonsterBonus is expired mosters
33
stops. When the time is up, timer gives a message to GameEngine indicating that the time
expired. And then GameEngine destroys Timer and sets Monsters' speed as their default
speed.
4.2.1.11. Getting Bonus – BombRange Bonus
In this scenario, Osman sees a bonus just one unit belov of bomberman, moves the
bomberman one unit down and takes the increase bomb range bonus, which increases the
range of the bombs that bomberman will put during current level.
Figure 4.12. Sequence Diagram – Getting BombRange Bonus
After Osman moves the bomberman to down one uni t, game engine takes x and
y coordinations of the bomberman one by one(in this case, 10 and 5), adds the
requested movement (decreases y coordinate 1 units) and sends this
coordination to game map. Game map checks requested coordination, and
informs the game engine that there is a increaseBombRange bonus at the target
location. Since bonuses doesn't block the way, game engine updates the
coordinations of the bomberman according to Osman's movement. Since there
34
was an increaseBombRange bonus, game engine inf orms the bomb object to
increase the range.
35
4.2.1.12. Bomberman Killed by a Monster
When Osman playing the game, he comes across with monster then monster kills the
bomberman. Then Osman continues the game because Bomberman has extra lives to go on
the game.
Figure 4.13. Sequence Diagram – Monster Kills Bomberman
In this sequence diagram, play moves the bomberman1 one step
right. GameEngine takes x and y coordinates of the bomberman1 one by one (in
36
this case, 12 and 26), adds the requested movement (increase X coordinate 1
unit) and sends this coordinate to GameMap. GameMap checks requested
coordination, and informs the game engine that there is a monster at the target
location. GameEngine gets the bomberman1 lives to determine the game is over
or not. Bomberman1 has 3 lives GameEngine decrease the lives and sets the
lives to bomberman1 then GameEngine takes the point of bomberman1 finally
destroy the bomberman1. After the destruction GameEngine check the
bomberman1 lives and decide to create bomberman1. Bomberman1 have 2 lives
and the game continues. GameEngine create a new bomberman2 object and set
lives and points to bomberman2 objects. After the creation, GameEngine set the
new bomberman2 to GameMap.
37
4.2.1.13.Pause Menu
Memo opens the game and passes all levels and in last level he kills all monsters and he is
one unit below of the door. He moves up and enters the door then he finishes the game but
he cannot make a high score.
Figure 4.14. Sequence Diagram – Pause Menu
Memo presses esc key and GameEngine pauses all the timers using a static utility of Timer
class. Gives a message to GUI Manager to create PauseMenuScreen. When
38
PauseMenuScreen is displayed he chooses Help button and GUI Manager creates and
displays HelpMenu then he clicks back button and GUI Manager destroys HelpMenu, and
then PauseMenu is displayed again. He clicks the Quit buton and GUI Manager creates and
displays a ConfirmationScreen and asks "Do you want to save your game?"
Memo clicks cancel from three buttons("yes", "no", "cancel") in order to turn back to
previous menu. GUI Manager destroys the confirmation screen and displays pause menu
again. Memo chooses resume button and GUI Manager destroys PauseMenuScreen.
GameEngine starts al timers again and the game is continued.
39
4.2.1.14. Game Over and High Score
In this scenario, a monster kills the bomberman. Because this was the last live of the
bomberman, the game is over. Osman is the new high scorer of the game.
Figure 4.15 Sequence Diagram – Game Over and High Score
40
In our game, just like bomberman, monsters also ask to game map for collusion
check in their all moves. This time game map returns bomberman to the
monster and bomberman died. Game Engine checks the lives of th e bomberman.
Because there is no more live, it destroy the bomberman and says GUI Manager
to create the game over screen. While Osman see the game over screen, game
engine asks to data manager that is osman a highscorer or not. After Data
Manager returns true, congratulations screen is created by the GUI Manager.
After this screen is destroyed, the highScorersScreen is created.
41
4.2.1.15. Complete Game
Memo opens the game and passes all levels and in last level he kills all monsters and now he
is one unit below of the door. He moves up and enters the door then he finishes the game
but he cannot make a high score.
Figure 4.16. Sequence Diagram – Complete Game
When bomberman tries to move up GameEngine takes X and Y coordinates of bomberman
and checks if there is any obeject. It checks it from Gamemap using the coordinates of the
unit bombarman wants to move. In this case GameMap returns door. Game Engine checks
the monster count from monster class (Monster class increases the monster count when a
monster crated, and decreases when one is killed). This time monster count is 0. this means
the door is open. Bombermans move up and game is completed. GameEngine gives a
42
message(gameFinished()) to GUI Manager indicating that game is completed successfully.
GUI Manager takes the total point from GameEngine. This case it returns 2500 (which is
calculated beforehand). GUI Manager asks DataManager if 2500 is a
highscore(isHighScore("Memo",2500)) and it returns false which shows that it is not a high
enough to enter highscrorerlist. GUIManager takes the highscorer list from DataManager;
creates and displays HighScorerScreen. Memo clicks quit button and GUIManager destroys
HighScorerScreen, and displays MainMenu.
43
4.2.2. Activity Diagram
The system of the activity diagram is a simple illustration of what happens in the work flow
and what activities can be done in parallel or not.
Figure 4.17. Activity Diagram of the System
In the game the system wait for the user input in any time, if the player presses direction
buttons, bomberman object moves if there is no obstacle, if not, the system check the
collision of the bomberman object with any object. If the obstacle is monster, bomberman
object is terminated and decremented the bomberman lives updated the map and checks
the bbomberman lives to determine the game is over or not if the bomberman lives is 0
44
game is over, if not, player restarted the game. If the obstacle is one of the bricks or walls it
returns to wait another input to process. If the obstacle is one of the bonuses, the system
determines which duty can be done. If the input is multiple bombs, bomberman can put
multiple bombs on the path. If the bonus is lives, bomerman lives is incremented once. If the
obstacle is level up door, system checks the number of monsters, if the number of monster
is zero player can pass the level, otherwise, game is continued. If the obstacle is freeze
bonus, all of the monsterin the game map is freeze. If the obstacle is move fast bonus,
bomberman can move fast on the game map path. If the obstacle is increase bomb range, all
of the range of bombs bomberman put is increased.
If the player wants to put bomb he/she press the bomb button, when the bomb
button pressed, bomberman drops the bomb and the time is count downed to explode the
bomb. After the time is up, bomb is exploded and system checks the bomb range to
determine if there is a collision to destroy objects. If bomberman is in the range, bomber is
terminated. If wall is in range nothing going to be happens and system wait for another
input. If monster is in range monster is destroyed and reduced the number of monsters then
updated the map. If bricks are in range, system destroys the bricks, updates the map and
checks bricks have bonus or not then updates the map.
If the player presses the esc button, a pause menu screen is emerged and pause menu
screen has save option, load option, language option and sound option then system wait for
user input. If the player selects save option, the game is saved. If the player selects load
option, game is loaded. If the player changes the language, system changes language and
wait for user input. If the player select sound option and want to change, the system change
the sounds. Finally, if the player selects quick option the game is finished.
45
4.2.3. State Diagrams
The UML state diagrams are directed graphs in which nodes denote states and connectors
denote state transitions
4.2.3.1. Bomberman
Figure 4.18. State Diagram of Bomberman
46
Bomberman has 8 states arised from bombermans three parameters: lives, speed,
multipleBomb. Initially bomberman 3 lives but if it is bombed or catched by a monster his
lives will be decremented by one. In the diagram below these two events are represented by
one word: "die". And also lives are incremented when player gets an extralifebonus.
However if your lives=3 it remains as it is. In addition if bomberman takes speedbonus it's
speed will be "2". It will stay 2 till the timer(time 1) of this bonus is expired. When it is
expired it will again be '1'. Also there is another bonus: MuiltipleBombBonus. when
bomberman takes it, the state of bomberman will change and it's boolean parameter
"multipleBomb"(which is initially "false") will be "true". This bonus will allow bomberman to
put multiple bombs until the time(time 2) of this bonus is expired. When it's time is expired
multipleBomb will again be "false". (Note: The abbriavetion are shown on the note below.)
47
4.3.Screen Mock-ups
Figure 1.23
Here, Bomberman is encountering two monsters of two types, red and blue monsters. Blue
monsters are the faster ones. They move faster than grey ones, but there is no grey monster
in this screen shot. Red monsters are the intelligent ones, they can chase Bomberman. This
screen shot is not from the earlier levels, because there are no high level monsters appear in
the first levels. Bomberman put a bomb next to a brick. The brick will explode and there
might be one of the 5 bonuses under it or maybe the exit door will appear. The walls won’t
explode since it is not a brick. Walls are fixed so they can’t be blown up by a bomb. The
bonus seen on the game is increaseBombRange bonus. When Bomberman collects it, his
bombs’ range will increase and therefore the possibility to kill the monsters will increase
accordingly.
48
Figure 1.24
In this screen-shot, Bomberman encounters two monsters; grey one and a blue one. Grey
one is ordinary, blue one moves faster. Bomberman blows up a brick, and that brick hides a
multipleBomb bonus. There were also another monster, but he killed the monster with the
bomb which is seen on the screen-shot. He already blew up the brick which hides the door.
But the door is closed since there are still monsters in the game.
49
Figure 1.25
When user first enters the game, he/she will see this main menu screen. The user has 4
options, starting a game, make some settings, get help and quit the game. Starting a game
brings two other options; either start a new game from first level or continue playing a saved
game. If settings is chosen, then the user is able to select between two languages, Turkish
and English. The game is in English as default but whenever the user wants, it can also be
Turkish. If help is chosen, then the instuctions and the goal of the game is displayed. So user
can get help when he/she does nor know what to do. Quit game option will terminate the
Bomberman.
50
Figure 1.26
After passing each level, the user will see a screen which shows his/her points and the total
score.
51
Figure 1.27
The user can see the list of high scores. The user can find his/her name in the list and see the
score.
52
5. CONCLUSION
Briefly, our project was the game "Bomberman" in which our hero tries to find a key by
killing all the monsters in the map using his bombs, and complete the level after passing the
door with the key. There are 3 different types of monster which have different colors and
skills: Gray Monsters(normal speed - not chasing), Blue Monsters(high speed - not chasing)
and Red Monsters(normal speed - chasing bomberman). There are undestructable walls and
destructable bricks which may have hidden bonuses inside. Bonuses appears when
bomberman crashes them with bombs and there are 6 types: speed increaser bonus,
increment bomb range bonus, freeze monster bonus, extra life bonus and multiple bomb
bonus. There are 10 levels which have different maps and different monster type
distributions(more skilled monsters in higher levels). Bomberman was a perfect game for
this course since the objects are obvious, the relationship between them is not too
complicated but at the same time it's not simple and forces us to think about object-
oriented concepts that we learn in the course.
In this analysis report, we aimed to prepare a consistent design of the game bomberman
which will guide us throughout all the steps of the project. For our design, we used various
UML Diagrams(use case diagrams, sequence diagrams, activity diagram, domain analysis
diagram) that we learned in the course. In the process of preparing UML diagrams, we used
Visual Paradigm which was a very useful and easy to understand software. Due to UML
Diagrams(and Visual Paradigm, of course) we could share information in a fast way and each
peer understood the work of each other easily since UML is common and not change from
person from person. An important point that we focused during the project design process
was trying not to think about implementation details of the game since it may lengthen the
design period too much by distracting our attention from design. Being aware of the fact
that many details may change in the next steps of the project, we only focused on the
general design of the game. In conclusion, we worked as a team to make a consistent design
of the game bomberman using UML Diagrams in this report, and it will be an important
guide throughout the project.