Pong game feedback

Hello! Once more, I’ve done another take home project. This time, it’s pong.

I’d love any suggestions on how to improve it!

1 Like

A cool project. Played it a bit; feeling a little dizzy from the bugginess of it, but functional — yes, FUNctional.

My suggestions:

  • A Start Page: When I landed on the site, I scrambled in panic for the arrow keys before realizing what was up. A simple start page with a start button and a short tutorial page would, I think, just add more class to the whole project.

  • Visual Accuracy: The animation of the ball bouncing off of the paddles is a bit off, IMO. Instead of bouncing straight off of the surface, the paddles kind of half-absorb the ball every time. The ball sort of sinks into the paddles before bouncing back and away. Apart from making me cringe thinking the ball is going to go through the paddle or something, it isn’t quite the accurate visualization of the idea of Pong. I hope this is an easy fix.

  • Bugginess: I’m sure you’re already aware of this yourself, and you did your best as it is, but the game, at least on my browser, is very glitchy. The paddles hop around and the ball is flickering like a dying monitor.

  • Make the Paddles Move Faster: Okay, maybe I’m just bad at Pong, but I do think I could’ve put up a better fight against the unbeatable AI with faster moving paddles. I think it would make the UX more engaging and exciting too. Perhaps there’s a standard speed for Pong paddles that I’m not aware of, but if there isn’t, I’d highly recommend turning that up.

Those are my thoughts. I’m still a novice in JS, so forgive me if I can’t give more feedback on your code. As it is, I’m impressed by your work.

Happy coding!

2 Likes

Nice work! I came here to give feedback but it is mostly covered by @nickrg’s comments.

Additionally, a pause button(and hot-key) could be really nice. It could help capture screencaps of some of the weird behavior too.

I found that the ball seems to go through my paddle, or seems to bounce off the back of it rather than the front, but seems to bounce off the front of the CPU’s paddle, maybe it is detecting the right edge of both.

It also seems to detect the top of the paddle a bit better than the bottom.

Good work though, cool project!

2 Likes

As somehow all things are covered in @nickrg comment and as @POSToakDev said all things are cover. But if I feel there is improvement scope I will definitely comeback and suggest some optimization !

I might try that, problem is, updating collision mechanics is kinda hard, as currently the paddle’s collider is actually on the back of it, and the ball’s collider is just a tiny dot at its center. Issue is, I can’t see the colliders myself, and it’s trial and error

As for the glitchy ball, it might just be that the game ticks once every 10 milliseconds. Might be too fast.

Thanks! I’ll fix that stuff soon

Alright! A pause button would, indeed, be a great idea

Both have been implemented!

1 Like

Excellent. You are very prompt. It works well now.

As for your other reply, I totally understand the difficulties. I don’t think it’s a huge deal.

And the glitchy ball - well, once in 10 milliseconds sounds slow to me. I think that’s what’s making it flicker - it’s updating the location slow enough to actually see it. I remember doing some animations in some Processing JS long ago and the standard animation rate was 60fps. But take everything I say with a grain - no, with a pound - of salt, as I am, once again, still quite the beginner.

Edit: upon researching frames and tick rates a bit, it turns out 60fps is actually slower than once in 10ms. My apologies - I learned something new today. So it turns out you were right, @c0d1ng_ma5ter - maybe it should be slowed down a bit, to 60fps or even lower. And keep in mind it may be Codpen’s fault too. Maybe they have a somewhat laggy frame refresh rate.

All in all, as long as your game has a consistent frame rate and it’s ticking just enough to be smooth and no more, I think it’s fine.

Amazing work.

1 Like

Just added the pause screen! It’s accesible with p

1 Like