summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMim Hufford <mim@hotmail.co.uk>2021-06-01 17:34:45 +0100
committerLinus Groh <mail@linusgroh.de>2021-06-20 10:54:27 +0100
commit3f603ab0828a8e80990c38cf0845e67a2d443943 (patch)
treea489e3fd17629267cc6b45adaea25f507de4f03d
parent444fcfd0d2f3916165ceeab2aaa4a3012af25042 (diff)
downloadserenity-3f603ab0828a8e80990c38cf0845e67a2d443943.zip
FlappyBug: Start obstacles off the screen
Previously obstacles were respawning fully on-screen which caused a discontinuous look. Now they smoothly move into view from off-screen.
-rw-r--r--Userland/Games/FlappyBug/Game.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Games/FlappyBug/Game.h b/Userland/Games/FlappyBug/Game.h
index 936ebd9be8..ad0d20fa39 100644
--- a/Userland/Games/FlappyBug/Game.h
+++ b/Userland/Games/FlappyBug/Game.h
@@ -77,7 +77,7 @@ private:
void reset()
{
- x = game_width;
+ x = game_width + width;
gap_top_y = get_random_uniform(game_height - gap_height);
}