Create A Snake Game in HTML CSS & JavaScript | JavaScript Game Tutorial

preview_player
Показать описание
In this video, I've shown how to Create A Snake Game using HTML, CSS, and JavaScript. This game is designed to be played both on a PC using keyboard arrow keys and on a mobile device using touch-based arrow buttons.

🗂️ Get Source Code of this Snake Game

🌐 Visit CodingNepal for helpful coding projects

⭐ Hire me on Fiverr

📷 Follow me on Instagram

🤝 Support my work with a coffee

🕔 Timestamps:
0:00 Demo of Snake Game
2:24 HTML & CSS Start
5:46 JavaScript Start
06:09 Creating Snake Food & Head
10:41 Moving Snake on Arrow Key Click
15:20 Adding Snake Body Part After Eating Food
19:18 Showing Game Over Alert When Snake Collides with Wall
23:20 Showing Game Over Alert When Snake Hit the Body
24:40 Updating Current Score
26:00 Updating High Score
28: 50 Creating Arrows Button for Touch Devices
30:33 Moving Snake on Arrow Button Click

#javascript #html #css #javascriptprojects #js #javascriptgame

🎵 Music Credit:
Ikson - We Are Free [Official]

Deep Sea by Vendredi

Miss You – LiQWYD
Рекомендации по теме
Комментарии
Автор

18:05 you can create a memory game, where when you reach a control point, which is the light blue dot, the screen will be filled with more light blue dots, the idea is to fill as many dots as possible, if you touch a dot that you already touched, you lose, if you touch the wall, you lose. and you just have to rely on what is in that minute.

devsilva
Автор

i love the way ur using logic .. thank you for your efforts bro

zillalsenmesrane
Автор

Can you create a chess game using HTML, CSS & JS?

Function you may include:
-User can select white side /Black black/Random

-Can include 3 levels: Easy, Medium & Hard.

Thanks!

AriqTech
Автор

Amazing project. Very informative and I got to learn a lot about JavaScript and using logic. Thanks for such videos.

namjotsingh
Автор

This channel is going to be great. Thank for creating awesome contents.

davidconteh
Автор

absolutely loved it. amazing work. you rock man.

rudra
Автор

thank you i had fun creating this and I learned a lot!

Stardippedd
Автор

스네이크 바이트 게임..
Whoo, what a trip down memory lane, huh?

kingchobo
Автор

You guys 're showing only how to create games what 'bout publishe in play store and start Please please please please please guys 🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏

S-Lomar
Автор

😪 I didn't understand how exactly it works "for (let i = snakeBody.length - 1; i > 0; i--) {
// Shifting forward the values of the elements in the snake body by one
snakeBody[i] = snakeBody[i - 1];
}" 18:50

alixerkmir
Автор

😬When I put "if(gameOver) return handleGameOver();" A game simply does not run because of a message "alert("Game Over! Press OK to replay...");" 21:25 🥵

alixerkmir
Автор

What if the food appears in the body of snake?

debabratagon
Автор

Your all videos love it 💕.
Dear can you upload complete HTML, CSS, JavaScript and PHP course with voice Urdu or Hindi . Like frontend and backend development full course.
Bz I'm very excited for this course

GoldDiscover
Автор

lo ví en español.esta bueno la forma que lo hace con grid

luissosa
Автор

Best video, by the way voice ni rakhnu na !!

surajghimire
Автор

Can you add difficulty levels please or can you tell me how to add it

gamingshorts
Автор

Can anyone explain how the snake length expansion is working?

Jay-egmv
Автор

Hey, how do you see the result on browser on vsc?

VortexVibesYT
Автор

Someone please explain the body segment
for(i =snakebody.lenght-1, i > 0,
i--){ snakebody[i]=snakebody[i-1]}

sojibhasan
Автор

changeFoodPosition is not working....help plzz

supriya_codes