How to code Google Chrome Dinosaur Game in JavaScript HTML CSS

preview_player
Показать описание
In this tutorial, you will learn to build the famous google chrome dinosaur game with html, css, and javascript. Specifically, you will learn how to code the game using html5 canvas.

Throughout the tutorial, you will learn how to create the game loop, add images onto the canvas, add click handlers to allow the dinosaur to jump, randomly generate cactuses or cacti and move them across the screen, detect collisions between the dinosaur and each cactus, and add a running score.

Java Game Programming Projects Playlist:

JavaScript Game Programming Projects Playlist:

Subscribe for more coding tutorials 😄!
Рекомендации по теме
Комментарии
Автор

Check out the playlist of web project tutorials here!

Got a tutorial suggestion? Let me know down below!

KennyYipCoding
Автор

Such a surreal moment when I look down at your time, and realize your time lined up with mine (I'm watching this at 4am). Excellent tutorial, and very easy to follow along!

Jokiander
Автор

Great tutorial, thanks! Your explanations are so clear and the pacing is perfect.

yawn
Автор

Great video! I used to work coding with my students and it worked really good. The simplicity helped us to do it rapidly. Unfortunately we have to see many units in few time.

julianrodriguezlopez
Автор

I don’t understand how to do the starting explorer stuff. When I add new folder i get workspace and I don’t know how to change it into dinosaur game with the img and how to separate that from the rest

DeepakSingh-kbon
Автор

I did set the canvas and offset variables as you did, but the green box doesn't appear on my canvas, only when I put lower values, but they're not the right values :/

lofi-fol
Автор

For only 36min of coding, this is impressive

anti-feministblood
Автор

Would you be able to do a tutorial on how to make the ground move. that would be very helpful

sentoo
Автор

i have a problem. when I add the image i put them in the folder, but when I put the "./img/dino.png" it doesn't load. what am i doing wrong?

AceslicerYt
Автор

i did the coding in like 5 mins cause of the links!

YoFrahzrr
Автор

i am not able to load the dino image on the browser. please help

prasannasahoo
Автор

whenever I going live in vs code, the game is not coming, why it is so?

ayushkatare
Автор

10:06 I was wondering which extension you meant.. maybe I just haven't been paying enough attention but I just can't find it-
edit: nvm- i have found out that i spelled img instead of imgs and that's the reason the images didn't show- spent like 30 mins on it as well..

Rdblts
Автор

Hi i saw u did a super mario game on java can you upload the code game pls

idanavisar
Автор

How can I download the dinosaur image or where can I download the dinosaur image and the cactus?

ojevrid
Автор

how do i add the game over and reset>?

ferescalante
Автор

the only thing that doesn’t work for me is my score stays at 0

sentoo