Skip to content

Calculate ball direction depending on the position it bounces on the paddle. #22

@karate

Description

@karate

At the moment, the ball direction is either right or left. The angle of the ball is always 45 or -45 degrees (or 135/-135 when moving left). This makes the game predictable.

I'm under the impression that in the original pong game, the actual direction of the ball depended in the position that the ball bounced on the paddle: when the ball touched the end of the paddle, it bounced at a larger angle.

This adds an extra level of complexity to the game. A player may risk to hit the ball with the edge of the paddle, making the ball bounce at a larger angle, and thus making it more difficult for the opponent to catch it.

Here's an example implemented in JS:
https://gamedev.stackexchange.com/questions/4253/in-pong-how-do-you-calculate-the-balls-direction-when-it-bounces-off-the-paddl

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions