Share your repls and programming experiences

← Back to all posts
💻💻 PONG with UNBEATABLE BOT 💻💻
SwaroopBappanad (243)

Hey guys! I spent a day (most of it when I was supposed to be doing schoolwork lol) making this, and I put a LOT of effort into it. Normally, I would fine tune it to make it look good and stuff, but I'm honestly dead at this point.

It's basically you vs an AI that knows your every move. I tried to make it as original as possible, but I also thought I should add a bit of originality into it. It has no point system, but again, it's hard to criticize a dead man.

Bottom line, it's trash. I really don't care anymore, but I know that this is the best of my ability, so give me a break. I'm not Sundar Pichai or @Coder100. If on the rare occasion that you do enjoy it, please upvote! I poured a lot of time and effort into this, and I would really appreciate it.

P.S. Press the up arrow to move up, and the down arrow to move down.

Credits:
1. Me, obviously
2. Coder100, for the 'w' and 'a' functionality ideas, plus the idea of a score system
3. ridark, for the idea of showing your score when you lose
4. GeditEdger, for the idea of pressing 'r' to restart
5. Everybody else, who gave so much support for this project. Merry Christmas!

Comments
hotnewtop
SwaroopBappanad (243)

@TalinSharma whooopeeeeeeeeeeeeeeeeeeeeeee

SwaroopBappanad (243)

@WILLIAMBAEWER ....God....Talk about dedicated.....

ShivaSubraman (11)

@HDFuzy How did you do that?! My high score is 6

JKE010 (23)

@HDFuzy
Foolish mortals, all of you behold MY power.

SwaroopBappanad (243)

@JKE010 How have I not disintegrated yet, beholding your power and all.

JKE010 (23)

i-
i've been outplayed.
I can't come back from this.
@HimanshuShekha4

JKE010 (23)

I dunno man, it's a lotta power. 137 units of power, to be accurate. @SwaroopBappanad

HimanshuShekha4 (46)

@JKE010 did you looked at my score carefully is'nt there something suspecious in it ??

JKE010 (23)

No, no, I don't think so. Obviously all scores are black, out of place, and in italics.
@HimanshuShekha4

SwaroopBappanad (243)

@srsly What? No, that's obviously real.

JKE010 (23)

@srsly yeah dude, don't get salty just cause YOU couldn't get 900000000000.

msgaalex (34)

@JKE010 Can you beat this??!

#DedicationSquad

Trex10 (5)

@msgaalex
did you do glitch thing where it switches between only 2 shots?

SwaroopBappanad (243)

@Trex10 Honestly idk how to fix that. Ppl keep thinking I preprogrammed the moves, but ig the collision system is somewhat flawed.

msgaalex (34)

@Trex10 idk what you're talking about

JKE010 (23)

bet. wait, just wait. @msgaalex

SwaroopBappanad (243)

@albertlu2 lol nice try but I see the different font lmao

JKE010 (23)

yeah that's 100% fake. ~2.4 million? Nah. @albertlu2

SwaroopBappanad (243)

@albertlu2 That's not how HTML works lmao

msgaalex (34)

@HDFuzy did you change the code to say that??

firefish (930)

Why I am a so overjoyed to get a score greater than 2?

JBloves27 (1504)

Pretty cool! ...the AI is flippin cheating I love the AI! XD

clancastor05 (2)

You underate your own project. As a game is not SO fantastic but is fun to see how Pong is in reallity. Pong is a mistake game, the winner is the one who commits less mistakes. This bot only foccus on surviving, not beating you. At one point, I managed to enter in a loop where I don't move and the bot react in such a manner that I don't lose (infinite score xd). Upvoted! Good job.

badst (667)

All it does is follow the Y cord of the ball. This is not AI as you give the Y cord so all it does is follow it.

SwaroopBappanad (243)

@pepelaugh Read the comments above (or below idk), I needed a catchy title

badst (667)

@SwaroopBappanad well, it's not an AI so rename it like "follow bot" or something like that.

SwaroopBappanad (243)

@pepelaugh Honestly, everything else in the title is genuine. If it bothers you THAT much, I'll change the title to "bot."

[deleted]

@SwaroopBappanad - Its not that hard too. I made it less than an hour and I'm not that good. Its just pong with the y of the computer as the y of the ball. Not hating, just stating facts, don't take offense :)

HimanshuShekha4 (46)

@pepelaugh chill dude nothings an AI in that way ..... it is technically an AI

HEMLANU (181)

i like very much this program

HEMLANU (181)

i am asking you only have you beat this i tried 110000 time but i got till 50 only

HEMLANU (181)

but good you have made very very good

SwaroopBappanad (243)

@HEMLANU It was designed to be hard!

GeumjuKim (18)

someone make a battle of bots - (one pong bot on one side, one on the other. That would be something satisfying to watch.)

MahdiKouroughli (1)

My power is too strong.
h e l p m e

MahdiKouroughli (1)

@SwaroopBappanad just change how much points you get per block or change what the starting score is.

SwaroopBappanad (243)

@UwaiseNoorani1 lol don't look at the console! That undefined stuff was for testing values! (press up and down arrows, or 'w' and 'a' keys)

MrH0lmes (1)

extraordinary job, sir! congratulations!

TalinSharma (73)

🤯

Is it okay if I fork it to make it look better and such?

Thanks

Mind Blown!

POG

SwaroopBappanad (243)

@TalinSharma Yeah sure! Isn't that what coding is all about? Consistently improving and maximizing code? Anyway, thanks!

Noahloader12 (9)

whaaat you like legend of zelddaaaaa

SwaroopBappanad (243)

@Noahloader12 Yes. Yes I do. BOTW is a pretty good game.

DungeonMaster00 (170)

@SwaroopBappanad have you played the new hyrule warriors game

SwaroopBappanad (243)

@DungeonMaster00 No, I haven't, although I heard it's a completely new timeline.

DungeonMaster00 (170)

@SwaroopBappanad it is basically the events of the reat calamity

also, in breath of the wild, i like to take pictures of monster faces, mostly bokoblins and moblins

SwaroopBappanad (243)

@DungeonMaster00 But don't the champions survive this time?

SwaroopBappanad (243)

@DungeonMaster00 I got BOTW as a present couple days ago, and moblins are currently the bane of my existence.

DungeonMaster00 (170)

@SwaroopBappanad i got the game a couple years ago and i feel like getting 100%

SwaroopBappanad (243)

@DungeonMaster00 Thats gonna be so hard (cuz koroks are a thing)

SwaroopBappanad (243)

@DungeonMaster00 Koroks make the game better and worse at the same time.

DungeonMaster00 (170)

@SwaroopBappanad oh i forgot about them; there are about 900 koroks in the game

SwaroopBappanad (243)

@DungeonMaster00 Yeah, and that's why I'm never even gonna think about 100%ing the game.

M07 (2)

@SwaroopBappanad I wholeheartedly agree with you

M07 (2)

Fun fact: that was my first comment ever here (repl.it)

SwaroopBappanad (243)

@M07 The start of a very fun journey.

JKE010 (23)

oh snap, I recognized your pfp but I didn't know you were a BOTW fan, lol. Am I the only one who still can't beat a lynel with full armor because they're scary- @SwaroopBappanad

SwaroopBappanad (243)

@JKE010 I just beat Vah Ruta, Tried the lynel out and immediately got incinerated

JKE010 (23)

pain. I've got all divine beasts (thunderblight was hell) i'm just too scared to fight ganon lol. @SwaroopBappanad

SwaroopBappanad (243)

@JKE010 Honestly I think golden lynels are scarier than ganon

SwaroopBappanad (243)

@JKE010 Or just any lynel in general, really (I SWEAR THAT'S NOT RACISM)

JKE010 (23)

hmmm, respect the lynels. #LynelLivesMatter
Wait, they try to kill us, their lives don't really matter.
Anyways, I reseted my save file, because I hadn't played the game in like a year so I wanted to start fresh.
@SwaroopBappanad

Noahloader12 (9)

@SwaroopBappanad I am a big zelda fan too i havent tried the new game but i like botw though it is my favorite game ever

p.s. I finished all the shrines 4 days ago.

DarkTheif (0)

My totally real score not fake AT ALL!!

ColinEdwardEdwa (1)

I just hit 1000 points and I think I broke it, the score isn't going up anymore.

SwaroopBappanad (243)

@ColinEdwardEdwa oh it is, you just can't see it

ColinEdwardEdwa (1)

I havent beat the bot, but this is as close as you can get

ColinEdwardEdwa (1)

I've got mine into a infinite loop, so I have infinite points

TheJamCoder (11)

@SwaroopBappanad- When I press r it doesn't reset you might fix that error

[deleted]

I am the inevitable -


SwaroopBappanad (243)

@daksheshdorala oH mY gOd yOuR aN aBsOlUtE bEaSt

DarkswordsmanJG (43)

You should make the ball go faster every score of 10. Cool game though

[deleted]

Nice Game! My highest score was 6 lol

EliasTheGreat (39)

it's really cool but there is no sensor on the wall on the A.I's side (no need since it's unbeatable but...)

RayvelArjoon (86)

This is well made. It just needs a tuneup on the physics. The ball doesn't bounce using proper arcade physics. It sometimes bounces in the opposite direction that it should. The angle of impact should be equal to the angle that it leaves at. The center angle should then add to 180. This isn't true for 95% of the bounces.

SwaroopBappanad (243)

@RayvelArjoon It's pretty hard, but I'm studying up on physics and trig to get more accurate physics next time!

mrhappyma (0)

https://uc3d7404052890fc279adf7c2576.previews.dropboxusercontent.com/p/thumb/ABDZf4yIx3ZQKEVJzN4rEFSr4o8JXncde_ZB_d7DLoe9TtRUIjuWQVWJ4UyDsTaix6zBG3lh_XEkTWwu1-X0tep5d6TsM0FojqhC9Faea4giGEDPthaL0UJKMxO2bU4k7jQJwoGf8mcl7mKlH_MKCE3j9BUC4kND-F1T3klh2j6GCiKtsEH--cKo2NaumCTSVPv8V1Ln63RDS6MnbSR-WiDnw2mNg3JpP128mEHNsp7He0GEO75jjcn3sUfZD8djZ49Q-BpZd1s4K_hQAjlnf4d1MRzmHOmi5HV-SmSzAY5MO4hmVTTMYdtdegOCxdsOTAewPobOQO-po9wlqwGfd_GTHBmuNK6LsXL019U0mXKlDPI2-hIyn2yPo2ICYC8ZtMMEh4Woi3V0gfnC1bm8CwsW/p.png?fv_content=true&size_mode=5 I WIN