Share your repls and programming experiences

← Back to all posts
Pong in BASIC
AmazingMech2418 (939)

This is an attempt to recreate the classic game Pong with BASIC, the language (or at least another form of the language) used to create the original game! It is recommended to position everything so that the graphics section of the repl is the only thing you see (similar to in Snake in BASIC) in order for the start screen and ending screen to display correctly. However, this uses a custom scoring reading system that does not require the text feature (but requires many more lines of code), so if you are in the middle of the game, everything should display correctly. However, when it comes to the [SPACE TO PLAY AGAIN] on the ending screen, this will not work as of right now due to a bug in the CLC command. Remember that BASIC is still currently in Beta, so these bugs were likely expected by @amasad and his team that helped create this specific version of BASIC. However, @amasad , it would be great if you could fix this issue as soon as possible as well.

Commentshotnewtop
amasad (2647)

What's the CLC bug?

AmazingMech2418 (939)

@amasad When the CLC command runs, it will pop up an error. I think it has to do with text being on the screen and the way it clears the text. I'll send a screenshot once I see it again (I have to finish a game of Pong to see the screen and send a screenshot of the error). It says something like cannot use removeChild on undefined or something like that.

AmazingMech2418 (939)

@amasad This is what I see if on the ending screen, I press space.

I know it has something to do with the CLC command since, if I make the GOTO function go to the line after that, it won't pop up the error, but the text from the ending screen will still be there.

AmazingMech2418 (939)

@amasad Does this help? Also, thank you for working on fixing the bug!

amasad (2647)

It's amazing that you wrote an AI for it!