ASMR Programming - Coding a Snake Game - No Talking

Поділитися
Вставка
  • Опубліковано 25 гру 2024

КОМЕНТАРІ •

  • @GiorgiTarielashvili
    @GiorgiTarielashvili 8 місяців тому +27

    This makes me motivated and excited to learn python for full stack development

  • @itsinthescript3509
    @itsinthescript3509 2 роки тому +158

    This video is great. All this code makes me want to learn more. Keep up the good work!

    • @sebastianchinnici2442
      @sebastianchinnici2442 2 роки тому +6

      It's happening the same but learning programming overall, directly with web progrramming, it's kinda odd for me because I love and I'm studying graphic design, 3D design and motion graphics (and drawing but it's a hobby) and getting interested in web programming is striking for me now thanks by his videos 0:

    • @Sirbozo
      @Sirbozo 9 місяців тому

      o

  • @priyamd4759
    @priyamd4759 2 роки тому +20

    Very encouraging ... I am not in gaming but I have several problems to be solved and if after learning python i can solve a problem in an hours coding effort then I have saved myself a ton of time. Thanks a lot. And yes, No Talking is phenomenal.

  • @polcomiporcar
    @polcomiporcar 3 роки тому +391

    There's a bug with the spawn of the apples, as they are random in all screen they can spawn inside the snake's body. It's not that difficult to change but be careful with that

    • @kiparisov1480
      @kiparisov1480 2 роки тому +32

      не баг, а фича

    • @nintendo6783
      @nintendo6783 2 роки тому +5

      Внатури

    • @QuiLickr
      @QuiLickr 2 роки тому +8

      У тебя должно быть много друзей

    • @wingersonly
      @wingersonly 2 роки тому +69

      What on earth are these guys talking about lol

    • @igorz3551
      @igorz3551 2 роки тому

      @@wingersonly about ur mom

  • @alex-oo8oo
    @alex-oo8oo 3 роки тому +11

    I love this clicks of keyboard. This is enjoyable.

  • @everjaw1629
    @everjaw1629 3 роки тому +144

    Incredible good friend I almost have no idea of ​​the code you wrote because I am just beginning to learn to program some friend advice. By the way I loved your video, keep it up

    • @ServetGulnaroglu
      @ServetGulnaroglu  3 роки тому +15

      Thanks for the support! I'm glad to hear that

    • @Arsalanfr
      @Arsalanfr 6 днів тому

      hey are you good at programming now its 3 years im just curious because im starting too

  • @GDakselishere
    @GDakselishere Рік тому +4

    I like ASMR, i like games AND i like proramming.
    This video is the best combo.

  • @Mmc1t
    @Mmc1t 3 роки тому +44

    This is a really interesting and original content.

  • @MounirSMalak
    @MounirSMalak 3 роки тому +341

    anyone today who doesn’t know what to do, start recording how to make snake game 😂😂😂

    • @natedrake3256
      @natedrake3256 3 роки тому +7

      yeah 🤣

    • @fakek1506
      @fakek1506 2 роки тому +1

      Here

    • @HeyItsQuantum
      @HeyItsQuantum 2 роки тому

      @@Yahavoni death?

    • @HeyItsQuantum
      @HeyItsQuantum 2 роки тому

      @@Yahavoni I translated it, it literally says "death"

    • @HeyItsQuantum
      @HeyItsQuantum 2 роки тому

      @@Yahavoni yeah I know, you meant "smart", but somewhat reason youtube decided you translate is to "death" 🌚

  • @abhilashLeader_07
    @abhilashLeader_07 2 роки тому +3

    Keyboard sounds satisfying bro👍

  • @sadri.gulnaroglu
    @sadri.gulnaroglu 3 роки тому +9

    Better layout than before 👍🏿

  • @kaiitobyte1749
    @kaiitobyte1749 2 роки тому +20

    The video is interesting and I loved the programming you did, but just as a recommendation, you should change the color of the pixel of the head of the snake to know which direction it will go.

  • @Synthetic_geth
    @Synthetic_geth 2 роки тому

    This pleases my ears

  • @keremkesgin5623
    @keremkesgin5623 3 роки тому +2

    DAMN THAT FINGERSS

  • @ahan2309
    @ahan2309 2 роки тому +3

    You are very amazing programmer

  • @willyy_senna
    @willyy_senna 2 роки тому

    best way to train! followed step by step :)

  • @MattyDevs
    @MattyDevs 2 роки тому +2

    Question. How do you move these screens? What shortcut is that? 0:00

  • @theseusRJ7
    @theseusRJ7 2 роки тому +4

    5:16 line 40, why are you dividing the frame size with square size and multiplying it again? It will just return the frame size.

    • @KaylonR
      @KaylonR 2 роки тому

      double / isn't dividng, its called floored division where it for example:
      5//2=3
      so you multiply this back up and you get a rounded frame size

    • @tanmaypatel4152
      @tanmaypatel4152 2 роки тому +2

      @@KaylonR 5 // 2 will be 2

  • @animeverse9021
    @animeverse9021 2 роки тому +1

    He just coded the game without any testing!!! End he just tested the gane at end 😱😱😅😅

  • @temmie3325
    @temmie3325 2 роки тому +10

    I almost relaxed and then in the first 76 seconds:
    0. # Because programmers count from 0
    She resizes her window aggressively
    1. She makes a lotta typos
    2. She messed up equals on line 8
    3. She puts a comment in self-explanatory variables
    4. She uses brackets in if statement on line 13
    5. Even if you have brackets in if statement, at least put a space!
    6. She makes a whole lot of empty line, so much empty space that even your mom fits there
    # couldn't miss the opportunity
    7. (probably) If the variable can't be negative and you check it to be bigger than 0, use != or not keyword. If the variable can be negative, ignore this.
    7 mistakes on 13 lines! I mean, that's just mostly syntactic sugar, but umm... BrainError: brain exploded of such bad code

    • @ddddddddddddddddddd6
      @ddddddddddddddddddd6 2 роки тому

      Your brain gonna explode, if you will see my java code. This is using in tortures.

  • @myfirstchannle-sv8pl
    @myfirstchannle-sv8pl Рік тому +1

    non coders: wow this is very inspiring. coders: i give up

  • @theseusRJ7
    @theseusRJ7 2 роки тому

    This is music to my ears

  • @kirkkong5829
    @kirkkong5829 2 роки тому

    This is my new sleeping music

  • @aaaaaaaaaaa9801
    @aaaaaaaaaaa9801 2 роки тому +7

    1:01 i aint a programmer but i can tell that this pygame is british

  • @amintahiri3053
    @amintahiri3053 2 роки тому +8

    Can u please make an asmr on how to setup visual code? (The way u have it setup looks very nice!)

    • @arnabghosh3776
      @arnabghosh3776 2 роки тому

      follow code with harry...
      ua-cam.com/video/ks6wF_ooYqo/v-deo.html

    • @igorz3551
      @igorz3551 2 роки тому +2

      Go watch gibi

  • @yorkshire6573
    @yorkshire6573 2 роки тому

    Hey at 4:50 how can I get that star !?

  • @RP-kz5zo
    @RP-kz5zo 2 роки тому +1

    game_window = pygame.display.set_mode(frame_size_x, frame_size_y). I am getting an error that size must be two numbers... Any help

    • @mauman9338
      @mauman9338 Рік тому

      Same , did you find answer ?

    • @knightOfSun
      @knightOfSun Рік тому

      i dont get, why you never read doc for pygame and so on
      pygame.display.set_mode((1920, 1080))
      # Initialize a window or screen for display
      set_mode(size=(0, 0), flags=0, depth=0, display=0, vsync=0)

  • @elxanhacatali4866
    @elxanhacatali4866 10 місяців тому +1

    abi çok güzel yazıyorsun ama ben bunu yazdım harfi harfine bana hata veriyor diyorki pygame olmaz pygame'i yanlış yazıyor ne için böyle oluyor abi?

    • @BlazeTheCatMan
      @BlazeTheCatMan 9 місяців тому

      Did you install pygame from the command prompt!? If not you need to and if you are asking how just go to command prompt and type pip install pygame

  • @am-gr__yt4113
    @am-gr__yt4113 Рік тому +1

    nice work dude,what's the name of that keyboard??

  • @huynguyen13008
    @huynguyen13008 Рік тому

    smooth sounds

  • @OrigamiwithEyad
    @OrigamiwithEyad 5 місяців тому

    keep up with this good work! and try to make more python projects for begginers and avanced programmers

  • @R3cheese28
    @R3cheese28 2 роки тому

    really loved the first bug lol

  • @Codermaster110
    @Codermaster110 2 роки тому +1

    that speed is like lighting :0

    • @ServetGulnaroglu
      @ServetGulnaroglu  2 роки тому

      Ka-chow!

    • @Codermaster110
      @Codermaster110 2 роки тому

      @@ServetGulnaroglu I am programmer too !

    • @Codermaster110
      @Codermaster110 2 роки тому

      @@ServetGulnaroglu and Bro the job you did was amazing I used you Asmar like 10 times now !

  • @المعلمالأكبر-ص5خ
    @المعلمالأكبر-ص5خ 2 роки тому +1

    اقسم بالله صوت الكيبورد طرب ولا احسن عازف ارجوا إن تفيد البشرية ...

  • @dlanyar1251
    @dlanyar1251 3 роки тому +5

    What keyboard is that?

  • @hoangtran5895
    @hoangtran5895 2 роки тому

    so cool,i like this video

  • @alastor1419
    @alastor1419 2 роки тому +1

    As a game dev, I can confirm that game development is for chads

  • @KeyHub-tw4jz
    @KeyHub-tw4jz 2 роки тому +1

    Very good job . You must doing videos every day

  • @tymo5957
    @tymo5957 2 роки тому +4

    Amazing work dude, how long do You learn coding?

    • @IoanaMuthi
      @IoanaMuthi 2 роки тому +1

      Probably a while this looks pretty hard

    • @baki82737
      @baki82737 2 роки тому

      @@IoanaMuthi this is ez

    • @nintendero65
      @nintendero65 2 роки тому

      @@IoanaMuthi not that hard but not that easy

    • @joshua_sauv
      @joshua_sauv 2 роки тому

      @@baki82737 lol

  • @stickysteve14
    @stickysteve14 Рік тому

    just a quick question. why are we making a init_vars a function instead of __init__ and just passing vars? Thanks in advance.

  • @marksekla24
    @marksekla24 2 роки тому +1

    What extensions on vs code do you use for this project?

  • @MonkeyDLuffy-sr5sx
    @MonkeyDLuffy-sr5sx 2 роки тому

    I’m a noob :< and I am wondering what are those things that you import in the beginning ?

  • @joaonazz
    @joaonazz 2 роки тому

    This video is great.

  • @samm-sung5104
    @samm-sung5104 2 роки тому

    Why the heck are u so good at goddamn snake?

  • @fadliardiansyahharahap7439
    @fadliardiansyahharahap7439 3 роки тому +4

    I am waiting for you to post this code to your github

  • @vethokezo5313
    @vethokezo5313 2 роки тому

    It's great but I'm still finding difficult to run ..I'm still beginner..what did you type it's abit fast so I couldn't get it....

  • @amruthulprakash
    @amruthulprakash 2 роки тому +2

    Your Device?

  • @ThanhTran27507
    @ThanhTran27507 3 роки тому +1

    please make video: "How I setup vim/nvim". Tks

  • @razirr166
    @razirr166 2 роки тому

    Nice Programming

  • @shivangchheda6311
    @shivangchheda6311 3 роки тому

    have u tried brown key switch
    what brand are this switchs gateron or cherry mx
    if u have tried brown which do u like red or brown

  • @emex1011
    @emex1011 3 роки тому +1

    What is that OS?
    P.D: Great video. Like and sub :)

  • @FRPAmbience
    @FRPAmbience 3 роки тому +1

    Are you using linux or mac

  • @sangkima_4267
    @sangkima_4267 2 роки тому +12

    Im Motivated by your coding so i try to code like this.But it shows 50 error, 11 warning,4 weak warning..lol😂😂😂

  • @Skankhunt-cf6uh
    @Skankhunt-cf6uh Рік тому

    Past out during watching (got sleepy)

  • @gurkanaras697
    @gurkanaras697 3 роки тому

    hocam merhaba, klavyeden memnun musun? satın aldığın yer açıklama kısmındaki site mi?

    • @ServetGulnaroglu
      @ServetGulnaroglu  3 роки тому +2

      Merhaba, klavyeden cok memnunum. Kucuk, sade bir klavye. Sesi de cok iyi, ben red switch kullaniyorum. Bluetooth ile ilgili de bir sorun yasamadim. Evet, aciklamadaki link.

    • @gurkanaras697
      @gurkanaras697 3 роки тому +1

      @@ServetGulnaroglu geri dönüşünüz için çok teşekkür ederim.

  • @cameraman1939
    @cameraman1939 2 роки тому

    9:15 can someone explain this part? Im little confused

  • @hzzk_
    @hzzk_ 2 роки тому +3

    what are your vscode settings, like font, font size, etc.
    seems like a nice setup

  • @nehashekhar2374
    @nehashekhar2374 2 роки тому

    Can you tell your vs code font your font is very nice

  • @cgtygncy
    @cgtygncy 3 роки тому +3

    Tebrikler servet süpersin.

  • @hoanglongnguyen3010
    @hoanglongnguyen3010 2 роки тому

    wow, amazing

  • @mc-ciro
    @mc-ciro Рік тому

    Hi, what switches do you use?

  • @theplant4046
    @theplant4046 2 роки тому +1

    That the loudest keyboard I ever Heard

  • @MatejL
    @MatejL 2 роки тому

    I need that pygame library where can i find it?

  • @shriyanshgupta7340
    @shriyanshgupta7340 2 роки тому

    can you tell me name of your keyboard
    😀😀

  • @shivangchheda6311
    @shivangchheda6311 3 роки тому

    have u tried brown key switchs

  • @himalgiri2225
    @himalgiri2225 3 роки тому

    This is best upload more please

  • @thanawatsaiyota9640
    @thanawatsaiyota9640 2 роки тому

    Where did you buy the keyboard from?

  • @hoangtran5895
    @hoangtran5895 2 роки тому

    can you tell me that your extension in vscode,i want to know to setup my vscode,please help me,thanks you very much

  • @kiddkarterr
    @kiddkarterr Рік тому

    How did you play the game after coding it

  • @mr.goldenweek8463
    @mr.goldenweek8463 2 роки тому

    Was really fun

  • @psph_jakeyt7102
    @psph_jakeyt7102 2 роки тому +1

    This is why I wanted to studies ICT In my senior high.

  • @masterclipper6955
    @masterclipper6955 3 роки тому +2

    Great video! Just had a quick question how did you and are learning code?

  • @elmascapito-j8r
    @elmascapito-j8r Рік тому

    What extension do you do???

  • @nikitasingh9406
    @nikitasingh9406 2 роки тому

    Awesome 👍

  • @vectoriam1725
    @vectoriam1725 2 роки тому

    What complilar did u use?
    Can u code it with C ?

    • @itskekoff
      @itskekoff 2 роки тому

      Visual Studio Code

  • @gamerinyourtown5592
    @gamerinyourtown5592 3 роки тому

    what is the mouse you are using?

  • @QuanNguyen-tl2ou
    @QuanNguyen-tl2ou Місяць тому

    What is your keyboard

  • @User--died1234
    @User--died1234 Рік тому

    in line 21 its showing in mine that size should be number .....what should i do ?

  • @Etka06
    @Etka06 2 роки тому

    Great video basarilarin devamini dilerim ;)

  • @kuba585
    @kuba585 3 роки тому +2

    What's your font?

  • @irfanfauzi7082
    @irfanfauzi7082 2 роки тому

    I dunno why, but many programmer use keychron keyboard, does it have something special?

  • @mr.octopi1825
    @mr.octopi1825 Рік тому +1

    This is the code I used to program snake in python. I changed the colors from green and red to blue and yellow to give it the python colors. You can change the speed, screen size, how many tails to start with, and the colors. All that will be located at the top of the code, so feel free to modify the code however you like.
    from tkinter import *
    import random
    GAME_WIDTH = 1000
    GAME_HEIGHT = 700
    SPEED = 80
    SPACE_SIZE = 50
    BODY_PARTS = 3
    SNAKE_COLOR = "#0000FF"
    FOOD_COLOR = "#FFFF00"
    BACKGROUND_COLOR = "#000000"
    class Snake:
    def __init__(self):
    self.body_size = BODY_PARTS
    self.coordinates = []
    self.squares = []
    for i in range(0, BODY_PARTS):
    self.coordinates.append([0,0])
    for x, y in self.coordinates:
    square = canvas.create_rectangle(x, y, x + SPACE_SIZE, y + SPACE_SIZE, fill=SNAKE_COLOR, tag="snake")
    self.squares.append(square)
    class Food:
    def __init__(self):
    x = random.randint(0, (GAME_WIDTH / SPACE_SIZE)-1) * SPACE_SIZE
    y = random.randint(0, (GAME_HEIGHT / SPACE_SIZE) - 1) * SPACE_SIZE
    self.coordinates = [x, y]
    canvas.create_oval(x, y, x + SPACE_SIZE, y + SPACE_SIZE, fill=FOOD_COLOR, tag="food")
    def next_turn(snake, food):
    x, y = snake.coordinates[0]
    if direction == "up":
    y -= SPACE_SIZE
    elif direction == "down":
    y += SPACE_SIZE
    elif direction == "left":
    x -= SPACE_SIZE
    elif direction == "right":
    x += SPACE_SIZE
    snake.coordinates.insert(0, (x, y))
    square = canvas.create_rectangle(x, y, x + SPACE_SIZE, y + SPACE_SIZE, fill=SNAKE_COLOR)
    snake.squares.insert(0, square)
    if x == food.coordinates[0] and y == food.coordinates[1]:
    global score
    score += 1
    label.config(text="Score:{}".format(score))
    canvas.delete("food")
    food = Food()
    else:
    del snake.coordinates[-1]
    canvas.delete(snake.squares[-1])
    del snake.squares[-1]
    if check_collisions(snake):
    game_over()
    else:
    window.after(SPEED, next_turn, snake, food)
    def change_direction(new_direction):
    global direction
    if new_direction == 'left':
    if direction != 'right':
    direction = new_direction
    elif new_direction == 'right':
    if direction != 'left':
    direction = new_direction
    elif new_direction == 'up':
    if direction != 'down':
    direction = new_direction
    elif new_direction == 'down':
    if direction != 'up':
    direction = new_direction
    def check_collisions(snake):
    x, y = snake.coordinates[0]
    if x < 0 or x >= GAME_WIDTH:
    return True
    elif y < 0 or y >= GAME_HEIGHT:
    return True
    for body_part in snake.coordinates[1:]:
    if x == body_part[0] and y == body_part[1]:
    print("Game Over")
    return True
    return False
    def game_over():
    canvas.delete(ALL)
    canvas.create_text(canvas.winfo_width()/2, canvas.winfo_height()/2,font=('consolas',50), text="GAME OVER", fill="red", tag="gameover!")
    window = Tk()
    window.title("Snake Game")
    window.resizable(False, False)
    score = 0
    direction = "down"
    label = Label(window, text="Score:{}".format(score), font=('consolas', 40))
    label.pack()
    canvas = Canvas(window, bg=BACKGROUND_COLOR, height=GAME_HEIGHT, width=GAME_WIDTH)
    canvas.pack()
    window.update()
    window_width = window.winfo_width()
    window_height = window.winfo_height()
    screen_width = window.winfo_screenwidth()
    screen_height = window.winfo_screenheight()
    x = int ((screen_width/2) - (window_width/2))
    y = int ((screen_height/10) - (window_height/10))
    window.geometry(f"{window_width}x{window_height}+{x}+{y}")
    window.bind('', lambda event: change_direction('left'))
    window.bind('', lambda event: change_direction('right'))
    window.bind('', lambda event: change_direction('up'))
    window.bind('', lambda event: change_direction('down'))
    snake = Snake()
    food = Food()
    next_turn(snake, food)
    window.mainloop()

  • @sandrinjoy
    @sandrinjoy 3 роки тому +3

    Time for me to buy both camera 📸 & mic

  • @diegitolokito15
    @diegitolokito15 2 роки тому

    what is your vs theme?

  • @DreadArsenol
    @DreadArsenol 3 роки тому +2

    Could you do a video where you explain why you are doing what your doing when coding

    • @igorz3551
      @igorz3551 2 роки тому

      Because he likes games 💁‍♀️

  • @seight8898
    @seight8898 2 роки тому

    Программисты: а ты знаешь как меня возбудить ;)

  • @berkaybakacak
    @berkaybakacak 2 роки тому +2

    Güzel ASMR :)

  • @Wesley-lw6qb
    @Wesley-lw6qb 2 роки тому +1

    Nice

  • @MiguelAngelMontenegro-v9x
    @MiguelAngelMontenegro-v9x 11 місяців тому

    nice video

  • @YixSoviet
    @YixSoviet 2 роки тому

    what extensions do you use? btw nice video

  • @neonwolf07
    @neonwolf07 2 роки тому

    after a long type got something I want

  • @spammergod4125
    @spammergod4125 2 роки тому +8

    Ah yes the art of copying from a second monitor
    Also the framework you are using, pygame, a wrapper for SDL2 written in C
    Allows you to use colors within strings
    You dont need to define constant global variables at the top, and can directly use "blue" or "black" wherever you want.

  • @shayanzare4047
    @shayanzare4047 2 роки тому

    Hello.
    What is your keyboard name?

  • @NChindas
    @NChindas 2 роки тому

    , line 1, in
    import pygame, sys, time, random
    ModuleNotFoundError: No module named 'pygame'
    any solution ?

    • @francescoabrate4454
      @francescoabrate4454 2 роки тому

      Try to install ‘pygame’ libraries with a virtual environment, search on UA-cam bro

    • @NChindas
      @NChindas 2 роки тому +1

      @@francescoabrate4454 I had already solved it by searching in Google XD, thanks anyway

    • @quza7686
      @quza7686 11 місяців тому +1

      @@NChindas How??? Help me, please, I can't solve this problem.

    • @quza7686
      @quza7686 11 місяців тому +1

      @@NChindas The library is pygame installed, I checked through pip list

  • @Pedro19893
    @Pedro19893 Рік тому +12

    As someone who has just started learning Python, I'm just like "How the hell does he know all of this from memory" I feel like I will never be capable of doing this on my own...
    Did anyone else feel the same at the beginning?

    • @Gamer-XO
      @Gamer-XO Рік тому

      Yes

    • @Pedro19893
      @Pedro19893 Рік тому +1

      @@Gamer-XO What about know? You feel the same xD

    • @Gamer-XO
      @Gamer-XO Рік тому

      Yes 😂 XD

    • @superhero4586
      @superhero4586 Рік тому

      @@Pedro19893 mememe

    • @jermaine2712
      @jermaine2712 Рік тому +1

      I feel the same but I think this comes from experience. He/she has probably done this a million times, it's almost like a second nature to them.
      Just like driving a car or a bike.

  • @imtokito6881
    @imtokito6881 10 місяців тому

    bro coding agresive

  • @atahanuzer8393
    @atahanuzer8393 2 роки тому

    Hocam merhaba ben
    game_window = pygame.display.set_mode(frame_size_x, frame_size_y) bu bölümde hata aliyorum
    hatada söyle : Özel durum oluştu: TypeError
    size must be two numbers
    File "/Users/atahanuzerrr/Desktop/pyhton proje 1/proje1.py", line 21, in
    game_window = pygame.display.set_mode(frame_size_x, frame_size_y)
    bunu nasıl düzeltebilirim

    • @aliismail1195
      @aliismail1195 2 роки тому

      aynı hata bendede.

    • @aliismail1195
      @aliismail1195 2 роки тому

      yapman gereken ((frame_size_x, frame_size_y)) yazmak sadece

  • @wojciechjeziorski9653
    @wojciechjeziorski9653 2 роки тому

    Does anyone know how to change the square defined as a food into any image I want?

  • @라이브러리안
    @라이브러리안 2 роки тому

    keyboard sound cool

    • @atlantic_love
      @atlantic_love 2 роки тому

      It sounds like a mechanical keyboard you can find on Amazon, but it is WAY too small. Not sure what he thinks he's accomplishing by using something that isn't ergonomic.

  • @justick8626
    @justick8626 2 роки тому

    My terminal said , line 21, in
    TypeError: size must be two number
    How to fix it?

    • @jonanthonii
      @jonanthonii 2 роки тому

      replace line 21 with this " game_window = pygame.display.set_mode(size=(frame_size_x, frame_size_y)) "

    • @mauman9338
      @mauman9338 Рік тому

      @@jonanthonii hello i did this and i still have that error can you help me please ?