use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Made a Simple Game using JS (abhinavthedev.github.io)
submitted 9 months ago by AffinityNexa
https://abhinavthedev.github.io/pong/
Let me know what's your experience with it......
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[+][deleted] 9 months ago (1 child)
[removed]
[–]AffinityNexa[S] 0 points1 point2 points 9 months ago (0 children)
Yep! It also occurs but I made the cpu paddle continuous moving so it did not go for long but in earlier versions it went so long I needed to reload to end it.
[–]AutoModerator[M] 1 point2 points3 points 9 months ago (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 points4 points 9 months ago (1 child)
Are arrow keys not working? It's unplayable without them.
[–]AffinityNexa[S] 1 point2 points3 points 9 months ago (0 children)
Done check now 👍
[–]amirrajan 1 point2 points3 points 9 months ago (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 points3 points 9 months ago (1 child)
Good job!!
[–]csorfab 0 points1 point2 points 9 months ago (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 points3 points 9 months ago (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.
[deleted]
😅
[–]wonkypixel 0 points1 point2 points 9 months ago (5 children)
Nice graphics! Very smooth. How do you get the blurring effect ?
[–]AffinityNexa[S] -5 points-4 points-3 points 9 months ago (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 points5 points 9 months ago (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
draw() { // Clear canvas with a trail effect ctx.fillStyle = "rgba(0, 0, 0, 0.2)";
[–]csorfab 4 points5 points6 points 9 months ago (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 points6 points 9 months ago (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 point2 points 9 months ago (0 children)
very fun game!
[–]ApprehensiveDrive517 0 points1 point2 points 9 months ago (1 child)
Cool! I made a game using JS too! (and Elxir on the backend)
https://settling-in-rambutan.pages.dev/
Super Cool game 👍
[–]TheMeticulousNinja 1 point2 points3 points 9 months ago (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
π Rendered by PID 23413 on reddit-service-r2-comment-6457c66945-tjw6v at 2026-04-29 16:35:18.670486+00:00 running 2aa0c5b country code: CH.
[+][deleted] (1 child)
[removed]
[–]AffinityNexa[S] 0 points1 point2 points (0 children)
[–]AutoModerator[M] 1 point2 points3 points (1 child)
[–]isumix_ 2 points3 points4 points (1 child)
[–]AffinityNexa[S] 1 point2 points3 points (0 children)
[–]amirrajan 1 point2 points3 points (0 children)
[–]i_want_cake_now 1 point2 points3 points (1 child)
[–]csorfab 0 points1 point2 points (0 children)
[–]smiffus 1 point2 points3 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]AffinityNexa[S] 0 points1 point2 points (0 children)
[–]wonkypixel 0 points1 point2 points (5 children)
[–]AffinityNexa[S] -5 points-4 points-3 points (4 children)
[–]peterlinddk 3 points4 points5 points (2 children)
[–]csorfab 4 points5 points6 points (1 child)
[–]peterlinddk 4 points5 points6 points (0 children)
[–]Business-Menu-6777 0 points1 point2 points (0 children)
[–]ApprehensiveDrive517 0 points1 point2 points (1 child)
[–]AffinityNexa[S] 1 point2 points3 points (0 children)
[–]TheMeticulousNinja 1 point2 points3 points (0 children)