Skip to content

macOS: Calculation of velocity returns values near 0 #70

@chriz-zeller

Description

@chriz-zeller

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions