You've definitely made coding fun for me. Please keep making these games and you're a great instructor.
not sure if this is mentioned but "keyCode" is deprecated. New solution: document.addEventListener('keydown', (event) => { console.log(event.key) switch (event.key){ case 'a' : break case 's': break case 'd': player.velocity.x += 1 break case 'w': player.velocity.y -= 20 break case 'ArrowLeft' : break case 'ArrowDown': break case 'ArrowRight': player.velocity.x += 1 break case 'ArrowUp': player.velocity.y -= 20 break } })
I reaaaally love how you scale up the complexity of the game very very cautious and carefully, introducing concepts with as much depth as necessary instead of just dropping concepts in randomly. That makes your tuts really outstanding. Hope you will also do more on BabylonJS again :D
Excellent way to learn how to download the game without any inconvenience, very easy to follow the steps you indicate š
Great tutorial! Thank you so much! It helps me kickstart my Javascript learning journey. Just want to add a little tweak I did on my attempt. If you hold the "UP" key, it will make your "player" kind of flying. I added if (event.repeat) { return } to prevent holding the UP key sending the player flying. It goes something like this: addEventListener('keyDown', ({ keyCode }) => { switch (keyCode) { case 38: if (event.repeat) { return } player.velocity.y += -20 break } }) note: I bind the key UP instead of W hence the case 38
Chris! your voice is so relaxing when I wasn't falling asleep I just watched your tutorial and in the next 5 mins, I fell asleep lol. anyway, good job I really love the way you teach.
The only programming tutorial I've watched from start to finish without taking a break! Very fun tutorial!
Little tweak to add the effect of 'friction' to the player: if(keys.right.pressed) { player.velocity.x = 5; } else if(keys.left.pressed) { player.velocity.x = -5; } else { player.velocity.x *= 0.9; }
I have been following and watching the playlist you created for HTML 5 canvas and I just pause here and say a big Thank you for this content Chris, Iām learning soo much ⤠Even tho I know ThreeJs, learning concepts like collision detection was a real step up for me, God bless you man
thx for yet another excelent tutorial! I'm loving your lessons, programming has been fun once again ^^ tip, for death pits u could just reset player Y and X position back to 0, 20 to get back where u started on the screen. and reset objects to their positions so the entire screen gets realocated to their original position, too. reset objects first, or else your player could land on another death pit and fall into a loop depending how u designed the level. it fits all kinds of levels this way.
Purchasing your course now brother. There is literally nowhere else that teaches you how to do this. Thanks man!
This is one of the best tutorial I've ever seen, thank you so much for your hard work
Oh maaan, I've been waiting for this!! Thanks Chris, looks dope
How in the world do people know how to fix this stuff!? Legends, you're all legends
You're fast and you're informative. Really enjoying your content.
One of the best tutorials for javascript game development. It's a lot of fun to follow along your tutorials.
Have been following your canvas game tutorials so I can make games for my daughter and also get her interested in programming. Thank you Chris
Working with collisions was interesting and allowed me to play around with the values. But the topic of using sprites was a bit confusing and requires a separate theoretical breakdown. You need to put theoretical elements and a bit of history into courses as you did before. The main problem for beginners is the inability to set up a local server. An up-to-date guide is needed.
I stuck by image 56:38 :( there are several options. for example image in html file? Please
@ireenehabeeb2223