Pong game with AI

I spent all day yesterday making a pong clone. It took all day because I added AI into it. The AI can predict where the ball will hit.

pong.html (2.1 MB)

Here is the source if you want to look at how it works:
pong.wick (68.9 KB)

10 Likes

i took your game and completely broke it to give me an unfair advantage against that robot. (that robot robot was too good) overall, a great game and was fun to mess it up :D

1 Like

Really awesome work! That Ai is pretty good!

The Pong game looks Amazing! Good job with coding the ball movement :+1:

Though, that “other moron” mode is really tough to beat…

Thanks for the feedback guys

I somehow got the ball in an infinite loop without me moving in impossible mode. After a minute or so it went so fast that the ball appeared to teleport from player one to player two. So I left the game running for hours because I predicted that the framerate would get slower the faster the ball is (because the ball checks more positions in between when moving faster so it doesn’t go through the paddles).

I think it’s been 4 hours and it’s running at around 25 FPS now

2 Likes

I love it!!! It is very responsive!

2 Likes

i modded the game changing the box and ball into cat vs dog pong Cat edition6-19-2021_15-59-04.wick (99.4 KB)

1 Like

Wow This is cool. I very like how the ai is Correcting him self over and over again this makes him better and more Human Like!

1 Like