-
-
Notifications
You must be signed in to change notification settings - Fork 978
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new game: bird and cactus #1791
base: main
Are you sure you want to change the base?
Conversation
Build checks have not completed. Possible reasons for this are:
|
Better name, please. |
cactusy bird?? |
The only name in the code is "Bird", right? |
Flappy Bird is a good name. But that's already taken. |
I might have an objection towards the scoring. Comparing the number of passed obstacles with other players might make more sense than number of seconds in-game. Although in the end this likely doesn't matter all that much. Could also improve performance, but that's just my guess. |
InfiniBird?? |
@Boteium Great job! This looks awesome, and yeah, the display is very smooth on the PineTime ! pt-bird-game.mp4Not sure when we'll be able to review this PR, but the result is really good! |
Updated to work on v1.14, available on my branch: https://github.com/JustScott/InfiniTime/tree/bird_app This game is challenging! |
ae6ddcc
to
3656446
Compare
Co-authored-by: JustScott <[email protected]>
@@ -383,6 +384,7 @@ list(APPEND SOURCE_FILES | |||
displayapp/screens/ApplicationList.cpp | |||
displayapp/screens/Notifications.cpp | |||
displayapp/screens/Twos.cpp | |||
displayapp/screens/Bird.cpp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was added two times.
#include "displayapp/screens/Paddle.h" | ||
#include "displayapp/screens/Bird.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate, see above.
pos += accel / 6; | ||
|
||
if (is_ascending) { | ||
if (accel >= -18) { | ||
accel -= 3; | ||
} | ||
} else { | ||
if (accel <= 42) { | ||
accel++; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as your other PR. I think adding variable names to the magic numbers would be a good idea.
// BIRD_X-CACTUS_WIDTH to BIRD_X+BIRD_SIZE | ||
if (90 < cactus_x && cactus_x < 130) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this more explicit with constexpr
.
#define BIRD_X 110 | ||
#define BIRD_SIZE 20 | ||
#define CACTUS_HEIGHT 160 | ||
#define CACTUS_WIDTH 30 | ||
#define CACTUS_GAP 80 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use constexpr
instead of the preprocessor.
I made a flappy bird clone.
It runs surprisingly smooth on the watch. Much smoother than InfiniSim.
bird.mp4