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

Paddle: add a little randomization in the dy speed #797

Merged
merged 1 commit into from
Dec 2, 2021

Conversation

NeroBurner
Copy link
Contributor

To make the game a bit more challenging an less predictable add a little
bit of randomness to the dy value. When hitting the right wall add a random
number (one of [-1, 0, 1]) to the dy value.

To keep the difficulty level managable limit the dy value to be in the
range from -5 to 5.

Tested on lv_simulation branch #743 not on actual hardware

src/displayapp/screens/Paddle.cpp Outdated Show resolved Hide resolved
To make the game a bit more challenging an less predictable add a little
bit of randomness to the `dy` value. When hitting the right wall add a random
number (one of [-1, 0, 1]) to the `dy` value.

To keep the difficulty level managable limit the dy value to be in the
range from -5 to 5.
Copy link
Member

@geekbozu geekbozu left a comment

Choose a reason for hiding this comment

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

...So this is why I'm bad at pong...the ball really does cheat...GAH!
PR works well :)
Thanks!

@geekbozu geekbozu added the enhancement Enhancement to an existing app/feature label Nov 1, 2021
@JF002 JF002 added this to the 1.8.0 milestone Dec 2, 2021
@JF002 JF002 merged commit 054a99c into InfiniTimeOrg:develop Dec 2, 2021
@NeroBurner NeroBurner deleted the paddle_add_randomness branch December 2, 2021 20:47
@Danimations
Copy link

Hey @NeroBurner , thanks for adding random ball speed changes. Would gradual increase of ball speed be practical to implement? And score retention/display between games? I actually made a few recommendations to improve the game and UX in an issue ticket I opened last week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement to an existing app/feature hacktoberfest-accepted
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants