Skip to content

decrease power of jump if user clicks fast enough #21

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

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

Conversation

nad2040
Copy link
Contributor

@nad2040 nad2040 commented Nov 18, 2022

Currently it sets the jump power to 95% of what it was if the user clicks within 20 frames.
Otherwise it resets the jump power to normal_jump_power

I left my old 20 frame jump prevention system so its easy to switch back to if we don't like this new method.
Honestly, I don't really like it. Maybe the numbers need to be tweaked, but it doesn't feel right.

Issue #19

Comment on lines 43 to 54
# set the jump timer to 0 if negative so number doesn't underflow after a long time
# self.jump_timer = max(self.jump_timer - frame_diff, 0)
# if self.jump_timer > 0:
# # print(self.jump_timer)
# self.jump_timer -= 1
# return
# else:
# # print(self.jump_timer)
# # (n = 20) frames
# self.jump_timer = 20
# self.y_velo = self.jump_power
# return
Copy link
Member

Choose a reason for hiding this comment

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

nit: remove commented code, or uncomment it

@nad2040
Copy link
Contributor Author

nad2040 commented Nov 18, 2022

How does the decreasing jumping power affect the feeling of the gameplay? I don't like it and would rather keep the old system. Or we could continue tweaking the numbers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants