DAY 7 - How to code Snake in Javascript - #100DaysOfCode

preview_player
Показать описание
In today’s tutorial, we create the game Snake, but we add our own unique style and creativity to the game. We create the game using Javascript, HTML5 Canvas and style the page using SASS (CSS).

Get the repo here…

Follow me on Twitter for upload updates…

Check out the game in action on my website...

Thanks for watching!

If you enjoyed, leave a like.
If you want more, then subscribe.

If you have any feedback, drop it in the comments below!

#100DaysOfCode #100DaysOfCodeChallenge
Рекомендации по теме
Комментарии
Автор

Thanks for another great video, even tho many people has done on youtube but for me your teaching style is much more understandable than any other so far, thanks again man !Please keep making more videos :)

jalalsyednaveed
Автор

Are you doing 50day of front end and the other 50 is back end? I really appreciate your video. These are life savers.

phichau
Автор

thank you, great tutorial, can you please go over how to make a server with node.js and serve, thank you!

bjni
Автор

Unrelated Question - There is this website called airconsole()com which allows us to use our phone as a remote controller to play games in on their website in browser, Any idea how to go forward with adding that functionality to this game?

kshitijvengurlekar
Автор

Love this tutorial! Newb question: how do you get your SASS to compile down to CSS when you save it and into the folder you want? Is it a VSCode extension?

phickman
Автор

Did not understand the loop which you used to bring the snake back when it escapes the canvas


if (snake.x < 0) {
snake.x = canvas.width - grid;
} else if (snake.x >= canvas.width) {
snake.x = 0;
}
??


EDIT - Also why did you choose 24 and 14 while spawning apple, I could not understand that pixel division?

kshitijvengurlekar
Автор

what program are you using to write your code in?

blismatic
Автор

Vs code versus sublime, can you comment on that?

bjni
Автор

Does this not work on "Live Server" of VSCode?
EDIT - It works on Live Server.


However it throws this error - Uncaught SyntaxError: Unexpected token < ???


Stackoverflow says 'Just an FYI for people who might have the same problem -- I just had to make my server send back the JSON as application/json and the default jQuery handler worked fine.'

kshitijvengurlekar
visit shbcf.ru