Create Snake with Python in 20 MINUTES!

preview_player
Показать описание
📑 SUMMARY
In this video, we create the Snake Game with Python and PyGame. We go through everything you need to know, from creating rects in pygame to user input to logic, etc. Create the Snake Game with Python in this video!

⌚ TIMESTAMPS
0:00​ | Intro
0:27 | Boilerplate
0:48 | Creating the Grid
3:43 | Creating the Snake
12:46 | Creating the Apples
17:39 | Collisions and Dying
20:30 | Adding a Score System
22:27 | End

🎬 MY SETUP:
💻 PC: Acer Aspire TC-281 (AMD A10-9700 @ 3.5 GHz, 8 GB RAM @ 2400MHz, 1 TB HDD, Radeon R7 Graphics)
⌨️ Keyboard: Razer Huntsman Gaming Keyboard (Razer Opto-Mechanical Purple Switches)
🖥️ Monitor: ASUS VP228 21.5” 1080p 75Hz
🖱️ Mouse: VicTsing 2.4GHz Wireless Mouse
🎙️ Mic: Blue Yeti USB Condenser Microphone
💻 Secondary Laptop/Monitor: Dell Inspiron 11-3185 2-in-1

🏷️ TAGS
- Snake Game
- Snake with Python
- Snake PyGame
- PyGame Tutorial

HASHTAGS:
#PyGame #SnakePython #PythonGames
Рекомендации по теме
Комментарии
Автор

Subscribe for more content! Thanks for watching!

baraltech
Автор

Best pygame tutorials I’ve found so far

BirdofHerms
Автор

best tutorial ever, thank you so much for this content, please make more videos and more games

Yo-mjyq
Автор

wow, this is the greatest explanation

googlegoogle
Автор

Thank you so much, with that, I just made my first game✌

victorpanashe
Автор

this is a really good tutorial thanks bro you are underrated

JasonsGame
Автор

Isn't it more efficient to draw lines for making the grid

aylazer
Автор

Hi I have a queston, if I wanted to add music to my game how would I do that

leylasadikh
Автор

Hello Lartech,
Could u make a vid on coding mario in python(pygame module) please
I would really appreciate it!!

noobsteve
Автор

I have never found a tutorial that doesn't glitch. Right now it says this error message. No file 'font.ttf, 100' found in working directory 'C:\Users\yohaa'. Can you help me?

thequasarminedash
Автор

im very new to coding and idk why import pygame doesnt work

BiggestNoobalive_
Автор

I found a work around for this gettging the FONT errors and put in LargeText
but now am putting the elif event.key, and I am getting no module for key?
pygame.event.event' object has no attribute 'key'

anyone else get that or know a work around??

popomasher
Автор

while i'm lost in the perfect strom, thee show me the light, the beacon of heaven, spawn from the black sea. You show mw that it's not a perfect strom, it's just a programming class. I shall give you my own heart and soul to you as a cost to this life saving hack as the strom approching me name'computor programming class' .But now, now, my dear, you save me. so thank you <3333

maboo
Автор

The if block to check for collision with self didn't work, and for some reason after I eat more than 4 apples the game glitches out and crashes. I followed the tutorial line for line.

GeraldBosley-cfng
Автор

7:08 it says my rect argument is invalid in line 40

Therealchessenjoyer
Автор

I really wanted to ask you something, so I'm not gonna leave a comment!

lioninaboxgames
Автор

omg what the hell do you mean by "donot subscribe" D: i alr did should i unsub??

kumaramit
Автор

For some reason i cannot make the grid to work it shows me the pygame screen but without the grid. Code down below.

import pygame
import sys
import random

pygame.init()

SW, SH = 800, 800

BLOCK_SIZE = 50
FONT = pygame.font.Font("font.ttf", BLOCK_SIZE*2)

screen = pygame.display.set_mode((800, 780))

clock = pygame.time.Clock()
def draw_grid():
for x in range(0, SW, BLOCK_SIZE):
for y in range( 0, SH, BLOCK_SIZE):
rect = pygame.Rect(x, y, BLOCK_SIZE, BLOCK_SIZE)
pygame.draw.rect(screen, "#3c3c3b", rect, 1)

draw_grid()

while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
sys.exit()

pygame.display.update
clock.tick(10)

LimeBytesYT
Автор

for 19:15 couldn't you just do self.__init__()?

abdulrahmanabusharbain