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

macOS: Calculation of velocity returns values near 0 #70

Open
chriz-zeller opened this issue Jun 19, 2018 · 0 comments
Open

macOS: Calculation of velocity returns values near 0 #70

chriz-zeller opened this issue Jun 19, 2018 · 0 comments
Labels

Comments

@chriz-zeller
Copy link
Contributor

This issue is generated to split #68 in which two problems were found while debugging.

The calculation of the velocity in Game.hs (line 519) returns invalid and very small values near 0.

@asandroq:

  1. Can you figure out, which part of the calculation makes the number nearly zero? That is, what are the values for refPosPaddle ci and p in each cycle?

  2. Besides, if I remember correctly your paddle is only for a very short moment in the middle of the screen (initPosPaddle) and then it immeadiatly goes to the left side of the screen. If you do not move the mouse, I think, it should stay in the middle of the screen (initPosPaddle = ((gameWidth - paddleWidth)/2, yPosPaddle)). Can you take a look what are the position values at the very first steps of the game.


Reminder for further consideration: In issue #68 the events LostFocus and GetFocus are mentioned. Maybe at a later time we should take a look whether this is related to this issue.

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

No branches or pull requests

1 participant