Share your repls and programming experiences

← Back to all posts
Meet With Pong - For about:you challenge
h
clay53 (6)

I made Meet With Pong in 2 days using only the repl.it IDE, ExpressJS, NodeJS, HTML, CSS, p5.js, and socket.io for the repl.it <about:you> Hackathon. You can either play the game with a real player by filling out the input fields for basic information (information is only stored in memory and never logged) and hitting "play live". Once you join the queue, the next player to join the queue will be automatically put into a game with you. You can also choose to play me to push further the about:me part of this project and you'll be put straight into a game with a bot preloaded with my information (Don't worry, the bot's not too hard - practice makes perfect!). Every time a player scores, information is revealed about the opponent. Once both player's information is revealed, the game ends and now both players have met a new person through a game of pong :D.

A YouTube video on the game will be available here: https://youtu.be/fs68R0u_2gs

Thank you for your time!

Commentshotnewtop
generationXcode (256)

Hi, its a bit tough to play the game, the bar takes some time to move... Otherwise its awesome

clay53 (6)

@generationXcode Like, input delay or it's just slow? I may be able to fix some of the input delay if that's the problem. If the bar is just slow, I'll try to do some playtesting to find a better speed.

MrEconomical (2188)

bot that plays this game:

let bdir = 1
socket.on("game info", msg => {
    if (msg.ballY > msg.user1Pos && bdir != 1) {
        bdir = 1
        socket.emit("move dir", bdir)
    } else if (msg.ballY < msg.user1Pos && bdir != -1) {
        bdir = -1
        socket.emit("move dir", bdir)
    }
})
clay53 (6)

@MrEconomical Bruh, did that already for testing but cool. Yours was more efficient I just did:

setInterval({socket.emit("move dir", (ballY < user1Pos+1 && ballY > user1Pos-1 ? 0 : (ballY > user2Pos ? 1 : -1)))}, 1000/61);
clay53 (6)

@MrEconomical Also like, don't use it on new players, please.