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
commit 3f603ab082
Notes: sideshowbarker 2024-07-18 12:00:09 +09:00

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);
}