Skip to content
Sign upLog in
← Back to Community
Snake in BASIC
Profile icon
AmazingMech2418

Here is a game of Snake in BASIC! This is my first BASIC program (well, outside of my calculator at least with TI-BASIC and excluding Visual Basic (VB6 was my first programming language)). For maximum quality, I'd recommend positioning everything in the repl embedding so all you see is the BASIC graphics section. Unfortunately, BASIC does not yet support text with size relative to the size of the BASIC graphics section.

@amasad
, maybe something you could add? Also, maybe add a mouse position reading system for when it is not clicked as well? I think it would be great if I could change the color of the play button on hover. Also, currently, text displayed appears to block the click events for some reason, so try clicking just outside of the text in the play button to start. I hope you enjoy!

Voters
Profile icon
datboicatguy
Profile icon
Atias
Profile icon
BobTheTomatoPie
Profile icon
Jett05
Profile icon
amasad
Profile icon
Wilke000
Profile icon
BlueComet
Profile icon
ARJPEG
Profile icon
Roar123
Profile icon
AmazingMech2418
Comments
hotnewtop
Profile icon
Roar123

This is really smooth! Because the text is kind of buggy, why don't you have a click anywhere to start instead.

Profile icon
AmazingMech2418

@Roar123
Thank you! I honestly don't know though. I could do that, but I kind of wanted a play button to start.

Profile icon
Roar123

@AmazingMech2418
Sure but you've pointed out the clicking on the text doesn't work and it took me a minute of clicking to finally start the game. So if you could could make it less buggy that would be great!

Profile icon
AmazingMech2418

@Roar123
Yeah. Unfortunately, it is a Repl.it bug though, so I guess I could do a key to start or click anywhere to start, but that's still not exactly what I want for this repl. However, I could do something like that in the Pong repl I'm creating now.

Profile icon
Roar123

@AmazingMech2418
Ok I get it, but you should probably allow people the option to press enter or another key to start

Profile icon
BlueComet

This is really nice super smooth.Great job!

Profile icon
AmazingMech2418

@iterate
Thank you!

Profile icon
BlueComet

@AmazingMech2418
do you know why you can't click play and have to click next to it

Profile icon
AmazingMech2418

@iterate
I think it has to do with the layering in the rendering of the BASIC graphics. I think that since the text is on top of the grid system, if the click event is based on the grid system instead of the window, it will not register. However, I'm not completely sure and hopefully,
@amasad
can fix it soon.

Profile icon
Rileymabb

You use Ti-Basic too!? I used to use TI-baisc until I learned a more advanced language.

Profile icon
AmazingMech2418

@Rileymabb
Well, I just used TI-BASIC to create some basic programs to automatically plug in values into equations on my calculator to get my homework done faster. LOL! I also tried to do a pong game on it, but never had the time.

Profile icon
Rileymabb

@AmazingMech2418
Yeah, learning BASIC makes it easier to understand programming concepts

Profile icon
[deleted]

Good job!

Profile icon
AmazingMech2418

@FunnyLamma
Thank you!

Profile icon
marryjonathan

BASIC does not yet support text with size relative to the size of the BASIC graphics section.Snake is a fun game to make as it doesn't require a lot of code Educational videos play an essential role in this new trend. read this article, today, I will show you some of the best sites for free educational videos that you can use to learn more about multiple disciplines and subjects.

Profile icon
nN34398Ff

uhhhh

![Screenshot 2020-04-27 at 9.27.29 PM(https://storage.googleapis.com/replit/images/1588037269489_39f7b0c353ffb4083cc13fe3acd7e9af.png)
that's kinda weird

Profile icon
AmazingMech2418

@nN34398Ff
That is weird. It might be that it spawned the "apple" off the grid, but it shouldn't do that...

Profile icon
AmazingMech2418

@nN34398Ff
Fixed!

Profile icon
ImmortalFlash

My High Score:
14

Profile icon
Wilke000

How do u turn

@AmazingMech2418
?

Profile icon
Wilke000

Nevermind I got it WASD

Profile icon
ImmortalFlash

My first tiem trying it out, I thing its great!

Profile icon
AmazingMech2418

@ImmortalFlash
Thank you!