Please enable JavaScript.
Coggle requires JavaScript to display documents.
Version 4 of Dodger Game (Functions (Levels (Level 3 (Ball speed = fast,…
Version 4 of Dodger Game
Functions
Levels
Level 3
Ball speed = fast
Hard difficulty
Mountain setting background
Level 2
Ball speed = average
Medium difficulty
City setting background
Level 1
Ball speed = slow
Easy difficulty
Beach setting background
Lives
If Level 3
Lives = 1
If Level 1 Or Level 2
Lives = 3
Start button
If clicked
Load Active Game GUI
Load level
Load score
Load lives
Load ball objects
Load player
Start game
Stop button
If clicked
Display "
Username
Stopped the Game!" + "Your score was
Score
"
Remove level
Remove score
Remove lives
Remove ball objects
Remove player
Load Main Menu GUI
Run high score function
Username input
Textbox input
Accept if validated
Else display "Please enter a valid username"
High Score
If Score > Highscore
Highscore = Score
Score
Events
If lives = 0
Remove level
Display main menu GUI
Display “Game Over
Username
!” + “Your score was
Score
”
Run high score function
Remove score
Remove lives
Remove ball objects
Remove player
If ball hits ground
Remove ball
Add 1 to score
If ball hits player
Remove ball
Remove 1 life
Move player
Left arrow key pressed
Player moves left
Right arrow key pressed
Player moves right
GUI
Game Active
Lives
Score
Stop button
Main Menu
Display controls
Start button
Levels
Username input
Highscore + Level
Screen Size
Prompt user to enter the size of their screen
Validate input
Display game in input area
Load main menu GUI
Objects
Player
Size
Move speed (left/right)
Ball
Fall speed
Colour
Diameter
Setup
Background
Create canvas
Load screen size GUI