Snake Pygame Tutorial #4

preview_player
Показать описание
Coding snake using python and pygame tutorial #4.

In this set of videos I will be showing you how to code a basic version of snake using python and the module pygame. This is suited for intermediate level programmers with some experience but anyone is welcome to follow along

Want To Support This Channel?
Bitcoin: 1PbkAYLFaJBgjbKn2ptGyBz65xWN8hJgBU
Ethereum: 0xdd42dbbdba60f7163fc7a840e189474b6e8bfcad
Ripple: rD4arM9CVjQWqi8f1kxdpCgkCgEkqBgtud

Please leave a LIKE and SUBSCRIBE for more content!

Tags:
- Tech With Tim
- Pygame
- Python Tutorials
- Pygame tutorials
- Snake tutorial pygame
Рекомендации по теме
Комментарии
Автор

your tutorials really help out a lot. thanks. really appreciate it the time you put into this.

marcusmorrow
Автор

Hi. Thank you for the tutorials video. Today I revived some of the videos. Could you add comments, on the code of the game program please? Could you make an online quiz with Python? We need comments to better understand your code. Thanks again.

yukselbey
Автор

Hey Tim, great video! I implemented this and found that if you add exit() in the move definition in the snake class, you can prevent a pygame.error video system not initialized when you exit the window. Just wanted to let you know.

calebarulandu
Автор

Thanks so much! Now I can apply my other knowledge of pygame to add images, sfx and maybe even different modes :D

EpicVideoGamer
Автор

Thank you, helped a lot! Love from India

rakesho
Автор

thanks for the tutorial. learnt many things.

tanzimahmed
Автор

It was a super great tutorial. Thank you for your time. Appreciate it.

yuan
Автор

thank you for the tutorials video, i learnd a lot.very prappreciate .

gaogaogao
Автор

Very helpful set of videos but I have a question. How do you change the messagebox so that you have an option to quit the game rather than having to restart then close? I'm rather new to this but I am enjoying it! Thanks!

catrionabennett
Автор

Thank you so much for doing this. Really helped.

pranitchand
Автор

How do I fix this?



(10, 10) - {}
Traceback (most recent call last):
File "snake.py", line 191, in <module>
main()
File "snake.py", line 176, in main
s.move()
File "snake.py", line 79, in move
self.turns.pop(p)

KeyError: (10, 10)

joshg
Автор

Hello! I made my own version of snake and it works pretty well. May I send a link to it in the comments? I ask because I don't want to really advertise. I just make this offer. I'll only send it if I may do it.

alphacraft
Автор

hey, how would I insert an image instead of the colored cube for the snack?

alexsheffield
Автор

My pygame window keeps crashing, I'm pretty sure I've done everything in the video but it wont work. Though your Snake game from github works while mine does not, so confused lol.

shadowvortex
Автор

when adding cube to the tail, you can simply append the tail popped before to the snake by storing it in the snake instance/class

freedempire
Автор

I am trying to add versus mod to Tims snake game but i couldnt find a way to add the second snake could you help me on that

victory
Автор

Can anyone tell how to make it so that if I touch the edge of the screen I die?

hao_cuii
Автор

[lease now make a series on making pacman using pygame

aryanbhatia
Автор

Thought I would leave this hear, every other line in my code is fine except for two, which is stopping the game from running, my s = snake((255, 0, 0), (10, 10)), and the final line with main(). I'm not sure as to why this is a problem and I can't work out why

lucisblitz
Автор

HI, i found a bug. if the snake'body only contain two cube, i click left arrow, than i click right arrow, the snake does'not collide. how can fix it?

gaogaogao