Share your repls and programming experiences

← Back to all posts
The Impossible Snake
sojs (601)

Hello everyone!
@sojs here.
I have made a snake game.. but not just any snake game...
This is a snake game where you have enemies. Their only job is to kill you. And they do it very well. I have never eaten more than 3 apples. Anyone who wins gets an upvote on there comment cuase its darned hard.

Each enemy is called a verminion. They will do everything that they can to destroy you. You can not run into them, so they will do their best to get in front of you and kill you. I have made 4 different AIs, and each vermion is assigned a different one. There can be duplicates.

Control your snake using WASD, don't hit walls, verminions, or yourself.

Get to adult size (1o apples) without dying, and you have won.

If you want to create your own AI, you can use the provided global variables:

If you want to create you own algorithm, you can use these. Create a function and return the targeted block. My own algorithms will calculate the path to it.

Best algorithms get mentioned. Comment them below!


Also I wanted to test out those two things so here they are. Scroll down to play.

Comments
hotnewtop
sojs (601)

Ya. I've only ever gotten 3 apples @ch1ck3n

sojs (601)

wow thats pretty good. I think my 3 was in a couple hundred hahaha (not really, but it was at least 50. @ch1ck3n

PYer (4035)

Just hit 6 on third try. The snakes seem to just run into me at certain points lol :)

sojs (601)

hmm. The AIs are randomly generated. Refresh and it might get harder. @PYer

SilvermoonCat (468)

huh? what color is what? which one is the apple ;-;

sojs (601)

The red one that doesn't move is the apple. The other ones try to eat [email protected]

QuickV (197)

Two more things: Maybe change the title of the game to "Impossible Snake" instead of "repl.it"... Also maybe make it so when you press space, you can skip the intro, instead of having to click many times.

sojs (601)

hm. Good idea. I might make a cookie or something so that it doesnt re-appear. @QuickV

QuickV (197)

Also could you make it so the end of the game is at a score of... 30, or like 50?... Or maybe 100.

I don't understand why people can't get 10... I mean it's not that hard ;-;.
sojs (601)

no idea how you got more than that! Quick fingers! @QuickV

QuickV (197)

Quick fingers is literally the reason I died at 25 lol @sojs

QuickV (197)

I could have gotten more, but I pressed up + left too fast, and it thought I pressed only left -_-... Well that was sad :(...

Also btw I played in the background after I hit 10, because when you click, it just refreshes the game :(...

Also could you fix it so that doesn't happen again -_-... It's extremely annoying because I could have gotten to 100 or maybe even more :(

Sadness...

sojs (601)

Okay, now the game stops and continues again when you click. when you press a key, you have to wait 300MS for the game to run antother tick, then you can press another [email protected]

QuickV (197)

oh ok :(... That explains why I lost when I pressed it too fast. @sojs

sojs (601)

ya. My advice is to wait until you are actually on the square, then press it. @QuickV

QuickV (197)

yay 5... I'll stop playing once I get 10..

This would be easier with arrow key controls :(

sojs (601)

They have been added. @QuickV

QuickV (197)

wait wat... I made an empty comment ;-; @QuickV

QuickV (197)

Is it invisible for you too? @JULIODIAZ1

JULIODIAZ1 (64)

no its just that it lags and pauses but i read the comments and its just coz i clicked ;-; @QuickV

QuickV (197)

Wait wdym "its just coz i clicked"... Could you re-explain lol... Just arrived back from a road trip @JULIODIAZ1

JULIODIAZ1 (64)

If you click the screen it pau1ses the game @QuickV

QuickV (197)

Man... Could have gotten four :(... That's annoying:

Also if you could add arrow key controls, that'd be cool!

GhostKing007 (155)

There are bugs in the game, but it is pretty cool. (GhostKing from discord btw)

sojs (601)

yup yup... I am trying to iron them out right now. @GhostKing007