Skip to content

Ball speed calculation is wonky #5

@cogwheel

Description

@cogwheel

The ball moves a lot faster diagonally than orthogonally.

The ball_x_delta and ball_y_delta are both set to speed on game start. This means the actual distance covered per frame is sqrt(2) * speed.

When the ball hits a paddle, the ball delta perpendicular to the paddle is set to +/- speed. The ball delta parallel to the paddle is set to a value that only depends on where along the paddle the ball hit.

So after the first hit with the paddle, one component is always equal to speed and the other is unrelated to speed entirely.

This makes the movement erratic and unintuitive. Maybe should be a hard mode?

Metadata

Metadata

Assignees

No one assigned

    Labels

    polishMake something nicer to use or look at

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions