Skip to content
Sign upLog in
← Back to Community

Check Out My Snake Game In Python

Profile icon
Glare

Took me a while to create this. Click on the game once and then use the arrow keys to move. Every time you eat an apple, your snake grows in length. If you hit the wall or if the head of your snake hits any part of the body, the game ends. Hope you guys enjoy!

Voters
Profile icon
Hawee
Profile icon
JoshA6
Profile icon
notlc
Profile icon
Dukdukduk
Profile icon
pskdraze
Profile icon
WyattKinzer1
Profile icon
HenryZelonka1
Profile icon
LingWu1
Profile icon
VASAMSETTYKARTH
Profile icon
KarthikChezz27
Comments
hotnewtop
Profile icon
Glare

Any feedback is appreciated everyone!

Profile icon
Combustion

I think maybe put a "Game Over" at the end instead of just terminating?

Profile icon
Glare

@Combustion
This was actually the next step. I'll start on it soon :)

Profile icon
MumboJumboFan

@Glare
Maybe have the snake spontaneously combust.

Profile icon
VMTU

cool

Profile icon
Glare

@VMTU
Thanks :)

Profile icon
Code1Tech

Wow! Super cool. Deserves a upvote :D

Profile icon
Glare

@Code1Tech
Thanks for your support :)

Profile icon
[deleted]

This is a 10/10, fantastic.

Profile icon
Glare

@HeadSucksAtLife
Thank you! Glad you like it :)

Profile icon
[deleted]

No problem! Btw are uyou free to help me make a programming language?

@Glare

Profile icon
Glare

@HeadSucksAtLife
I wish I was, it would be a great side project. School is making me really busy at the moment. I will definitely be happy to do it with you when I get a little time. Sorry ;/

Profile icon
[deleted]

Its all good. Pay attention to school Lmao

@Glare

Profile icon
Glare

@HeadSucksAtLife
Of course. Good luck though!

Profile icon
Pizzaz4me

why does the snake keep moving even when I let go of the key? Considering how small the map is, it makes the game really hard.

Profile icon
Glare

@PlaySoccer
That's the point of the game. Try playing: https://www.google.com/search?q=play+snake

Profile icon
SeamusDonahue

I haven't noticed I like holding the direction, makes me feel faster I guess [email protected]

Profile icon
OLDERTHANYOU

it says directx12 not supported

Profile icon
Glare

@OLDERTHANYOU
Did that happen when you were trying to run?

Profile icon
OLDERTHANYOU

@Glare
nothing mate.
you should add an exception for "Exception in Tkinter callback"
so when we die we won't see that ugly red error

Profile icon
[deleted]

HOW DO YOU DO THIS
I THOUGHT I WAS GOOD AT PYTHON xD

Profile icon
Glare

@idrgplayer
Break it down bit by bit and it gets easy ;D

Profile icon
OwenBlack

Very Cool!

Profile icon
Glare

@OwenBlack
Thanks a lot :)

Profile icon
Kookiez

wow, cool!

Profile icon
Glare

@OrangeJooce123
Thank you!

Profile icon
JBloves27

Well done!

Profile icon
Glare

@JBYT27
Thanks :)

Profile icon
zplusfour

Cool!

Profile icon
Glare

@ZDev1
Thank you!

Profile icon
zplusfour

@Glare
np!

Profile icon
yoloman445

Make it 60 fps for a buttery smooth experience.

Profile icon
Glare

@yvngpedo
I wish xD

Profile icon
PyCoder01

@yvngpedo
It can't be 60 fps cause repl.it is running on a virtual machine

Profile icon
DmitriiPavlov

There is a visual glitch at the bottom right of the screen whenever you eat an apple, you likely update the screen too soon before actually moving it to the right location.

Profile icon
Glare

@DmitriiPavlov
So what happens to the apple?

Profile icon
DmitriiPavlov

@Glare
I dont know the details of your code, just saying there is a visual glitch that flashes the apple in the bottom left.

Profile icon
Glare

@DmitriiPavlov
I'll look into it. Thanks a lot for your feedback :)

Profile icon
DynamicSquid

Cool! Well done :)

Profile icon
Glare

@DynamicSquid
Thanks a lot :)

Profile icon
WilliamRoss6

Wow the source code for this is like 80% comments. Anyway, cool game.

Profile icon
Glare

@WilliamRoss6
Glad you liked it :) I do that because sometimes I look back at my code and forget what certain lines are for LOL

Profile icon
WilliamRoss6

@Glare
It's amazing you did this with turtle of all things. You should make a tutorial.

Profile icon
Glare

@WilliamRoss6
Thank you :) That's a great idea, maybe I will!

Profile icon
WilliamRoss6

@Glare
I hope you do. I would definitely like to learn more about turtle because I never really use it.

Profile icon
Glare

@WilliamRoss6
I'm assuming you're using Tkinter?

Profile icon
WilliamRoss6

@Glare
If I do graphics in python I normally use pygame. I don't know how to use Tkinter.

Profile icon
WilliamRoss6

@Glare
Okay, I figured out how to use tkinter, and it's easy enough. Then I tried turtle and it is crazy confusing you need to make a tutorial.

Profile icon
OldWizard209

this is an amazing game but the problem is that games in Python are very laggy on repl.it. otherwise great game. Anyways

@Glare
You earned a big fat upvote from me :)

Profile icon
HarveyAnderton

yer gave me a seizure ye rat

Profile icon
SerjioGalicia

i want to play little big snake

Profile icon
PranatSingh

please give commands

Profile icon
LingWu1

Cool!I upvoted!

Profile icon
Name12

Impossible
how can you make such graphic with python!
this is it. the high effort game I was looking for

maybe a game over sign if you lose??
or an option when you click on the snake, it will turn into a rainbow snake that constantly changes color.

BTW, I do know python can produce graphics. I'm no coding Noob (or am I?)

Profile icon
[deleted]

umm... its so laggy and than it just terminates after i get 1 apple

Profile icon
SeamusDonahue

awesome! unlike most turtle games there is very little input lag! awesome work man!

Profile icon
CodingCactus

Hi, we've locked this post while we investigate it for cycle farming. If you know of any reason why such a large number of cycleless and pfpless accounts have upvoted this, please let us know (this post is locked so you will need to contact us on a separate post)
Screenshot_20201017-094506~2

Profile icon
CodingCactus

Looking at it again, it probably isn't farming. Sorry for the trouble

Profile icon
Glare

@CodingCactus
No worries. I don't really understand cycles, but anyways...

Profile icon
RahulChoubey1

@CodingCactus
What is cycle farming?

Profile icon
RayhanADev

@RahulChoubey1
it’s when someone uses numerous accounts to upvote their own post.

Profile icon
RahulChoubey1

@RayhanADev
okay… what if it's to upvote other users' posts that they REALLY like?

Profile icon
RayhanADev

@RahulChoubey1
well... that’s not cycle farming but still not allowed.