Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

new game: bird and cactus #1791

wants to merge 4 commits into from

Conversation

Boteium
Copy link

@Boteium Boteium commented Jul 3, 2023

I made a flappy bird clone.
It runs surprisingly smooth on the watch. Much smoother than InfiniSim.

bird.mp4

@github-actions
Copy link

github-actions bot commented Jul 3, 2023

Build checks have not completed. Possible reasons for this are:

  1. The checks need to be approved by a maintainer
  2. The branch has conflicts
  3. The firmware build has failed

@everypizza1
Copy link
Contributor

Better name, please.

@ProgramminCat
Copy link

cactusy bird??

@minacode
Copy link
Contributor

minacode commented Jul 6, 2023

The only name in the code is "Bird", right?

@Boteium
Copy link
Author

Boteium commented Jul 6, 2023

Flappy Bird is a good name. But that's already taken.
flappy-something-else is also very likely to be in the Google search result.
Maybe we should avoid the word "flappy" altogether.

@k8ieone
Copy link

k8ieone commented Jul 9, 2023

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.

@ProgramminCat
Copy link

InfiniBird??

@FintasticMan FintasticMan added the new app This thread is about a new app label Jul 13, 2023
@JF002
Copy link
Collaborator

JF002 commented Aug 6, 2023

@Boteium Great job! This looks awesome, and yeah, the display is very smooth on the PineTime !

pt-bird-game.mp4

Not sure when we'll be able to review this PR, but the result is really good!

@JustScott
Copy link
Contributor

Updated to work on v1.14, available on my branch: https://github.com/JustScott/InfiniTime/tree/bird_app

This game is challenging!

@Boteium Boteium force-pushed the bird branch 4 times, most recently from ae6ddcc to 3656446 Compare January 21, 2024 13:52
@@ -383,6 +384,7 @@ list(APPEND SOURCE_FILES
displayapp/screens/ApplicationList.cpp
displayapp/screens/Notifications.cpp
displayapp/screens/Twos.cpp
displayapp/screens/Bird.cpp
Copy link
Contributor

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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate, see above.

Comment on lines +63 to +71
pos += accel / 6;

if (is_ascending) {
if (accel >= -18) {
accel -= 3;
}
} else {
if (accel <= 42) {
accel++;
Copy link
Contributor

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.

Comment on lines +82 to +83
// BIRD_X-CACTUS_WIDTH to BIRD_X+BIRD_SIZE
if (90 < cactus_x && cactus_x < 130) {
Copy link
Contributor

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.

Comment on lines +9 to +13
#define BIRD_X 110
#define BIRD_SIZE 20
#define CACTUS_HEIGHT 160
#define CACTUS_WIDTH 30
#define CACTUS_GAP 80
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new app This thread is about a new app
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants