CODE WITH ME | Python Snake Game

  Рет қаралды 180,124

CS Jackie

CS Jackie

Күн бұрын

Пікірлер
@CSJackie
@CSJackie 10 ай бұрын
The silly game code is available on GitHub: github.com/carmensantos/snake-game Code CSJackie15 for 15% off Code Chrysalis' immersive coding course in Japan 🤩 p.s. please don't show this code to my boss
@ukaszbaczek7266
@ukaszbaczek7266 10 ай бұрын
"Please, don't show this code to my boss." It would be worthwhile to rewrite this code in an object-oriented manner in the next episodes - it would be a great learning experience for the viewers and good material for a video or several videos.
@FredyantonioPelaezcastan-tv3nd
@FredyantonioPelaezcastan-tv3nd 9 ай бұрын
You are novice , you video Is shit , the people saw the video , because you are women but your proyect Is Boring, Is Easy , a child the 5 Years able make the same proyect
@FredyantonioPelaezcastan-tv3nd
@FredyantonioPelaezcastan-tv3nd 9 ай бұрын
You proyect Is shixt
@FredyantonioPelaezcastan-tv3nd
@FredyantonioPelaezcastan-tv3nd 9 ай бұрын
You proyect Is boring
@com.youtube1
@com.youtube1 9 ай бұрын
I've been trying to learn coding and I wanted to program a snake game, but unfortunately when I use pre-built shared libraries from internet, it becomes a frog game :)
@themichaelw
@themichaelw 10 ай бұрын
1:34 You clearly haven't seen the spaghetti I'm able to produce in Java. Spaghetti code knows no boundaries; it transcends design patterns and exists in a higher dimension than we can never possibly understand.
@CSJackie
@CSJackie 10 ай бұрын
i laughed out loud at your comment
@pawlkoech8541
@pawlkoech8541 8 ай бұрын
i loved watching you solve the problems and being happy when something works.
@santiagoseijas9217
@santiagoseijas9217 10 ай бұрын
It's really nice watching you doing some coding just for fun! I enjoyed the way you went through the problems since that is actual coding.
@akshat9090
@akshat9090 8 ай бұрын
Dude you're the coolest tutor I've got! The way you're explaining makes so much more easier at least for my understanding.♥
@CSJackie
@CSJackie 8 ай бұрын
Awesome, thank you so much!
@perlhacker
@perlhacker 10 ай бұрын
always nice to do snake in some language. Awesome that you made us watch you doing it. And im Happy that it's same "struggle" on you side as it was on mine, it's always good to do a little thing outside the box of the normal "work" related programming work. Nice video.
@CSJackie
@CSJackie 10 ай бұрын
haha for sure! thank you so much :)
@TheTrienco
@TheTrienco 10 ай бұрын
In a weird way, Snake is a good starting point to think about common data structures. How do you represent it? A double linked list is the easiest (add new position to head and pop last position at the tail, skip the second step when eating a fruit). But it's not an efficient structure (chasing pointers to find the next element can be slow). An array would be better, but then you'd have to grow (possibly reallocate and copy) and shift (copying everything by one position). A ring buffer would be perfect, but they usually aren't meant to grow. It could be a fun exercise to see how much you can "over engineer" the problem for best performance (which is of course very silly and pointless for a Snake game, but something AAA devs will have to worry about).
@Andy-il7kf
@Andy-il7kf 10 ай бұрын
This is great Thank you :) it really helps to see a professional going through the same process of finding mistakes, debugging etc and sticking at it until they get the project where they want it. It inspires me to keep going/learning when I get stuck on my owm stuff
@CSJackie
@CSJackie 10 ай бұрын
thank you so much :)
@Andy-il7kf
@Andy-il7kf 10 ай бұрын
@CSJackie PS It would also be great to see how you approached this OO in python too, as a comparison
@JohnBarratt2750
@JohnBarratt2750 10 ай бұрын
I was born in 1963, so I was taught nothing whatsoever about computing at school . And only very superficially in Fortran at Uni. I am lost, watching this video, Jackie! But impressed.
@CodeChrysalis
@CodeChrysalis 10 ай бұрын
Awesome Video! Really clever how you coded this Snake Game with another kind of snake! ;) Thank you so much for featuring us in the video, we look forward to working with you 🤝 Keep up the good work 💪
@ricardoschenk5113
@ricardoschenk5113 6 ай бұрын
Hey Jackie, Going to watch all your content! just finished my course of basic python and hope to get as good as you. greetz Ricardo
@trex6142
@trex6142 8 ай бұрын
Well done. I find it humbling to realize that I put in all of the errors in my code.
@bobina_artz
@bobina_artz 10 ай бұрын
Welcome back, MISSED YOU SOOOO MUCH😘
@CSJackie
@CSJackie 10 ай бұрын
🥹 I missed you guys
@Laura-nt3nd
@Laura-nt3nd 10 ай бұрын
this video is so wholesome 😂
@CSJackie
@CSJackie 10 ай бұрын
thank you
@iycsapphireaandiinternational
@iycsapphireaandiinternational 2 ай бұрын
thank you for the introduction to pygame
@raquelsilver21
@raquelsilver21 9 ай бұрын
This is what I was looking for months! Just a ''code with me'' with simple exercises like a snake game! Please do more since since this helps so much people who wanna start coding but are stuck on the ''tutorial lane'''. What we are missing are projects and 'code with me' is perfect! Are you thinking about making a series of this? (Already Subscribed)
@CSJackie
@CSJackie 9 ай бұрын
Thank you! Yes? the next one will be tic tac toe 🥹
@CSJackie
@CSJackie 9 ай бұрын
Yes*
@artemKraft
@artemKraft 9 ай бұрын
thank you for sharing your knowlage. It is amazing to see how the time is chaning. So thank you for sharing your knowlage with all other people.
@pulledporksammiches
@pulledporksammiches 9 ай бұрын
Loved learning this and coding along. I also love your random trail of thoughts ♥
@KaiagaAg
@KaiagaAg 6 ай бұрын
Hello my best instructor. Congratulations on this incredible tutorial!
@King56847
@King56847 7 ай бұрын
why you look so beautiful when wearing glasses?🥹 Edited :- Your coding thinking is so good btw great video ❤️
@seanwcom
@seanwcom 9 ай бұрын
Fun evening project, thanks for sharing! I was just looking at your generate_starting_position() function and I think the reason your snake and target were originally appearing offscreen is because you aren't taking Y into account. You're creating a position_range based on screen width (1280), then returning both a random X and Y coordinate that are based on the screen_width pixels. This is causing you get sometimes land outside the height which is only 720 pixels. A quick change to turn position_range into position_range_x and then create position_range_y based on screen_height. Then be sure to use both position_range_x and position_range_y in the return. Not sure if KZbin will format this weird or not, trying anyway: def generate_starting_position(): position_range_x = (pixel_width // 2, screen_width - pixel_width // 2, pixel_width) position_range_y = (pixel_width // 2, screen_height - pixel_width // 2, pixel_width) return [random.randrange(*position_range_x), random.randrange(*position_range_y)]
@FitNiket
@FitNiket 10 ай бұрын
you're coding skills are really good really looking forward for more of youre videos
@sajadghamari4748
@sajadghamari4748 8 ай бұрын
loved this problem solving challenge
@adam-xt8te
@adam-xt8te 10 ай бұрын
I don't have idea what you're talking about but I'll watch and listen
@JohnBarratt2750
@JohnBarratt2750 10 ай бұрын
I feel the same!
@CSJackie
@CSJackie 10 ай бұрын
🤣
@kpm25
@kpm25 10 ай бұрын
Thanks so much, I used this to get refreshed back into python, appreciated!
@KojiKazama
@KojiKazama 2 ай бұрын
The thing that got me out of spaghetti code is Uncle Bob's - Clean Code lessons. Also I am a software engineer (well DevSecOps and automation) but I can't wait to spend the evenings coding games in Unity and watching programming videos like this. I'd love to see if someone checks out this code and adds sprites, I'm curious to see them in pygame.
@thejannzer
@thejannzer 10 ай бұрын
Please do more of this stuff... it helps me so much
@Antal46
@Antal46 10 ай бұрын
I joined uni in London at 34, now doing my 2nd year of Computer Science. I just wish they were focusing more on practicing the actual useful skills and not just writing report, reference, academic style bla bla. You making some cool videos, giving me some ideas to be more efficient!
@oreonengine9444
@oreonengine9444 10 ай бұрын
I can remember, did this a my first university project, ASCII snake in the terminal haha, lots of fun :D
@CSJackie
@CSJackie 10 ай бұрын
it's so fun!! my comp sci colleagues said they also coded this at uni haha
@matteoZattera
@matteoZattera 10 ай бұрын
Lol, I also coded snake in the terminal with C++ and I uploaded a video on my channel
@DJRanoia
@DJRanoia 10 ай бұрын
Glad you made it through Amazon video layoffs. Go Jackie! Another relaxing video, thanks!
@CSJackie
@CSJackie 10 ай бұрын
I don’t know yet (European laws delay the process) so please pray for me 😃
@sergeys7603
@sergeys7603 7 ай бұрын
Very Nice and Helpful Tutorial. Thank You
@super-8
@super-8 10 ай бұрын
Very Nice. Good Work and this is the beginning.
@com.youtube1
@com.youtube1 9 ай бұрын
I Loved You~r Desktop monitor 🤩 I Not engineer but loveed your content
@robertorguez8148
@robertorguez8148 9 ай бұрын
Coding is the best plan for a saturday evening! Period.
@mustafa02-c6x
@mustafa02-c6x 10 ай бұрын
Seeing the result of your work in front of you is amazing Nice work
@alexeykhrapko401
@alexeykhrapko401 10 ай бұрын
I expected to see usage of Sliding window algorithm for the snake cause it fits here perfectly. But that is a bit more advanced approach for this video.
@serloinz
@serloinz 10 ай бұрын
from what i remember about programming the delay from your keyboard to the snake (where it feels like it's not responsive) it's probably from your tick rate ..clock.tick(10) ..as it's not polling the keyboard as often. 60 would feel more responsive but you would obviously have to find another way to slow down your snake. I could totally be wrong but that's what my instinct tells me it is :)
@lancemarchetti8673
@lancemarchetti8673 10 ай бұрын
Great upload! I'm definitely sending this to Matthew Berman.. he's gonna love it. He literally tested about 20 different LLMs, instructing them to create a simple snake game in py... and AI is still trying to get it right... lol.
@justplayinggames963
@justplayinggames963 9 ай бұрын
I don't know why coding looks so HOT
@QuantumMeme
@QuantumMeme 7 ай бұрын
Hello, I'm new in pyhton developing... in the video 1:01 in that time you installed oygame module can you clearfy it! please!!!
@bumbam123
@bumbam123 10 ай бұрын
Oh that's funny. "I won't do object-oriented, I will do spahetti-code instead". There is a huge world of procedural programming, some years back it was the way to write code. Procedural code is still a big part of your operating system. Not being object-oriented is not inherently bad, it's a completely normal way of doing things done
@CSJackie
@CSJackie 10 ай бұрын
yes I like your point of view!
@ShinigamiGrin
@ShinigamiGrin 9 ай бұрын
@@CSJackieit’s a fact not just a pov, it’s how things work….
@Shr11mp
@Shr11mp 9 ай бұрын
Yeah, I took that as a personal attack when she said that 😆 OO is 90% of the time doodoo. A blend of procedural and functional is the way to go with sooo many scenarios. I can’t remember the last time I wrote OO, probably did a little bit right out of college, but that’s about it.
@rockinvegan1765
@rockinvegan1765 10 ай бұрын
Haha, I tried to program this game 35 years ago in Turbo Pascal.
@CSJackie
@CSJackie 10 ай бұрын
😭 👑
10 ай бұрын
Jackie, weird question but where did you get your vest/sweater? My wife has always cold hands and this looks like half the solution of a sweater and hardwarmer in one 😆. Your content is very relaxing, keep it up 👍
@CSJackie
@CSJackie 10 ай бұрын
Thank you so much! This one is from Amazon but I have a similar one from lululemon which also has the thumb slots lol 😄 the lululemon define jacket is amazing you can have a look!
@Jibril_Abdulkadir
@Jibril_Abdulkadir 10 ай бұрын
Great vid Jackie 🩵
@CSJackie
@CSJackie 10 ай бұрын
Thank you 🥹
@moonshadows11
@moonshadows11 7 ай бұрын
You are a good programmer 💜
@qayyax
@qayyax 10 ай бұрын
I really love this video
@shadows_122
@shadows_122 10 ай бұрын
14:41 is the face i make when something really simple that is not working for me 😂😂😂 Sudoku or Chess might be a good challenge by the way
@CSJackie
@CSJackie 10 ай бұрын
haha we're the same. oh my, challenge accepted! :D
@Netryon
@Netryon 10 ай бұрын
One thing you wished to do is HTML CSS animating, because you know how easy is to move absolute square inline-block with arrows changing the x,y value as modern react/angular renders website not having to reload it or save and preload reinstalled graphics driver. Can build it, but from my experience I know must have that Laravel/symfony/.net core framework and don't spend your time on easy tasks already build by everybody else, which every empty youtube channel is obviously not and I can't paly it on fb.
@diya.codes93
@diya.codes93 10 ай бұрын
Hey Jackie, you plan to do more videos like this one? For example showing some backend or full stack?
@CSJackie
@CSJackie 10 ай бұрын
If that’s what you guys want, then absolutely 😊 I did a few in the past
@Velvetskyy
@Velvetskyy 10 ай бұрын
Oh greate usefull video we miss uh and pls try to upload video daily lot's of ❤😊
@CSJackie
@CSJackie 10 ай бұрын
Thank you so much!
@oscarmacho2798
@oscarmacho2798 8 ай бұрын
What font do you use in VS Code? It looks very neat and clear
@andy_palms
@andy_palms 10 ай бұрын
python is so cool! good video, greetings 🙂
@Deepak-ji3cx
@Deepak-ji3cx 4 ай бұрын
Keyboard giving really good ASMR
@MudasirChanna-m3d
@MudasirChanna-m3d 10 ай бұрын
You are a pretty good teacher like a lecturer, I love you so much !!
@contaassinante5984
@contaassinante5984 10 ай бұрын
I didn't like seeing Procedural programming used, but I thought the result and the programmer were really beautiful.
@minskwatcher
@minskwatcher 10 ай бұрын
As a dev with 10+ yr experience, I'd like to just say thank you.
@CSJackie
@CSJackie 10 ай бұрын
thank you for watching! :)
@minskwatcher
@minskwatcher 10 ай бұрын
@@CSJackie it is suddenly way more relaxing to watch someone else code, especially when they do it nicely :)
@nunoalexandre6408
@nunoalexandre6408 10 ай бұрын
Love it!!!!!!!!!! Sooooo Beautifulll...Code....
@CSJackie
@CSJackie 10 ай бұрын
Thank you!!
@wartyrant8627
@wartyrant8627 10 ай бұрын
11:22 ASMR segment 🚶🏼‍♀️🥤🫧
@pflagler
@pflagler 8 ай бұрын
The game is delayed in responding to your keyboard inputs because you lowered the framerate of your main loop to 10 FPS. If a keystroke happens between frames, the loop doesn't catch it. Instead, I would recommend setting the framerate back to 60 and limit the speed of your snake a different way, like only moving it once every 3 frames, for example. You can use a variable to modify the speed, which you would want to do if you plan to accommodate multiple difficulties.
@CSJackie
@CSJackie 8 ай бұрын
Ah makes sense, thanks so much!!
@adebayoemmanuel911
@adebayoemmanuel911 10 ай бұрын
People like you make me fall in love with Programming ❤ Thank you so much ❤
@Stephen_2330
@Stephen_2330 10 ай бұрын
Look who I found because of KZbin 🎉, and as a student of CS, I’m doing my thesis about a Web app😊
@question2779
@question2779 8 ай бұрын
as i work a lot doing hard stuffs like automations, softwares and things like this, when i reach at home i can´t even think about programming, i need plays video games
@rafinayel-r2q
@rafinayel-r2q 10 ай бұрын
very cool video 💯
@jorgeraymason
@jorgeraymason 10 ай бұрын
Not a huge fan of Python but your problem solving skills are on P O I N T.
@astralnomad
@astralnomad 8 ай бұрын
Snake game actually goes back much farther than the Nokia.. it came out in the late 70s for simple home computers..
@The.love1
@The.love1 8 ай бұрын
amazing video ...plz continue and can you advice me what should i learn next i have just finished learning all python sntax and now i feel can not create this py game by my self ..plz tell me and thank you
@JacquellynStuyvesant
@JacquellynStuyvesant 10 ай бұрын
This video is incredible! What theme do you use?
@CSJackie
@CSJackie 10 ай бұрын
thank you so much!!
@JacquellynStuyvesant
@JacquellynStuyvesant 10 ай бұрын
thank you
@kadirdagkoylu210
@kadirdagkoylu210 10 ай бұрын
i realy like it and please can u do more project video
@PointEndClick
@PointEndClick 10 ай бұрын
This video is awesome.
@CSJackie
@CSJackie 9 ай бұрын
Thank you 🥹
@LuisLopez-ns6yg
@LuisLopez-ns6yg 9 ай бұрын
Hi Jackie great video I'm starting coding, I have a question recently I bought a ultrawide monitor like yours and I would like to know the dimensions of your desk in order to have a good workspace. Thanks in advance!
@Nejosudo
@Nejosudo 10 ай бұрын
No se que dijiste claramente, pero entendí todo jaja me enamore del canal
@Abdullah-zl9ub
@Abdullah-zl9ub 10 ай бұрын
I like these coding videos! Also I like how your genuine I your posts. Quick 2 questions: what’s your thoughts on SwiftUi? Is m1 MacBook Air a good upgrade and can code on it? (Using pro 2015 currently)
@freepythoncode
@freepythoncode 10 ай бұрын
Thank you so much 🙂❤
@eytanbenittah
@eytanbenittah 7 ай бұрын
What keyboard and switches are you using?
@danielessien5256
@danielessien5256 10 ай бұрын
When is the iterm2 setup releasing??
@sciutosat6959
@sciutosat6959 9 ай бұрын
im in love with you after watching this video
@Den-zt4ry
@Den-zt4ry 8 ай бұрын
nice video. good job
@CSJackie
@CSJackie 8 ай бұрын
Thanks! :)
@UCcdTp7XpCkVLkaRCsDcifFg
@UCcdTp7XpCkVLkaRCsDcifFg 10 ай бұрын
yes i know this game, ikd enought
@x12_79
@x12_79 10 ай бұрын
I feel like the input issue is caused by the low frame rate. You could try and increase the frame rate to 60 again but create a simple timer to tell the snake when it can move.
@CSJackie
@CSJackie 10 ай бұрын
Yes I think that would be a great way of handling this!
@eric-222
@eric-222 10 ай бұрын
Maestro!
@CSJackie
@CSJackie 10 ай бұрын
😂🫶
@vilmarcabanero2500
@vilmarcabanero2500 10 ай бұрын
That's cool! Btw, can you share what brand of keyboard you have? It's cute. Haha.
@CSJackie
@CSJackie 9 ай бұрын
It’s Royal Kludge ☺️
@vilmarcabanero2500
@vilmarcabanero2500 9 ай бұрын
@@CSJackie Thank you. ☺
@xinzeng-iq7zv
@xinzeng-iq7zv 7 ай бұрын
can u upload that game to your website for download
@ДаниилБей-ж8в
@ДаниилБей-ж8в 10 ай бұрын
You are well done
@clonefiesta5835
@clonefiesta5835 8 ай бұрын
please tell me which keyboard you're using
@CSJackie
@CSJackie 8 ай бұрын
Royal kludge rk68!
@clonefiesta5835
@clonefiesta5835 8 ай бұрын
@@CSJackie tysm, love your content!!
@tamantije2463
@tamantije2463 8 ай бұрын
Do you have any python tutorial for beginners? I would love to see that.
@Goodprogramer
@Goodprogramer 10 ай бұрын
Great video with a great coding and inspirational content.following you so long .can you code a saas website?
@Zer0kbps
@Zer0kbps 8 ай бұрын
My PowerShell scripts always look like spaghetti on reflection and I can seldom read them after a few weeks, it's the human way I'm sure. I wonder if you could take your code and put it through chatgpt and ask it to make it look pretty, would it still work after is the question...I must try it?
@micwax
@micwax 10 ай бұрын
Great video . Can you put your gear info into your profile? I like your keyboard better than the one who came with my iMac. For coding, it's not the best. Thanks!
@waqarkhanpisces
@waqarkhanpisces 7 ай бұрын
how many month did you take to learn coding ?
@devoiddude
@devoiddude 10 ай бұрын
Is that fleet you're using ?
@pegasusagus391
@pegasusagus391 10 ай бұрын
which compiler are you using? thanks
@durchschnittlich
@durchschnittlich 10 ай бұрын
Python doesn't compile
@pegasusagus391
@pegasusagus391 10 ай бұрын
thanks@@durchschnittlich
@draoi99
@draoi99 10 ай бұрын
Well, I played Tetris for the most part.
@CSJackie
@CSJackie 10 ай бұрын
I'll try that one next!!
@cherymara
@cherymara 7 ай бұрын
please tell me what kind of computer mouse is this
@edward3105
@edward3105 9 ай бұрын
for how much time do you own that chinesse chair,is it good,does it worth the money?
@mrflexii2067
@mrflexii2067 10 ай бұрын
Even the simple games can take hours to code :D
@MohammediAbderraouf-v2q
@MohammediAbderraouf-v2q 10 ай бұрын
what is the keyboard you are using?
@CSJackie
@CSJackie 10 ай бұрын
Royal kludge rk68
@Rahul-rawat-01
@Rahul-rawat-01 9 ай бұрын
Which IDE do you use . Please reply, Love from India ❤❤
@hadasaBosola
@hadasaBosola Ай бұрын
pls the pygame window is not opening plz help me😭😭😭😭😭😭
@CSJackie
@CSJackie Ай бұрын
I know the feeling
@hadasaBosola
@hadasaBosola Ай бұрын
@@CSJackieplz can you help me
@marcoio8742
@marcoio8742 10 ай бұрын
A file with 600 lines of code? I have seen functions with 800 lines of code in files with >3k lines. Oh no comments nor docstrings. That was hardcore
@michaeltse321
@michaeltse321 8 ай бұрын
no problem. chatgpt please refactor lol
@arwahassan54
@arwahassan54 10 ай бұрын
Which app are you using for coding?
@mrflexii2067
@mrflexii2067 10 ай бұрын
VSCode
CODE WITH ME | Python TETRIS Game OOP [PART 1]
23:50
CS Jackie
Рет қаралды 117 М.
How I learned to Code - my Roadmap | from 0 to Big Tech
16:01
CS Jackie
Рет қаралды 187 М.
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
Une nouvelle voiture pour Noël 🥹
00:28
Nicocapone
Рет қаралды 9 МЛН
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 158 МЛН
Правильный подход к детям
00:18
Beatrise
Рет қаралды 11 МЛН
This is *exactly* how much it costs to run our tech startup on AWS
22:26
I've Read Over 100 Books on Python. Here are the Top 3
9:26
Python Programmer
Рет қаралды 393 М.
Python laid waste to my C++!
17:18
Sheafification of G
Рет қаралды 135 М.
Introducing Clay - High Performance UI Layout in C
35:19
Nic Barker
Рет қаралды 64 М.
Coding Was HARD Until I Learned These 5 Things...
8:34
Elsa Scola
Рет қаралды 798 М.
CODE WITH ME | Python TETRIS Game OOP [PART 2]
25:04
CS Jackie
Рет қаралды 14 М.
Programming with Math | The Lambda Calculus
21:48
Eyesomorphic
Рет қаралды 246 М.
Why You Should Think Twice Before Using Returns in Python
21:27
ArjanCodes
Рет қаралды 44 М.
It’s time to move on from Agile Software Development (It's not working)
11:07
Dependency Injection, The Best Pattern
13:16
CodeAesthetic
Рет қаралды 899 М.
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН