Here's a coding challenge that @TheCodingTrain would be proud of! In today's video I create a snake game in JavaScript, HTML and CSS (using the jQuery library).
All the "graphics" are created with HTML and CSS. I should have probably learned the HTML5 canvas by now, but I haven't... So here's the result 😂
#jquery #javascript #html #css #codingchallenge
Find it on GitHub: https://github.com/unconv/jquery-snak...
0:00:00 Intro
0:00:55 Add game canvas
0:02:35 Add snake head to canvas
0:04:07 Add interval
0:05:29 How to use "this" keyword inside setInterval
0:07:19 Make snake head move
0:07:45 Bind arrow keys
0:08:42 Change angle when arrow keys are pressed
0:11:46 Overly complicated direction calculation
0:15:14 Trigonometry lesson
0:18:40 Implementing snake wraparound
0:23:50 Draw snake tail
0:33:18 Implementing tail collision
0:36:55 Implementing game over screen
0:44:10 Implementing play again button
0:48:02 Add food for the snake
0:56:46 Saving highscore to localStorage
0:59:56 Adding eyes to the snake
0:03:36 Outro
Смотрите видео Let's make a jQuery Snake Game! | Why you need trigonometry (and why you don't) онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Unconventional Coding 27 Декабрь 2022, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 581 раз и оно понравилось 14 людям.