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

fix: rebalance pong game to larger and small resolutions #57

Open
6 tasks
RodrigoDornelles opened this issue Aug 27, 2024 · 0 comments
Open
6 tasks

fix: rebalance pong game to larger and small resolutions #57

RodrigoDornelles opened this issue Aug 27, 2024 · 0 comments
Labels
good first issue good first issue for begginers

Comments

@RodrigoDornelles
Copy link
Member

RodrigoDornelles commented Aug 27, 2024

  • game.ball_size = ((game.width*game.height) ^ 0.5) / 80
  • game.player_size = std.math.min(game.width, game.height) / 8
  • game.ball_spd_x = game.width*0.0006
  • game.ball_spd_y = game.height*0.0003
  • game.player_pos = std.math.clamp(game.player_pos + (game.player_dir * game.ball_size), 0, game.height - game.player_size)
  • std.draw.rect(0, game.ball_size, game.player_pos, game.ball_size, game.player_size)

related #56

@RodrigoDornelles RodrigoDornelles added the good first issue good first issue for begginers label Aug 27, 2024
@RodrigoDornelles RodrigoDornelles changed the title fix: rebalance pong game fix: rebalance pong game to larger and small resolutions Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue good first issue for begginers
Projects
None yet
Development

No branches or pull requests

1 participant