creator1creeper1
615c2cbcce
FlappyBug: Make bitmap() methods return NonnullRefPtrs
...
We are already storing these as NonnullRefPtrs, so we might
as well make the functions return them as such.
2021-12-23 17:42:05 -08:00
creator1creeper1
6f592a32cc
FlappyBug: Propagate errors in Cloud class
...
Move-construct Cloud into the Game class to improve
error handling.
2021-12-23 17:42:05 -08:00
creator1creeper1
ff359c27e3
FlappyBug: Propagate errors in Bug class
...
Move-construct Bug into the Game class to improve
error handling.
2021-12-23 17:42:05 -08:00
creator1creeper1
a67afa735c
FlappyBug: Reposition Game constructor in file
...
This will become important later on because
the constructor will depend on the helper structs
2021-12-23 17:42:05 -08:00
creator1creeper1
81eb450369
FlappyBug: Make helper structs public
...
They will need to be referenced by main later on.
2021-12-23 17:42:05 -08:00
Pedro Pereira
913b1fad25
FlappyBug: Support mouse clicks for flapping
...
This change allows to play the game using the mouse.
2021-11-24 21:18:31 -08:00
Andreas Kling
235f39e449
LibGfx: Use ErrorOr<T> for Bitmap::try_load_from_file()
...
This was used in a lot of places, so this patch makes liberal use of
ErrorOr<T>::release_value_but_fixme_should_propagate_errors().
2021-11-08 00:35:27 +01:00
Mitchel Humpherys
2fb26299bb
FlappyBug: Flap less aggressively
...
The current flap strength makes the game a lot more difficult than
other flappy games. Decrease the flap strength to make it a little
easier to get higher scores.
Before this change I could only get past 3 or 4 obstacles, now I can
get 15 or 20 in, which seems more on par with other flappy games.
2021-08-21 00:25:43 +02:00
Andreas Kling
c7d891765c
LibGfx: Use "try_" prefix for static factory functions
...
Also mark them as [[nodiscard]].
2021-07-21 18:02:15 +02:00
Timothy Flynn
dd65f52331
FlappyBug: Only paint areas which need to be painted
...
Drawing the entire PNG background is rather expensive. Instead, only
draw the rects that are updating.
2021-07-10 23:28:20 +02:00
Timothy Flynn
675b8ba995
FlappyBug: Standardize on "high score" rather than "highscore"
...
"High score" should be two words, and this matches other games in the
system.
2021-06-22 23:05:10 +02:00
Timothy Flynn
1a2053781f
FlappyBug: Persist high score to disk
...
Previously, the high score was only in-memory, so only persisted for as
long as the FlappyBug window was open.
2021-06-22 23:05:10 +02:00
Timothy Flynn
25c53e35e7
FlappyBug: Convert the main game widget to a GUI::Frame
2021-06-22 23:05:10 +02:00
Mim Hufford
ddc855ffcd
FlappyBug: Add cloud and sky graphics
...
We now have a nice sunset sky and some random cloud graphics.
The obstacles will get graphics at some point too :)
2021-06-20 10:54:27 +01:00
Mim Hufford
28e08f08c2
FlappyBug: Add new graphics and tweak colors
...
This adds some actual graphics to the game, and tweaks the obstacle and
sky colors. Eventually there will be graphics for those elements too.
2021-06-20 10:54:27 +01:00
Mim Hufford
f50003bdd2
FlappyBug: Add an input cooldown after game over
...
This makes sure the player doesn't accidentally start a new game after
they bump into an obstacle.
2021-06-20 10:54:27 +01:00
Mim Hufford
018344bb07
FlappyBug: Keep track of score and highscore
...
Better information is now shown to the player. Instructions are shown
when first loading the program, and any available scores are shown on
the game over screen.
2021-06-20 10:54:27 +01:00
Mim Hufford
3f603ab082
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.
2021-06-20 10:54:27 +01:00
Mim Hufford
444fcfd0d2
FlappyBug: Make the obstacle gap position random
...
The position of the gap in the obstacle is now randomly generated each
time it spawns. The game is more fun to play now :)
2021-06-20 10:54:27 +01:00
Mim Hufford
811d9722f9
FlappyBug: Introduce a new Flappy Bug game
...
This introduces a Flappy Bug game. It's pretty simple currently, but is
playable.
2021-06-20 10:54:27 +01:00