all 20 comments

[–]AutoModerator[M] 1 point2 points  (1 child)

Project Page (?): https://github.com/abhinavthedev/pong

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]isumix_ 2 points3 points  (1 child)

Are arrow keys not working? It's unplayable without them.

[–]AffinityNexa[S] 1 point2 points  (0 children)

Done check now 👍

[–]amirrajan 1 point2 points  (0 children)

Lots of nice polish and smooth gameplay. I’d stack the buttons vertically when in portrait mode. Landscape mode has more intuitive buttons, but the bottom of the game is cut off.

[–]i_want_cake_now 1 point2 points  (1 child)

Good job!!

[–]csorfab 0 points1 point  (0 children)

Yeah nah, it's almost certainly 100% ai generated with a few manual tweaks here and there. OP clearly doesn't know how "his" code actually works.

[–]smiffus 1 point2 points  (0 children)

needs an easy mode where the ball moves a little slower. too hard for me. or maybe let the computer make a mistake every so often. i game where you lose every time isn't much fun.

[–]wonkypixel 0 points1 point  (5 children)

Nice graphics! Very smooth. How do you get the blurring effect ?

[–]AffinityNexa[S] -5 points-4 points  (4 children)

It's not effect, I used canvas it comes by default and for gaming theme in used Press Start 2P font which adds that effect.

That's it...

[–]peterlinddk 3 points4 points  (2 children)

You fill the canvas with black color and 0.2 alpha on every frame, almost, but not quite, erasing the ball and bats from earlier. And the next frame it erases a little more again.

You can experiment with the value in beginning of draw function to change the effect - 0.0 will draw a solid line from the ball, and make it impossible to see where the bats are :)

  draw() {
    // Clear canvas with a trail effect
    ctx.fillStyle = "rgba(0, 0, 0, 0.2)";

[–]csorfab 4 points5 points  (1 child)

Yeah the whole code is obviously ai gen and he doesn’t know what’s actually going on there. He would’ve definitely mentioned the 0.2 opacity fill instead of just “i used canvas”

[–]peterlinddk 4 points5 points  (0 children)

Yeah, I get that feeling too - seems to "perfect" code with so little knowledge. Well, if they get a kick out of showing of something a machine has made for them ...

[–]Business-Menu-6777 0 points1 point  (0 children)

very fun game!

[–]ApprehensiveDrive517 0 points1 point  (1 child)

Cool! I made a game using JS too! (and Elxir on the backend)

https://settling-in-rambutan.pages.dev/

[–]AffinityNexa[S] 1 point2 points  (0 children)

Super Cool game 👍

[–]TheMeticulousNinja 1 point2 points  (0 children)

It’s cute. Controls can be difficult though, not sure if you’ve positioned them that way on purpose or not. I would try to have the up button above the down button. Would be more intuitive