1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 11:57:35 +00:00

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.
This commit is contained in:
Mim Hufford 2021-06-01 17:34:45 +01:00 committed by Linus Groh
parent 444fcfd0d2
commit 3f603ab082

View file

@ -77,7 +77,7 @@ private:
void reset()
{
x = game_width;
x = game_width + width;
gap_top_y = get_random_uniform(game_height - gap_height);
}