-
-
Notifications
You must be signed in to change notification settings - Fork 110
feat: create a pong prototype #865
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
feat: create a pong prototype #865
Conversation
I would suggest taking a look at the current solution and seeing how they approached it. |
I've not scored against the computer paddle yet. I think we're good? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was able to test it out locally and play the game and here are my thoughts.
While I wasn't able to beat the computer, I feel like the computer motion is still to much. We should replicate the behavior found in the original demo project here. The original slightly adjusted its position when necessary whereas here I felt here it was constantly moving.
https://codepen.io/satyamdev/full/pdMmBp
Also we should have the ability for users to move the mouse to control the paddle like in the original. I wasn't able to do that here.
Another thing, the paddle should not be able to move completely off screen. In the original, you were able to move it partially off screen but not completely.
Lastly, there should be some better messaging for when the game resets. Right now the scores automatically reset when you click the reset button. But I feel like that could be easily missed. When I first clicked on the button I didn't notice that the game had reset but the paddle where still moving. A nicer user experience would be if there was some sort of modal that maybe asks if you are sure to reset the game. And if so, then they can start a new game or resume the one they have.
Hope all of that helps 👍🏾
Co-authored-by: Jessica Wilkins <[email protected]>
I'm still having trouble figuring out what you mean. I know there's a difference. But I see the computer paddle moving near constantly like mine. 2025-07-26.15-22-49-1.webm |
Here is what I am seeing between the current demo and your project. The current demo is smoother is more reactionary. Here is an example where I am completely still and the computer only moves slightly into position to beat me.It moves into place but its smooth. demo-project.movWhereas with yours, it is constantly moving up and down even when I am stationary. It seems more frantic than natural. Screen.Recording.2025-08-03.at.1.22.13.PM.movSo we want to incorperate some of that smoothess the original had. I would suggest reviewing the source code to see how they got it to be smoother. 👍🏾 Also, all of this will take a back seat for now until the TypeScript stuff is done 👍🏾 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I spent some time playing around with it and realized the ball speed was a little fast which made it seem like the paddles were moving frantically. So I slowed that down.
I also pushed up commits for the following:
- custom reset modal
- removed instances of var
- removed unused variables
Played the game for a while and I think it looks good. Thanks for all of your hard work on this. Let's merge it in 👍🏾
Checklist:
Update index.md
)Closes #790
My take on the project mostly works. The computer player's paddle goes up and down unnaturally; and I'm not quite so sure how to fix it.
Additionally the ball sometimes gets stuck on the paddle; thus causing a glitch where the player scores.