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

Make this into a 2-player game #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Make this into a 2-player game #5

wants to merge 1 commit into from

Conversation

notfed
Copy link

@notfed notfed commented Jan 28, 2024

This adds a paddle on each side. The ball will
bounce off of the paddle as if the paddle were
slightly convex (otherwise the paddles wouldn't
be too useful.)

Control the paddles with:

  • Player 1, Up: Q
  • Player 1, Down: A
  • Player 2, Up: P
  • Player 2, Down: L

(There's no definition of victory yet, or points.)

This adds a paddle on each side. The ball will
bounce off of the paddle as if the paddle were
slightly convex (otherwise the paddles wouldn't
be too useful.)

Control the paddles with:

- Player 1, Up: Q
- Player 1, Down: A
- Player 2, Up: P
- Player 2, Down: L

(There's no definition of victory yet, or points.)
Copy link

vercel bot commented Jan 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
pong-wars ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 28, 2024 3:58am

@vnglst
Copy link
Owner

vnglst commented Jan 28, 2024

HI @notfed , thanks for the PR, I like the idea but I want to keep it simple. Feel free to create your own version though. I'll add a MIT license so you can do whatever you like with my code.

@lillianberryfly
Copy link

Bug report: balls can get stuck behind paddles.

Screenshot_20240128-102653.png

(yes, I know you can move the paddles, but my phone doesn't have a keyboard!)

@notfed
Copy link
Author

notfed commented Jan 29, 2024

HI @notfed , thanks for the PR, I like the idea but I want to keep it simple. Feel free to create your own version though. I'll add a MIT license so you can do whatever you like with my code.

I didn't expect a merge :) The code is pretty sloppy, I did it in <45mins. Just wanted to open a PR in case anyone else wanted to try it out

@knzcx
Copy link

knzcx commented Jan 30, 2024

https://github.com/vnglst/pong-wars/assets/77453174/1131402a-3db3-47d5-9bca-d597eb5a74c1
pongbug
Here is the bug in the desktop version :)

Edit: add preview gif

@SemajNevik
Copy link

SemajNevik commented Feb 2, 2024

Think the left hand paddle should be at x position 15 so that the front face is at x position 25, should stop ball getting stuck behind it. That way paddle position should match right hand one in that back face of paddle is 15 from the canvas edge.

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

Successfully merging this pull request may close these issues.

5 participants