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
"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.
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
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 :)
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.
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.
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.
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).
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
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
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.
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 💪
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!
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 :)
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 TH-cam 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)]
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.
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)
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.
You are a pretty good teacher like a lecturer, I love you so much !!
7 หลายเดือนก่อน +2
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 👍
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!
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.
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
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
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.
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)
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.
finally female software engineer who dares to show her coding process. and not just making content about fiction daily routine which is far from reality.
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?
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!
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!
I guess you've also generated a random position to put your Camera View on the center of code :) Why you did not put on right top or bottom corner where there will be no any code ?
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
"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.
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
You proyect Is shixt
You proyect Is boring
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 :)
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.
i laughed out loud at your comment
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.
Dude you're the coolest tutor I've got! The way you're explaining makes so much more easier at least for my understanding.♥
Awesome, thank you so much!
I'm really glad I found this channel, I really like these coding videos.
i loved watching you solve the problems and being happy when something works.
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.
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.
haha for sure! thank you so much :)
I don't have idea what you're talking about but I'll watch and listen
I feel the same!
🤣
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).
Hello my best instructor. Congratulations on this incredible tutorial!
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
thank you so much :)
@CSJackie PS It would also be great to see how you approached this OO in python too, as a comparison
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
yes I like your point of view!
@@CSJackieit’s a fact not just a pov, it’s how things work….
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.
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 💪
Welcome back, MISSED YOU SOOOO MUCH😘
🥹 I missed you guys
Well done. I find it humbling to realize that I put in all of the errors in my code.
this video is so wholesome 😂
thank you
loved this problem solving challenge
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
Loved learning this and coding along. I also love your random trail of thoughts ♥
Glad you made it through Amazon video layoffs. Go Jackie! Another relaxing video, thanks!
I don’t know yet (European laws delay the process) so please pray for me 😃
you're coding skills are really good really looking forward for more of youre videos
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.
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!
Coding is the best plan for a saturday evening! Period.
Please do more of this stuff... it helps me so much
Thanks so much, I used this to get refreshed back into python, appreciated!
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 :)
Keyboard giving really good ASMR
why you look so beautiful when wearing glasses?🥹
Edited :- Your coding thinking is so good btw great video ❤️
People like you make me fall in love with Programming ❤
Thank you so much ❤
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 TH-cam 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)]
Very Nice and Helpful Tutorial. Thank You
I can remember, did this a my first university project, ASCII snake in the terminal haha, lots of fun :D
it's so fun!! my comp sci colleagues said they also coded this at uni haha
Lol, I also coded snake in the terminal with C++ and I uploaded a video on my channel
Seeing the result of your work in front of you is amazing
Nice work
Haha, I tried to program this game 35 years ago in Turbo Pascal.
😭 👑
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.
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
haha we're the same. oh my, challenge accepted! :D
I didn't like seeing Procedural programming used, but I thought the result and the programmer were really beautiful.
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)
Thank you! Yes? the next one will be tic tac toe 🥹
Yes*
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.
Very Nice. Good Work and this is the beginning.
Oh greate usefull video we miss uh and pls try to upload video daily lot's of ❤😊
Thank you so much!
I Loved You~r Desktop monitor 🤩
I Not engineer but loveed your content
You are a pretty good teacher like a lecturer, I love you so much !!
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 👍
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!
Look who I found because of TH-cam 🎉, and as a student of CS, I’m doing my thesis about a Web app😊
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.
Not a huge fan of Python but your problem solving skills are on P O I N T.
As a dev with 10+ yr experience, I'd like to just say thank you.
thank you for watching! :)
@@CSJackie it is suddenly way more relaxing to watch someone else code, especially when they do it nicely :)
Snake game actually goes back much farther than the Nokia.. it came out in the late 70s for simple home computers..
11:22 ASMR segment 🚶🏼♀️🥤🫧
You are a good programmer 💜
I really love this video
Hey Jackie, you plan to do more videos like this one? For example showing some backend or full stack?
If that’s what you guys want, then absolutely 😊 I did a few in the past
python is so cool! good video, greetings 🙂
Do you have any python tutorial for beginners? I would love to see that.
Great vid Jackie 🩵
Thank you 🥹
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
nice video. good job
Thanks! :)
Love it!!!!!!!!!! Sooooo Beautifulll...Code....
Thank you!!
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
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.
Ah makes sense, thanks so much!!
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
no problem. chatgpt please refactor lol
Thank you so much 🙂❤
Even the simple games can take hours to code :D
very cool video 💯
I don't know why coding looks so HOT
What font do you use in VS Code? It looks very neat and clear
Well, I played Tetris for the most part.
I'll try that one next!!
im in love with you after watching this video
This video is awesome.
Thank you 🥹
i realy like it and please can u do more project video
No se que dijiste claramente, pero entendí todo jaja me enamore del canal
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)
yes i know this game, ikd enought
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.
Yes I think that would be a great way of handling this!
You are well done
Maestro!
😂🫶
finally female software engineer who dares to show her coding process. and not just making content about fiction daily routine which is far from reality.
very nice..
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?
better to start with the design and pencil and paper lol
Hello, I'm new in pyhton developing... in the video 1:01 in that time you installed oygame module can you clearfy it! please!!!
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!
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!
Python by Quistis Trepe 🎉
Do snake in assembly 😂
I guess you've also generated a random position to put your Camera View on the center of code :) Why you did not put on right top or bottom corner where there will be no any code ?
i am a mechanical engineer
how can i learn python and get benefit from it?
can you guide?
Great video. But why are you wearing shoes in your apartment? Aint it uncomfortable?
😂 tbh I had just gone for a walk and forgot to take them off
Great video with a great coding and inspirational content.following you so long .can you code a saas website?
great, thanks
🫶
cute girl writing a video game and teaching practical coding on a very empirical level.
I am happy🙃
Which IDE do you use . Please reply,
Love from India ❤❤
This video is incredible! What theme do you use?
thank you so much!!
thank you
When is the iterm2 setup releasing??
can u upload that game to your website for download
I am doing that in java and swing 🙂.
lets meet up and bring some nibbles together and have some bytes