JavaScript Fighting Game Tutorial with HTML Canvas

  Рет қаралды 4,945,998

Chris Courses

Chris Courses

Күн бұрын

My premium game dev courses: chriscourses.com/
Here you'll learn how to create your very first fighting game with JavaScript and HTML canvas. We'll start by coding some basic fighting game mechanics, then we'll take things to the next level by adding in professional sprite sheets and graphics.
Google Drive Assets: drive.google.com/drive/folder...
Finished Demo: chriscourses-fighting-game.ne...
Source Code: github.com/chriscourses/fight...
Oak Woods Assets: brullov.itch.io/oak-woods
Fighter Asset #1: luizmelo.itch.io/martial-hero
Fighter Asset #2: luizmelo.itch.io/martial-hero-2
0:00 Introduction
0:43 Project Setup
8:07 Create Player and Enemy
28:00 Move Characters with Event Listeners
50:12 Attacks
1:11:31 Health Bar Interface
1:34:27 Game Timers and Game Over
1:51:27 Background Sprite
2:05:10 Shop Sprite with Animation
2:23:08 Player Sprite - Idle
2:36:24 Player Sprite - Run
2:43:39 Player Sprite - Jump
2:58:03 Player Sprite - Attack
3:01:53 Enemy Sprite - Kenji
3:07:04 React to Sprite Attacks
3:20:32 Receive Hit Animation
3:29:11 Death Animation
3:35:32 Interface Design and Animation
3:49:55 Push Live
3:55:57 End

Пікірлер: 1 700
@jasonbatester5784
@jasonbatester5784 2 жыл бұрын
-1 minute: Oh, great! I can maybe learn 1 or 2 in JavaScript. -10 minutes: This is awesome, I'm learning so many new things in JavaScript with ease. Hit Liked and Subscribed. -30 minutes: Damn, I have a future in Game Development. -50 minutes: Shttt, I'm overloaded with Information and Ideas now of what Game I'll be doing. -60 minutes: Hands down! This Tutorial is the best I have seen. After 1 Hour of appreciation, realized to check how many views did this tutorial accumulated now. Sad to say that it only has more than 100k Views. 😢. Everyone! Let's help the man spread this JavaScript tutorial to show our appreciation for uploading a very informative video for FREE.
@TheOnlySirC
@TheOnlySirC 2 жыл бұрын
It's at 475k views now? What do you mean?
@unibrow9384
@unibrow9384 2 жыл бұрын
Do i need to know canvas before starting this project?
@jasonbatester5784
@jasonbatester5784 2 жыл бұрын
@@unibrow9384 no. But u need to have background in Programming to understand. Specially in constructors class and methods.
@jasonbatester5784
@jasonbatester5784 2 жыл бұрын
@@TheOnlySirC yah, it's good and I'm happy as he deserves views more than that with the value of the tutorial.
@unibrow9384
@unibrow9384 2 жыл бұрын
@@jasonbatester5784 Yeah, I'm familiar with those and JS as well.
@Yohoho134
@Yohoho134 18 күн бұрын
The fact that me and many other people just woke up to this playing makes me wonder if most of the views this video gets is from people not even trying to watch the video
@CHURCHISAWESUM
@CHURCHISAWESUM 4 күн бұрын
Well JavaScript does put people to sleep
@adamrobertson2048
@adamrobertson2048 2 күн бұрын
wtf this just happened to me too
@abutohan
@abutohan 2 күн бұрын
This video was always recommended to me when I'm asleep listening to KZfaq.
@lazygamer923
@lazygamer923 Күн бұрын
​@@adamrobertson2048Yeah me too and this is weird
@MaQueRS
@MaQueRS Күн бұрын
D m😮😊😅😊😊​@@lazygamer923
@lolcat69
@lolcat69 Ай бұрын
Bro, I went to sleep, I woke up and this was here Update: IT HAPPENED AGAIN WTH
@onmindsoul
@onmindsoul Ай бұрын
Me too
@SavageGTI
@SavageGTI Ай бұрын
Haha I was watching a blender tutorial and fell asleep and woke to this. but I also use HTML and JS
@lolcat69
@lolcat69 Ай бұрын
@@SavageGTI same, I am also a programmer but, why always this video? Why my cellphone just decides to stop at this exact video?
@Ahmedjerjawi
@Ahmedjerjawi Ай бұрын
Huh first time ? I don't why I wake up to this and other vid a full assembly course so I am doul learning while sleeping 😂😂​@@lolcat69
@DoomedVortex
@DoomedVortex Ай бұрын
same
@pooperspaniol
@pooperspaniol Ай бұрын
did anyone else wake up to this
@grantklinger7249
@grantklinger7249 Ай бұрын
Yeah wtff?
@TheMightyGamingChannel
@TheMightyGamingChannel Ай бұрын
yea me 2
@ahassay
@ahassay Ай бұрын
Yes. Weird isn’t it?
@Milksy
@Milksy Ай бұрын
Yes 😂
@apockylypse101
@apockylypse101 Ай бұрын
ME TOO
@Aceofspadesvr
@Aceofspadesvr Ай бұрын
Who else woke up here
@andongoshev4146
@andongoshev4146 22 күн бұрын
Omfg i woke up without even knowing that im watching that video
@brazilianboss10
@brazilianboss10 14 күн бұрын
how the fuck are we all waking up to this video
@NYI2010
@NYI2010 12 күн бұрын
2 hours mind you I think I got drugged 😅😅
@BucketHatGang568
@BucketHatGang568 12 күн бұрын
Bro Yes
@therealtroy8275
@therealtroy8275 12 күн бұрын
Fell asleep watching LGR
@Oogabooga147
@Oogabooga147 Ай бұрын
Why and how is everyone (including me) waking up to this video. I was watching a slow mo guys video last night and this is playing in the morning. Might as well stick around. This seems kinda fun
@IronSharpensIronOfficial
@IronSharpensIronOfficial 14 күн бұрын
This is gonna be very out of context but Anyone noticed that 💀 has became the new O_O
@Kopano.Tlali69
@Kopano.Tlali69 14 күн бұрын
it keeps happening
@Oogabooga147
@Oogabooga147 12 күн бұрын
Oh my god not again
@almightyrocket2464
@almightyrocket2464 11 күн бұрын
@@Oogabooga147Lmao time to become a developer bud
@cabin98
@cabin98 2 күн бұрын
Bruh I was watching the Technology Connections video about flash photography featuring Gavin from the Slo Mo Guys.
@flowthebro
@flowthebro Ай бұрын
I was scrolling through my KZfaq history and figured out that this video was running while I was sleeping.
@Sophie-vb3vs
@Sophie-vb3vs Ай бұрын
ME TOO
@kill4ill
@kill4ill Ай бұрын
Wth me too lol
@matthewandrews1789
@matthewandrews1789 Ай бұрын
yeah me as well lmaooo
@banditgta4629
@banditgta4629 28 күн бұрын
Same so annoying
@IronSharpensIronOfficial
@IronSharpensIronOfficial 21 күн бұрын
Yeah!
@yup9918
@yup9918 17 күн бұрын
I used to wake up to a video of a guy in a field raining asmr, but now I’ve awoken to this. Perhaps a new era in my life has started.
@bradentheman1373
@bradentheman1373 Күн бұрын
why did this make me emotional
@InfinityHS
@InfinityHS Күн бұрын
LMFAOOOOOOOOOOOO
@lego_droid1396
@lego_droid1396 Ай бұрын
Just woke up and I realize that I actually learn more stuff from this man while I was sleeping then I learned in school.
@BigD224
@BigD224 21 күн бұрын
Dude what. How is everyone waking up to this, i fell asleep watching zelda gameplay. How did i make it 40 mins into this video
@raffazaver
@raffazaver Ай бұрын
Absolutely amazing tutorial i literally watched 1h while asleep😂 and i learned so much. Btw why do everybody else wake up to this video
@Jabranalibabry
@Jabranalibabry Ай бұрын
Yeah, quite a few of us. I've become a sleep coder by now lol
@elmalleable
@elmalleable 24 күн бұрын
Hmmm it might be a suggestion feature triggered by time of day. If everyone is getting under the same circumstances.
@Bighaid91
@Bighaid91 20 күн бұрын
I watched all 4 lol
@joshluna1956
@joshluna1956 14 күн бұрын
God is tryna tell us something lolol
@Jabranalibabry
@Jabranalibabry 14 күн бұрын
@@joshluna1956 make games?
@Luger__
@Luger__ Ай бұрын
Howd i wake up here
@elmalleable
@elmalleable 24 күн бұрын
I slept watching mkbhd waveform. Woke up to this. I've been on and off trying to learn game prgrmn. This is incredible
@StrixsMC
@StrixsMC 14 күн бұрын
Literally i'm here bc the fucking same reason
@tyalk_3565
@tyalk_3565 Күн бұрын
same😂
@melaniebaldwin2766
@melaniebaldwin2766 6 ай бұрын
I woke up to watching this video and am now following the tutorial for fun. I don't know how I ended up here but I am glad. Thank you for making this video
@David-hl1wo
@David-hl1wo 2 жыл бұрын
This man is giving these tutorials for free! What a beast.
@skapha
@skapha 2 жыл бұрын
Indeed!
@zenobiusztasak8604
@zenobiusztasak8604 2 жыл бұрын
@Focus making people happy makes him rich
@GeekBastion
@GeekBastion 2 жыл бұрын
there is something called AdSense
@ChrisCourses
@ChrisCourses 2 жыл бұрын
@@GeekBastion And AdBlock 😉
@GeekBastion
@GeekBastion 2 жыл бұрын
@@ChrisCourses unfortunately that is something that sucks for content creators on KZfaq but you guys can have paid ads inside the video itself and you talking about it so AdBlock is useless in that case
@timnonik2736
@timnonik2736 2 жыл бұрын
I've only seen 46 minutes so far but this is one of the best tutorial i've ever seen. I think the most complicated part of coding is finding the best way to summarize the logic into objects and decide what has to be structed and what not.
@neilquechon8716
@neilquechon8716 2 жыл бұрын
I'm curently on a little game project to improve my skills (a mix between fire emblem and advance wars).... and ilt's exactly the part I am struggling with now 😅
@timnonik2736
@timnonik2736 2 жыл бұрын
​@@neilquechon8716 Same. I'm currently busy with a WoW-bot (I know, don't you judge me). Since there is a cut-down version of LUA beeing used by the game, object orientated programming does not really work that well. Also the platform I use does not allow to split your scripts into multiple files, so the result is around 3k lines of code. The project isn't really fun anymore, because its just so hard to find what you're looking for in such a mess. I hope to be soon done with this, to focus on licensing the software and other cool stuff.
@neilquechon8716
@neilquechon8716 2 жыл бұрын
@@timnonik2736 For now I feel a little the same. I sometime try to think to far ahead and it seem a little overwhelming to make a architecture who would easily fit everything. So I try to cut these thougts and find a good balance between "ok, this is solid" and "ok for know" But for my part I know that if I do sufficently well, the project would become funnier and funnier to work on
@timnonik2736
@timnonik2736 2 жыл бұрын
@@neilquechon8716 Yep. Thats what happens a lot to me, and if I realise that my way makes no sense, it frustrates me. Even tho this is normal, you cant just come up with the perfect way to do it in first place. Maybe your first approach will rise in quality over time with different projects, but you cant expect it to be perfect in first place.
@sauceprovider3171
@sauceprovider3171 2 жыл бұрын
kzfaq.info/get/bejne/os6FoMxjnMmok6c.html the sauce
@yeomanvanzyl367
@yeomanvanzyl367 26 күн бұрын
This is like the 6th time your videos came up while I was asleep....the algorithm clearly likes you😂
@laxlyfters8695
@laxlyfters8695 2 жыл бұрын
This tutorial is amazing I learned so much about inheritance and constructors made sense for the first time ever and now class components, hooks and props now make more sense I used to get so confused about "passing props" so much was shown here, switch, cases, conditionals, classes understanding the scope of this. Amazing so much learning without realizing it
@Fighterofthenightman_
@Fighterofthenightman_ 4 ай бұрын
I’ve never watched any coding videos or any videos like this ever I fell asleep with KZfaq on and woke up halfway through at 3 am 😂
@jpm7049
@jpm7049 2 жыл бұрын
Been studying CS for about a year, I could never write this on my own yet but I’m following 95% of what your doing. Thanks for this, big help and confidence booster.
@emiratesandindonesia
@emiratesandindonesia Жыл бұрын
same here im kinda new to javascript
@PavelNebo
@PavelNebo Жыл бұрын
never say never :)
@user-wo8hk2bm2n
@user-wo8hk2bm2n 10 ай бұрын
you can, bro. You know it deep inside, everyone knows actually)
@mufeng4182
@mufeng4182 2 жыл бұрын
This is just AMAZING! thanks Chris! Hope to see more of your high-quality tutorial
@ahmadkhaled7497
@ahmadkhaled7497 Жыл бұрын
I can't thank you enough for the amount of info that you've provided. I started this project a month ago and now I can gladly say that l've finished my first big project / game using JS. Thank you sooo much Chris, Respect from Egypt.
@danielwilde6626
@danielwilde6626 2 жыл бұрын
Thank you very much for a another great tutorial. I have learn so much from you, you cant imagine. Chris you are the best! A very VERY good teacher. Stay healthy and strong!
@micemincer
@micemincer 2 жыл бұрын
I've only seen 28 minutes so far but this is one of the best tutorial I've ever seen. A blessing.
@collincurtis3182
@collincurtis3182 6 ай бұрын
Literally same for me. I've only been coding for a month or so at this point, and not even JavaScript yet, but this still helped me understand a lot of functionality.
@jellertja
@jellertja 2 жыл бұрын
Man i wish you were around when i first started learning JS. Would have made it sooo much easier! Really amazing tutorial! Please continue with these long in-depth tutorials, you're doing really great! Thanks alot man!
@tomasburian6550
@tomasburian6550 2 жыл бұрын
This is the bomb, love creating games in JS! Love 2D fighters (Street Fighters), isometric fighters (Final Fight) and racing games (Outrun) and making their counterparts in JS. What a great tool! :)
@smarkbark
@smarkbark 2 жыл бұрын
I spent all weekend going through this and building along. This was so amazing. Thank for sharing this.
@battlewhite5082
@battlewhite5082 6 ай бұрын
the game is responsive ?
@TDAK1509
@TDAK1509 2 жыл бұрын
This is an amazing tutorial, it goes step by step, which should also be how we should do it in real projects, adding stuffs when we need them.
@jerzykepinski
@jerzykepinski Жыл бұрын
Man this is fantastic. I love how you explain every single detail and also add context.
@IllustriousMelchior
@IllustriousMelchior 2 жыл бұрын
This was such an amazing tutorial! I was looking for a cool project to demo to some eager middle schoolers and found your video. I thought I would just skim it to see if it would be a viable demo and ended up following along all the way through. Thanks for sharing the knowledge!
@kelsierii4747
@kelsierii4747 2 жыл бұрын
Absolutely amazing tutorial! Its exactly my type, practical and without assuming I know anything, also no unnecessary libraries or databases I couldnt care less about, thank you!!
@franostroski4536
@franostroski4536 Жыл бұрын
Speechless! Cannot believe that it is free! This was such an amazing tutorial, explainations were thorough and after watching this video not only did I get an amazing JS game, I also got a bunch of ideas how to add extra content and answers for implementation of those features were already explained in the video. Keep doing this amazing content man!
@sauce2073
@sauce2073 2 жыл бұрын
I've only seen 1h 4min so far but this is one of the best tutorial i've ever seen. I think the most complicated part of coding is finding the best way to summarize the logic into objects and decide what has to be structed and what not. A blessing.
@senpai3412
@senpai3412 2 жыл бұрын
did you just copy and paste the comment and just changed the time? 💀💀
@sauce2073
@sauce2073 2 жыл бұрын
@@senpai3412 not one but two comments, they were so similar that I only subtracted the time they said and added it to the latest one, also one part of my comment that seems odd is copied from one of these comments as well
@eduardorpg64
@eduardorpg64 Жыл бұрын
I'm in the 2 hour mark, and the quality of this tutorial is amazingly high. You explain what each part of your code does. You explain the overall algorithm that you use. You use visual tools to draw onscreen (like the red rectangles) to better explain your ideas. Also, you left a link so that people can download the assets that you used in this video. If I had money, I would pay for your courses. I don't mind watching ads in this video. I want to support you in any way that I can. You're an amazing instructor, and you clearly like teaching.
@kogarashikoyo1499
@kogarashikoyo1499 Жыл бұрын
Same broo
@itzsaucy5715
@itzsaucy5715 Жыл бұрын
You just made me realize I don't love web development. I want to be a video game developer. Thank you so much for helping me come to this realization. I've been working on following this tutorial and, throughout the course of the video, I've had more fun doing this than ANYTHING I've ever done or can Imagine doing in web development.
@lbb2rfarangkiinok
@lbb2rfarangkiinok 2 жыл бұрын
Just finished and deployed. That was so much fun. I hardly slept this weekend. Learned a ton. Thanks a lot.
@sannisan7447
@sannisan7447 Жыл бұрын
Just commenting because i really appreciate you putting this out there. I realize because of this video that learning to program games is the fastest and easiest way for me to learn the programming languages. This video is my first step into your world and im grateful that you decided to hold the door open.
@javohirhak
@javohirhak 2 жыл бұрын
wooow i think you're not Frontend dev, you are Game dev! Keep going! Good luck 😀😁😁🔥🔥🔥
@mcfly1337
@mcfly1337 2 жыл бұрын
+++
@237910722
@237910722 2 жыл бұрын
I wrote my first game in LUA, the physics are quite difficult to implement, especially if in your head the characters have some kind of interaction with the environment, I think this is a good example of a first game with the beautiful pixel design, for Of course, the ideas are so many that sometimes it frustrates us not being able to implement them quickly but if we like this, it's worth it, there is no better feeling that something works just the way you like it. :)
@glenj3649
@glenj3649 Жыл бұрын
What a fantastic tutorial! Easily one of the best ones to get you started in JS Game Development
@ZazaBear
@ZazaBear Жыл бұрын
Holy moly. Just.. wow. Love this content, and your other videos will be amazing to go through if they're even half as good as this! Granted, admittedly quite the time commitments, but a relatively immensely small price to pay for what's essentially free shadowing! Seriously, thank you kindly for your work.
@pikiniello
@pikiniello 2 жыл бұрын
Jus starting a javascript course and I don't fully comprehend functions and this guy just goes and casually creates a fighting game to post free on youtube. What a legend
@lbb2rfarangkiinok
@lbb2rfarangkiinok 2 жыл бұрын
Has following along helped you to understand functions?
@pikiniello
@pikiniello 2 жыл бұрын
@@lbb2rfarangkiinok In deed it has. Much love to this guy
@dakotalong8995
@dakotalong8995 21 күн бұрын
I was watching art restoration and woke up to this shit💀
@Deepfried_duck
@Deepfried_duck 2 күн бұрын
The KZfaq autoplay gods have blessed you. I don’t even know how it could make any connections to what I watch, to what you do.Thanks for being there when I was asleep
@maximelovesdinosaurs3532
@maximelovesdinosaurs3532 2 жыл бұрын
It is amazing how you instantly answer all the questions I have as soon as I have them ! Great job ! And your website is also incredible, a new gold mine !
@juliocodes
@juliocodes 2 жыл бұрын
Awesome dude! Glad to see these game videos are blowing up for you. The JavaScript content that you've been putting out for years is gold!
@ChrisCourses
@ChrisCourses 2 жыл бұрын
Thanks man, definitely felt like KZfaq was sleeping on me the past year or two, but glad to see things starting to take off now 😄
@infomatters.
@infomatters. 2 жыл бұрын
I really loved the process, thank you for sharing it with us. You deserve million subscribers.
@Audio-Tales
@Audio-Tales 7 ай бұрын
Not only is this for free , he’s literally explaining each line of code in a way anyone can understand. you’ve gained a subscriber, thank you so much 🇿🇼
@paultapping9510
@paultapping9510 2 ай бұрын
This has to be one of the best tutorial videos out there. You have an excellent way of concisely explaining everything you do, as you do it. Four hours extremely well spent! I'll be coming back to code along with some time soon. One feature I particularly want to see implemented is blocking and parrying, maybe even a posture meter.
@livetobe2079
@livetobe2079 Ай бұрын
Why did I wake up here AGAIN
@snakone
@snakone 2 жыл бұрын
Hello, i really liked what you did so i made my own game following your tutorials, I didnt copy/paste any single line of code, first i watched and understood all the chapters one by one then i wrote my own implementation. So here's what i did: - Typescript instead of js - Added backwards animations and sprites (attack in both directions) - Fixed some bugs like infinite jumping, cross the edges, prevent attacking while attacking, etc... - Added new sounds & attack animations while attacking, this last only triggers while on the air - Added Figther stats, such name, HP, ATT, DEF, VEL, these stats affects the actual gameplay - Changed some sprites, added white animation to second player Take Hit.png There are many things to do after, with all of this, like character select, you can make character act different if you set different stats on them. Also i tried to apply the `hold` property of the Sprites individually but since this is coming from the parent, so the sprites list should return a list of intances of Sprites rather than a plain object so you can set the hold indivially on them, problem is, passing the position to each of them. Saying this, hope you like it as much i did yours! DEMO: samurai-battle.netlify.app/ CODE: github.com/snakone/samurai-battle Cheers!!!
@candymanmonster4880
@candymanmonster4880 2 жыл бұрын
Hey, amazing work. I tested out your demo, however, it has a 1-2 second delay for each action. How did you fix the prevent attack while attacking bug? This has been bothering me for a while and I can't seem to figure out what's causing it.
@snakone
@snakone 2 жыл бұрын
@@candymanmonster4880 I added some websocket support to play online, It goes smooth for me Prevent the attacking bug: Fighter.ts line 72
@candymanmonster4880
@candymanmonster4880 2 жыл бұрын
@@snakone Thanks, but I still couldn't figure out what exactly is causing the prevent attack while attacking bug in Chris's code. Where did he go wrong? If you could explain that to me, it would be really great. Been struggling with it, and it's annoying.
@candymanmonster4880
@candymanmonster4880 2 жыл бұрын
@@snakone Please respond whenever you have time, 2 mins of your time would mean so much to me. Please.
@snakone
@snakone 2 жыл бұрын
@@candymanmonster4880 before you attacking just check is this.attacking is already true, then return
@raofthesun7558
@raofthesun7558 6 ай бұрын
dude sat down for 4 hours and made a step by step tutorial, that is a testament to the amount of focus and mental stamina it takes to be a programmer/software engineer. crazy, Ive always wanted to learn and have started but the focus iw what I struggle with.
@mitchw4645
@mitchw4645 Жыл бұрын
I was feeling incredibly demoralized until I started watching this tutorial. Thank you!
@ElAverno
@ElAverno Жыл бұрын
So cool and so easy! I bet a lot of newby people will be so thankful for videos and channel like yours
@davisnguyen1170
@davisnguyen1170 2 жыл бұрын
amazing tutorial!!! this carried me through a project. would love an advanced refined version of this game project such as side wall detection and AI!
@ashwinalagiri-rajan1180
@ashwinalagiri-rajan1180 2 жыл бұрын
I literally didn't know any javascript before watching this but understood nearly everything you said. Good work, cheers mate.
@ToddsDiscGolf
@ToddsDiscGolf 2 жыл бұрын
I’m currently studying JS, html, css etc. to switch careers but secretly my goal is to develop my own games. This video is exactly what I needed for inspiration that I’m on the right track! I understood so much of it. Truly awesome to post this entire 4-hour tutorial touching SO many subjects from Object Oriented Programming to classes and methods and the DOM and html and css and even GitHub! Seriously broad lesson! Can’t thank you enough for doing it and I hope it gets lots of people to sign up for your other premium lessons! Create that passive income and live the dream! 👍👍😁
@pawiematias4670
@pawiematias4670 2 жыл бұрын
goodluck
@blackdragon4293
@blackdragon4293 2 жыл бұрын
Good luck and could you please help me with something,do you perhaps know which code editor he used, if you don't,which one did you use?
@isaiahthompkins614
@isaiahthompkins614 2 жыл бұрын
@@blackdragon4293 I think he used Sublime Text but I also recommend VS Code
@blackdragon4293
@blackdragon4293 2 жыл бұрын
@@isaiahthompkins614 thanks alot
@tanura5830
@tanura5830 Жыл бұрын
Wow I have same goal about game dev and passive income but I know it's very difficult. I don't use JavaScript or web stuff for games.
@nu_umb
@nu_umb 2 жыл бұрын
Love your tutorials, my portfolio is evolving thanks to you!!!
@jimavictor6022
@jimavictor6022 2 жыл бұрын
There's no doubt about it. This is really good💥 I haven't worked with HTML canvas before now, and I can still understand everything very well!!!
@DopEZTam
@DopEZTam 2 жыл бұрын
Hi Chris, These tutorials are amazing 👏. Could you also make a video on making it work on mobile too. Thanks!
@Sazazezer
@Sazazezer Жыл бұрын
Just completed the full video and want to say I would happily pay for a premium course that expands on this. I've been wanting to learn about SF style AI for a while now. Would also be good to learn about things like stun lock and inputting special moves. I've got a general idea about how to do things like this but would love to see a clean way of doing it.
@ChrisCourses
@ChrisCourses Жыл бұрын
Would love to make one at some point, just have to clear out the backlog of Pokemon, Space Invaders, and Pacman first 😅
@jzt1n-565
@jzt1n-565 Жыл бұрын
I encountered this video through the yt-algorythm. I have to say, it's the best tutorial I've seen so far. If you think about that: Some people are charging money for such a clear and transparent tutorial. I am a webdeveloper for a living for nearly one year now, so I didn't understand everything....but I watched the video from start to end, without skipping etc. And I have to say, that everything you did just made sense and was relatively easy to understand. The next step for me will be, to reproduce your code and extend it. Again: thank you so much for this actually good tutorial. PS: I didn't even know, that you can use js in that way lol
@Flarkit
@Flarkit 10 ай бұрын
I’m so grateful for the technology and how you can learn anything with the press of a button! Thank you for making this video 😊
@carsonplayzgaming9691
@carsonplayzgaming9691 5 ай бұрын
i fell asleep watching youtube, wake up and check that this video is completely watched in my recently watched, the scary thing is that the was coding in my dream. I’ve never coded before
@slein1337
@slein1337 2 жыл бұрын
Wow, I really loved this tutorial. Thank you so much! The only thing I edited was a small if statement to get rid of jumping in the air. And I'm not very firm with github, but I had to make a commit of the code in my fighting-game folder before I could push it to github. This is most likely trivial for everyone accustomed to it, but I struggled some minutes. :D
@auberginepomegranate2742
@auberginepomegranate2742 2 жыл бұрын
I'm new to js, could you please tell me how you fixed the mid air jump?
@slein1337
@slein1337 2 жыл бұрын
@@auberginepomegranate2742 For the eventListener on keydown I edited the case for "w" and "ArrowUp" with this 'if (player.velocity.y === 0) player.velocity.y = -20;'
@CalebRatcliffe
@CalebRatcliffe 7 ай бұрын
for anyone seeing this, this code also has a bug where if the players velocity gets to zero in the air the person can time it right and still double jump. It is best to use a boolean variable@@slein1337
@isaiasgomeze
@isaiasgomeze Жыл бұрын
Sometimes I forget why i love JS. You just made a noddle soup of a code there and works like a charm and no one should tell you is wrong ❤️
@marknewellmusic
@marknewellmusic 2 ай бұрын
This was fantastic a year ago and it's nice to see it get the recognition it deserves - 3.8 million views. Well done and thanks for your efforts, epic vid.
@VenomRaiders
@VenomRaiders 2 жыл бұрын
This is a clear example to anyone starting programming that the issue is not how well you can code but how you can use code to solve a problem.
@jaymesinn5134
@jaymesinn5134 2 жыл бұрын
im 100% in tutorial hell, BUT i love the way youre teaching and explaining your processes, 100% subed
@naedid2512
@naedid2512 Жыл бұрын
Thank you for this amazing tutorial. I had given up on web designing but this gave me motivation to work again.
@Matalito
@Matalito Жыл бұрын
I have no experience. I just did the basic JS course on Codecademy. I've spent several nights trying to figure out how to take the incredibly limited knowledge I have and start making something very basic. No progress made. 10 minutes into this video and I have something started, 20-30 minutes in and I have a functional bare-bones horse racing game. This video, the demeanor and presentation, all the information explained so succinctly without going on too long or rushing anything, I could go on, but all the other comments already do that for me. Just amazed at this and the progress I'm making, barely into a video about a completely different type of game.
@meta91rbx
@meta91rbx Ай бұрын
Why did I go to sleep and everyone is waking up here😂 Update: NAHH WHAT IT HAPPENED AGAIN BRUH
@Gizzzmo
@Gizzzmo Жыл бұрын
Man, as a Brazilian, I must say that your content is the best I've ever seen!! I will definitely do this project.
@_Curiositas_
@_Curiositas_ Жыл бұрын
The best explanation of coding i've ever seen in my entire life, he doesn't just randomly starts the video with 300 const, explained step by step to help you understand the logic, congrats for the quality content
@dxpdigital5343
@dxpdigital5343 Жыл бұрын
all he did was steal this from CodePen... didn't even credit the original deeloper.
@ChrisCourses
@ChrisCourses 5 ай бұрын
​@@dxpdigital5343 wrong, anything on CodePen is taken from this video😶
@brullov_labs
@brullov_labs 2 жыл бұрын
What a surprise to see my environment asset pack in such great tutorial :)
@jdd1325
@jdd1325 2 жыл бұрын
Hi Chris! 🥵🥵🥵 You are so easy on the eyes it makes it super simple to follow these courses 😉 Can't wait to follow this course. Going to save it for next weekend when I have some time. As always thank you for your hard work putting these together.
@santiagofantoni2643
@santiagofantoni2643 2 жыл бұрын
Ewwww, desperation :(
@michaelknight8965
@michaelknight8965 2 жыл бұрын
Lmaoo. Wtf is this
@berbudy
@berbudy 2 жыл бұрын
🐶💢🧹 bonk !!
@productplacement39
@productplacement39 2 жыл бұрын
Whoa, easy there friend 🙂
@Necr0h
@Necr0h 2 жыл бұрын
It's a fantastic tutorial ! i'm not programmer in javascript but in python... but .. i know to i'm watching a perfect tutorial video, with hardwork, good informations by a passionated programmer... thank you so much
@heleenzzz
@heleenzzz 29 күн бұрын
Glad to see you still uploading videos. Keep going!
@paulolb9571
@paulolb9571 2 жыл бұрын
Amazing work and great content 👏
@vikstu6816
@vikstu6816 2 жыл бұрын
You could release that as a playlist with 10-15 episodes, I think it's easier to keep pace. But I just watched the first minutes and I'm loving it!!! Thank you!!!
@lbb2rfarangkiinok
@lbb2rfarangkiinok 2 жыл бұрын
the rider on the side of the video basically serves to divide it up into multiple sections, but I did not notice it until about the 90 minute mark haha
@AniqTheGreatKhotle
@AniqTheGreatKhotle 2 жыл бұрын
I don't have a computer but I just found this channel. This is what I've been looking for most my life.
@fasteditsyt
@fasteditsyt Жыл бұрын
I hope you can get a pc somehow freind and start your programming. I'm sure it will happen one day soon. if you have a library maybe you can go there and work?
@barszade154
@barszade154 Жыл бұрын
@@fasteditsyt farted
@cobber1303
@cobber1303 Күн бұрын
Didn’t wake up to this but was watching mythbusters in the background and then suddenly I’m being taught something I have no interest in at 4 in the morning. Good job KZfaq algorithm
@patrickconrad2874
@patrickconrad2874 2 жыл бұрын
This content is great. If you decide to do another one I'd like to see a strategy game with ai like Age of Empires type.
@abdelmajidkansoussi6904
@abdelmajidkansoussi6904 2 жыл бұрын
this guy is very underrated
@ritiksinghania8875
@ritiksinghania8875 2 жыл бұрын
I saw first 10 minutes and instantly followed him. Man you are great. Keep doing the amazing work.
@vinaykamble6192
@vinaykamble6192 Жыл бұрын
Whatever your explaining is getting absorbed like water in a sponge, best game mechanics and logic explaination ever
@bankspoke5551
@bankspoke5551 2 жыл бұрын
awesome. All of your tutorial, but what about a multiplayer / socket tutorial to make all of these game online ?
@aylictal
@aylictal 2 жыл бұрын
Your animation data (like framesMax, and filepath, and cropping information or other relevant info) is usually pulled out into a seperate json file, then loaded in for your engine to consume, but what you're doing is obviously fine. One thing that was irking me a bit was switchSprite @2:47:00. rather than making a giant switch which has to be maintained for every new sprite addition you add, this could mostly all be handled in an object literal lookup with a single string argument sent to this function under certain gamestate scenarios. Example: switchSprite(arg){ this.image = this.sprites[arg].image this.framesMax = this.sprites[arg].framesMax this.framesCurrent = 0 } Doing it this way will work regardless of any new additions of sprites you add to this class and massively reduce the amount of repeated code in there.
@ChrisCourses
@ChrisCourses 2 жыл бұрын
Stealin this for the future
@aylictal
@aylictal 2 жыл бұрын
@@ChrisCourses no worries. Thank you for an entertaining video too man I enjoyed it. I commend you for sticking with JS rather than typescript. Theres still many of us that still prefer it like myself :)
@ChrisCourses
@ChrisCourses 2 жыл бұрын
@@aylictal I prefer it that way too 🤫 Can't let too many people know that these days without getting attacked haha
@ohsehun6470
@ohsehun6470 Жыл бұрын
thank you for providing these comprehensive tutorials for free! insanely helpful
@gregalelov7993
@gregalelov7993 2 жыл бұрын
One of the best tutorials I've ever seen, next part is to make a tutorial on how to make this game multiplayer
@The_Vending_Machi
@The_Vending_Machi 2 жыл бұрын
im about halfway through the tutorial, at the end of the timer part and this tutorial is great! im definitely learning a ton, and when he made mistakes in the video it threw me for a loop and i always panicked untill i resumed the video and realise he fixes those mistakes after XD this tutorial is really awesome, and im glad i found this! p.s. 1:43:49 ouch
@The_Vending_Machi
@The_Vending_Machi 2 жыл бұрын
@Zero im not sure if its just me but theres a but of an audio error where theres a loud blip and i had headphones in with max volume
@Frankslaboratory
@Frankslaboratory 2 жыл бұрын
Man, you are a machine, awesome
@ChrisCourses
@ChrisCourses 2 жыл бұрын
Thanks man, keep up the good work on your channel, you have my support 🙌
@legenddistroyer6017
@legenddistroyer6017 Жыл бұрын
Amazing, i already knew canvas but this made me feel like i didnt know anything and you just made me understood everything better (hope that makes sense)
@SonjaMGFX
@SonjaMGFX 7 ай бұрын
Amazing! Can't believe you put out an entire 4h course on KZfaq. Really appreciate it, learned a lot!
@dimalepel
@dimalepel 2 жыл бұрын
Hello. Thanks for the video. What kind of todo app are you using?
@Chill2094
@Chill2094 2 жыл бұрын
IMO, it would be better, if you made a single video with basic JavaScript for those who don’t know the language, instead of repeating every tutorial what an eventListener is and how all the little things work. Thank you very much for the videos, btw!! 😃
@MrTrollo2
@MrTrollo2 2 жыл бұрын
this are pretty basic tutorials, right? if you're familiar to JavaScript, what kind of knowledge do you pull out here?
@ayushkumar8351
@ayushkumar8351 2 жыл бұрын
Amazing tutorial. Thanks to you, I have created my first video game.
@justacasual17
@justacasual17 14 күн бұрын
Woke up to this, stayed because you're a great teacher!
@jamesr5197
@jamesr5197 Жыл бұрын
I have a question! First off I want to say, thanks for the tutorial! It's really easy to follow and is exactly what I was looking for. Now as for the question, I was following along the tutorial and got to the end of task #2, however, I was able to infinitely just jump with both UpArrow and the w key. Did I miss something and how do I fix that?
@TuRnaDo88
@TuRnaDo88 Жыл бұрын
just make a check in the switch that prevent the w and ArrowUp case 'w': if (player.velocity.y === 0) { player.velocity.y = -10; } break; case 'ArrowUp': if (enemy.velocity.y === 0) { enemy.velocity.y = -10; } break; }
@ArcaneFlux_
@ArcaneFlux_ Жыл бұрын
​@@TuRnaDo88 thanks
@fanegantosin2973
@fanegantosin2973 2 жыл бұрын
Hi Chris can you increase the font size of your codes Thanks
@adamrobertson2048
@adamrobertson2048 2 күн бұрын
Why did I fall asleep watching who remembers and wake up to this playing. Seems a BUNCH of people are in the same boat so whats going on KZfaq lol
Tower Defense Game Tutorial with JavaScript & HTML Canvas
5:15:40
Chris Courses
Рет қаралды 354 М.
Coding Adventure: Simulating Fluids
47:52
Sebastian Lague
Рет қаралды 1,5 МЛН
Мама и дневник Зомби (часть 1)🧟 #shorts
00:47
Kitten has a slime in her diaper?! 🙀 #cat #kitten #cute
00:28
船长被天使剪成光头了?#天使 #小丑 #超人不会飞
00:28
超人不会飞
Рет қаралды 20 МЛН
Teenagers Show Kindness by Repairing Grandmother's Old Fence #shorts
00:37
Fabiosa Best Lifehacks
Рет қаралды 6 МЛН
Making a Game in JavaScript with No Experience
5:49
Goodgis
Рет қаралды 689 М.
Making glow toys from scratch
39:02
NileRed
Рет қаралды 7 МЛН
Why It Was Almost Impossible to Make the Blue LED
33:45
Veritasium
Рет қаралды 20 МЛН
Learn Web Development And ACTUALLY Get A Job | Ultimate Guide
1:33:52
James Cross
Рет қаралды 1,2 МЛН
Multi-room Platformer Game Tutorial with JavaScript and HTML Canvas
3:03:24
Phone repairs are getting ridiculous - Here's why.
22:24
Mrwhosetheboss
Рет қаралды 1,4 МЛН
Making purple gold
53:20
NileRed
Рет қаралды 15 МЛН
Do Chairs Exist?
37:54
Vsauce
Рет қаралды 10 МЛН
What Makes Avalanches So Deadly
25:04
Veritasium
Рет қаралды 1,2 МЛН
The Zipf Mystery
21:05
Vsauce
Рет қаралды 26 МЛН
Мама и дневник Зомби (часть 1)🧟 #shorts
00:47