Javascript Rock Paper Scissors Game Tutorial | Web Development Tutorial

  Рет қаралды 168,743

developedbyed

developedbyed

Күн бұрын

Пікірлер: 268
@developedbyed
@developedbyed 5 жыл бұрын
Hope you enjoy this one! It got dark already lol. Might take a while to process the video for 1080p.
@mohamedh.394
@mohamedh.394 5 жыл бұрын
Hey Ed. @30:44 why did you use a regular 'function' rather than an arrow function '()=>' ? Thanks for the videos. *edit* Haha Nevermind. My question was answered a minute later in the video.
@brahimnkhili7057
@brahimnkhili7057 5 жыл бұрын
Thank you sooo much for this beautiful videos, you made programming soooo FUN, you're my HEROO
@lutfula9006
@lutfula9006 4 жыл бұрын
Thank you Ed
@abdulsubhan1950
@abdulsubhan1950 4 жыл бұрын
hi sir i have a problem in code i follow same steps u did but in 31: 43 its show error Uncaught TypeError: options.forEach is not a function what can i do plzz help
@KRAMDROIDTECH
@KRAMDROIDTECH 4 жыл бұрын
Thank You so much ed😊
@mhm6
@mhm6 4 жыл бұрын
i wish u were my professor during college. you make programming really fun and you have a cheerful tone in your voice that makes you sound very approachable for help outside the classroom.
@justadudeuu
@justadudeuu Жыл бұрын
i love the energy
@farazmehraien3913
@farazmehraien3913 4 жыл бұрын
your sense of humor and skills are fantastic
@abhisheksunam4869
@abhisheksunam4869 4 жыл бұрын
Ed is like "your friendly neighbourhood dev".
@jakeylee.mp4
@jakeylee.mp4 5 жыл бұрын
42:15 "I think i saw a gang sign in there.." lmfao
@6MyK
@6MyK 5 жыл бұрын
You "rock" man ! I like your tone and explainations, thanks for sharing and giving us the opportunity to learn this almost basic stuffs. And yes you did cross the ocean to teach a french guy ;)
@saidsaid-nn1qk
@saidsaid-nn1qk 4 жыл бұрын
42:10 "I think I saw a gang sing in there " lol
@krishnachakraborty9053
@krishnachakraborty9053 2 жыл бұрын
I have gone through may videos to learn javascript but get hopeless soon. yours are the most compact and useful videos. Thank you.
@lynx1850
@lynx1850 4 жыл бұрын
i dont usually comment but it was i able to find most helpful javascript tutorial series. Thank you so much, its gave me a lot.
@dmitry9718
@dmitry9718 2 жыл бұрын
The best video to learn for beginners. Very clear explanations. Thank you
@DanielSouza-nq1hw
@DanielSouza-nq1hw 5 жыл бұрын
6 months and there's no dislikes omg this is so good
@rassoultaleb9373
@rassoultaleb9373 4 жыл бұрын
you jinxed it.
@sauhardbhandari8435
@sauhardbhandari8435 4 жыл бұрын
It was so much fun watching, doing, learning and everything... Thank you .. thank you so much for being a great tutor out there!!
@rohinisampath
@rohinisampath 5 жыл бұрын
First video which doesn't have dislikes!🖤👌
@trelala789
@trelala789 4 жыл бұрын
This is great tutorial, but it is missing one small detail at the end (I didn't realize that at first either). Hands should always do 'shaking' with rock. But now it stays in whichever options was the last. For resetting to rock for next round, place this in options.addEventListener function: playerHand.src = `assets/rock.png`; computerHand.src = `assets/rock.png`;
@williamwalker4494
@williamwalker4494 4 жыл бұрын
Thanks Renate. Important that this code goes after line 43 }, 2000); . However this is still no animation on subsequent rounds. Know how to fix this?
@trelala789
@trelala789 4 жыл бұрын
@@williamwalker4494 I'm not sure what you mean. Yes, need to place this code outside of the setTimeout function, but otherwise it doesn't matter. It works same for me regardless of placing it at the very top or at the end. Did the animations work for you, before trying to reset it with this code?
@madmike0064
@madmike0064 2 жыл бұрын
Thanks Renata this worked for me. I placed this after line 35 & it seems to be working perfectly.
@duncansareto7854
@duncansareto7854 3 жыл бұрын
umeweza! thats a swahili word of saying you've done it well. Your teaching is mindblowing and inspiring. keep the good work.
@pawezawadzki9113
@pawezawadzki9113 4 жыл бұрын
I just want to notice, that if anybody has the same problem as me (that is - when fadeOut style overrides fadeIn, even after applying startGame function [24:25]) you can easily solve it by adding !important to both arguments: div.fadeIn { opacity: 1 !important; cursor.event: all !important; I am working at Safari, and it came up even though I followed every step of this tutorial, and this solution works like a charm.
@jadijohnson2899
@jadijohnson2899 4 жыл бұрын
kzbin.info/www/bejne/Y4uuqICil96lapo this video is better alternative
@pawezawadzki9113
@pawezawadzki9113 4 жыл бұрын
@@jadijohnson2899 It is nowhere as good as this tutorial. I know you linked your friend's/your channel in order to get views, but its creator use "var" keyword which is a bad practice in almost every case. It is also not as detailed project as this one. There's absolutely no explanation on why he/she uses this or another function over other. Also - no music, no voiceover, just awfully placed subtitles. I guess it is indeed alternative way of coding the same project, but it's definitely not a better one for learning.
@jadijohnson2899
@jadijohnson2899 4 жыл бұрын
@@pawezawadzki9113 I let him know
@pettersonabade5956
@pettersonabade5956 5 жыл бұрын
WOW, this is awesome! I'm learning javascript with you.
@andrewblyth3776
@andrewblyth3776 5 жыл бұрын
This was really easy to follow and you made it fun. Thanks a lot!
@leonragnasheneider1393
@leonragnasheneider1393 3 жыл бұрын
in 22:04 the line 11 in java script section it says to me that "Cannot read property 'addEventListener' of null" When I exactly trying to copy the codes for studying purpose.
@davidcarter4116
@davidcarter4116 5 жыл бұрын
Nice work... and I enjoy your videos and please keep the mistakes and troubleshooting in the videos that has a lot of value and it is real world. These types of mistakes happen all the time, even to developers with years for experience, people get stuck all the time is it important to know how fix these issues it is part of a developer's skillset. It also let newer developers know that experienced developers run into the same issues. Anyway I appreciate the time and effort you take to create these videos.
@prasannapurohit582
@prasannapurohit582 4 жыл бұрын
hey, Dev Ed, the way you do while writing code is mind-blowing, I just watch your videos to look the cool stuff of face and action you do. keep doing dude.
@anotherbaby9703
@anotherbaby9703 5 жыл бұрын
You are doing amazing Edwin! Started with your 1st javascript tutorial today.... Hope I learn it faster than I could.
@abicinemafood
@abicinemafood 4 жыл бұрын
Hey Ed, I know it's late since you posted this, but I think one thing remained unsolved. At the end when you delayed the fist/rock shaking hands, that only works for the first round, because in the next rounds, images don't delay. So I guess you should add that for each round, on every time that buttons get clicked
5 жыл бұрын
6:03 " - Let's take a look how does looks and it is gonna look [ 2 seconds ] HORRIBLE!! NICE !! " Hahahaha Thanks for the tutorial, I've had so much fun learning JS so far.
@pauljerome162
@pauljerome162 5 жыл бұрын
Hey man, thanks for this video it helped my solve a problem on my website that has bugging me forever. keep it up!
@lavanyam9337
@lavanyam9337 5 жыл бұрын
Thanks a lot !! You are so young and educate a lot of young minds. Extremely glad to become your subscriber!
@raj89378
@raj89378 5 жыл бұрын
Amazing Video. Love watching your videos man. Keep it up bud!
@johanhellberg9677
@johanhellberg9677 3 жыл бұрын
Thank you for the fun and easy to follow along rock paper scissor tutorial!
@jenskristianlaufrederiksen3554
@jenskristianlaufrederiksen3554 3 жыл бұрын
Nice tutorial! I found these percentages a bit more appealing though xD @keyframes shakeComputer { 0% { transform: translateY(0px); } 30% { transform: translateY(-50px); } 44% { transform: translateY(0px); } 58% { transform: translateY(-50px); } 72% { transform: translateY(0px); } 86% { transform: translateY(-50px); } 100% { transform: translateY(0px); } }
@rawgz01
@rawgz01 4 жыл бұрын
Guys, you can add playerHand.src = `./assets/rock.png`; computerHand.src = `./assets/rock.png`; before computer choice to reset the images to rock when shaking after 1st time. GJ Ed.
@jadijohnson2899
@jadijohnson2899 4 жыл бұрын
kzbin.info/www/bejne/Y4uuqICil96lapo this video is better alternative
@Jakersfire
@Jakersfire 5 жыл бұрын
Another brilliant tutorial, great work
@badasscoder4481
@badasscoder4481 3 жыл бұрын
Sir this is more different and unique than others on Ytube. Realistic
@lautaroarcturus
@lautaroarcturus 4 жыл бұрын
thank you man,. i couldnt make it work, but i took your aproach to the challenge i got in my bootcamp. ill try to make it work with tdd, using cypress
@HostDotPromo
@HostDotPromo 5 жыл бұрын
Remember playing this game when I was a kid. Man I am addicted to Javascript vids.
@igoroliveira7862
@igoroliveira7862 4 жыл бұрын
Ed, thanks so much! You teach really well and your english is terrific. I am not a native english speaker but I can understand you very well.
@PS-le4mf
@PS-le4mf 5 жыл бұрын
3:21 in & I did one like this from some other youtuber - again - yours is better. When you do a few videos that others do - then just do it in your style; people will see hands down who teaches better! This has been happening to me all the time. I'm doing this because the last time I couldn't get it completely working. I have none of those issues with your teaching apparently!
@developedbyed
@developedbyed 5 жыл бұрын
I see you are learning Plastic Spoon! Thanks as always for the lovely messages!
@247tomoekaoru
@247tomoekaoru 4 жыл бұрын
Thank you so much, this was so FUN and interesting!!! Keep uploading cool tutorials like this.
@pranavvyas7797
@pranavvyas7797 3 жыл бұрын
1:52 PC making noise... Ed : " Bady computer wants some spanking huh ! 😂😂 " Ed is amazing ! I wish he was my JS professor in College.
@marioskanellopoulos8780
@marioskanellopoulos8780 5 жыл бұрын
What a great concept dude!!! I know its been a while since you posted me but its still a really good one!!! Thumbs up from me for sure! I subscribed to you already and cant wait for more staff! Keep up the good work!!
@love_tacos
@love_tacos 5 жыл бұрын
"So many Ps......and zero poops"" LMFAO
@judygoergen8948
@judygoergen8948 4 жыл бұрын
39:54 "Oh, God. What are we doing with our lives?"
@tanmaygadade5514
@tanmaygadade5514 4 жыл бұрын
At 24:26 mins my 'Into screen' is fading out but it's showing me an error in the ("fadeOut"). Can someone help me with this issue?
@dereka6964
@dereka6964 5 жыл бұрын
Really good tutorial and jumping off point. Keep up the good work
@davidmirza1366
@davidmirza1366 4 жыл бұрын
Thank you for this great VIDEO!! You are a very good teacher man !
@tuitionstonight
@tuitionstonight 5 жыл бұрын
Welldone bro :) You have mindblowing programming skills :)
@kritigandotra3622
@kritigandotra3622 3 жыл бұрын
Thank you so much for this amazing project! Looking forward to making more projects with you and learning.
@alinkhan238
@alinkhan238 4 жыл бұрын
Amazing dear...🥰 Enjoyed the whole steps
@sachinmohan6935
@sachinmohan6935 3 жыл бұрын
Really enjoyed this project!!
@snakone
@snakone 5 жыл бұрын
on the playMatch function at line 24 you might use event Delegation to avoid having the same function for each option, even if you ever click a button, you may not use this functions but they using unneccesary memory
@sunnyshang4350
@sunnyshang4350 4 жыл бұрын
Okay this is so fun to go thru. Love it
@qrx.4596
@qrx.4596 4 жыл бұрын
please help i left youtube just as Ed said at 6:12 and video disappeared, i don't know what to do
@acacius6655
@acacius6655 4 жыл бұрын
Hey Ed! Really enjoying your videos. I was wondering - what extension are you using that formatted your code at 48:10 ~ ? It automatically made the code "consistent" in it's spacing after the "transform:" part. Cheers
@edricko7
@edricko7 4 жыл бұрын
the extension name is preetier
@wojciechsnopkowski6971
@wojciechsnopkowski6971 5 жыл бұрын
Great content. Much, much, much appreciated! Keep it up!👍🏻
@GjentiG4
@GjentiG4 4 жыл бұрын
How can I do a for (option of options) instead a for.each? min 30:15
@anathkantonda
@anathkantonda 4 жыл бұрын
May God bless you for this tutorial. Thank you so so much!!
@parmeetsehdev9973
@parmeetsehdev9973 4 жыл бұрын
Updating Images code is not working for me ... any solution 41:35 ... plz ???
@ney1185funk
@ney1185funk 3 жыл бұрын
Very nice Bud. thx for sharing.!!
@harvygrados5298
@harvygrados5298 5 жыл бұрын
Love watching your videos !!!
@Ch3Lu87
@Ch3Lu87 3 жыл бұрын
Excellent video! Thanks!
@BlackParaffin-pn8zb
@BlackParaffin-pn8zb 8 ай бұрын
I couldn't finish this js project due to 41:30 image update, my code is not working. I've spend almost 3hours for this problem and I checked all the comments bellow but I've found no solution for this....😥😥😥😥😥😥😥😥😥
@imindproduction9484
@imindproduction9484 5 жыл бұрын
Thank you @Dev Ed for your amazing tutorial and i have a question here, when we are creating the compareHand function and we gave it to parameters (computerChoice, playerChoice) with no previous mention to playerChoise above! although we needed the textContent of the buttons to compare it with the computerChoise. how we did that ?
@karimaladdinmansour9636
@karimaladdinmansour9636 5 жыл бұрын
this.textContent or playerChoice refered to option in options , which was the button u clicked! const options = document.querySelectorAll(".options button"); so clearly playerChoice given by you (the user who clicked the button)
@tannerbarcelos6880
@tannerbarcelos6880 5 жыл бұрын
gonna take a bit of work to really understand DOM stuff but JS overall and . html/css have come relatively easily. its that portion of making a variable and saving a whole query into it but then walking through th elogic in a function which messes me up a bit! but that isnt on you, its on me as the learner! thank you for everything, and i will watch this video tomorrow morning in depth more!
@jeffjames15
@jeffjames15 3 жыл бұрын
Great tutorial!
@chrisdanikas7918
@chrisdanikas7918 5 жыл бұрын
awesome dude keep up the good work
@bikramchettri9405
@bikramchettri9405 5 жыл бұрын
another wonderful and conceptual video. your js series is awesome. can you do a tutorial on how to make accordions,tabs ....etc
@developedbyed
@developedbyed 5 жыл бұрын
Absolutely!
@bikramchettri9405
@bikramchettri9405 5 жыл бұрын
dropdown menu too while you are at it.
@bikramchettri9405
@bikramchettri9405 5 жыл бұрын
@@developedbyed I created an accordion. codepen.io/bikram-chettri/pen/omGeqp
@sheerazahmadkhan1437
@sheerazahmadkhan1437 3 жыл бұрын
Hi Ed, in the update function why are using const though we gotta update the variables.
@jaimeojeda4780
@jaimeojeda4780 4 жыл бұрын
How does it know what "playerchoice" is.
@Glam_by_Ak
@Glam_by_Ak 4 жыл бұрын
Hi dev this is Aman here I just started learning coding and I always watch your videos it’s very good and understanding I also tried this game but I want to try reset button on this game I tried to do but couldn’t can you please help how can we make reset button with js.
@byedwardleung
@byedwardleung 4 жыл бұрын
do you have anymore projects based on vanilla javascript?
@maheshtamang6158
@maheshtamang6158 3 жыл бұрын
dear Dev ed, I'm facing a problem in linking the image file as shown in 40:27 my vs code simply dose not recognize .src as a built in function which lead to not being able to link the file can if you know why it's hapening will please help me
@marvij7715
@marvij7715 2 жыл бұрын
same problem.
@ivanros9974
@ivanros9974 2 жыл бұрын
@@marvij7715 My mistake was I wrote document.querySelectorAll instead of document.querySelector in playerHand and computerHand...
@shrimpXD
@shrimpXD 4 жыл бұрын
hey dev ed i wanted ask something at 37:21 instead of making 2 if statements can we just use an and operater && eg: if(playerChoice === 'rock' && computerChoice === 'scissors'){ winner.textContent = 'Player wins' }
@ayanbanerjee5136
@ayanbanerjee5136 5 жыл бұрын
You are just awesome bro!
@LucaCirfeta
@LucaCirfeta 4 жыл бұрын
One question, at 31:55 on //Check for Rock, I can also use a if statement with AND && like if(playerChoise === 'rock' && computerChoise === ''scissors)?
@zoltankarpati8028
@zoltankarpati8028 5 жыл бұрын
Thank you, it is very inspiring. I really enjoyed it!
@thequickcode5144
@thequickcode5144 3 жыл бұрын
Sir Great Effort I love your quality content and the way you teach is really awesome so thanks again for this tutorial
@MrinalPatraASTU-
@MrinalPatraASTU- 4 жыл бұрын
Really enjoyed it, please make more videos on js
@TheAsphixiator
@TheAsphixiator 4 жыл бұрын
Hey Ed, great video, but for some reason, when I add the fadeIn class to my Match, it doesn't seem to work! Its somehow getting overwritten by the fadeOut we added in the HTML. Please help someone!
@byedwardleung
@byedwardleung 4 жыл бұрын
I just followed the code and it seems to work fine, you sure you didn't mistype something?
@akshayvinod1235
@akshayvinod1235 4 жыл бұрын
replace match.classList.add("fadeIn") with match.classList.remove("fadeOut")
@ChrisGatt
@ChrisGatt 5 жыл бұрын
I'm still early in the tutorial but finding it really useful so far. Thanks so much! I noticed that your 'Live Server' seems to update almost instantly. I have about a 10 second lag. How have you set it up to be so immediate?
@tusharjain5500
@tusharjain5500 4 жыл бұрын
You can set it in settings search for live server then their is by default delay of 100 milliseconds change it. And you are done
@ilonarybka2333
@ilonarybka2333 4 жыл бұрын
Good tutorials. Much appreciated.
@mohamedh.394
@mohamedh.394 5 жыл бұрын
Thanks for the video, Dev! I found the theme you're using but how did you get your folder icons on the left side to look like that? That's really cool.
@meenubakshi8653
@meenubakshi8653 4 жыл бұрын
make a folder and add inex.html to it then on same folder add images then app.js and style.css
@sayandutta2669
@sayandutta2669 5 жыл бұрын
AWESOME MAN 👌👌❤️❤️
@hadinmz7877
@hadinmz7877 3 жыл бұрын
Thanks, Great tutorial 👍
@love_tacos
@love_tacos 5 жыл бұрын
@Dev Ed: I have a question regarding the div.match element. I notice div.match has three children (, and ) and am curious about the width of the div.match. How is the browser computing the width of div.match? Or more specifically: Why isn't the div.match spanning the entire viewport? I noticed has CSS rules of position, top, left, transform....but nothing determining the width. And the three children (listed above) are all block elements, so I expect them to span the entire viewport. Maybe you or someone else can explain, if this makes sense. Thanks for the great tutorial! It's teaching me loads of good stuff!
@andress6726
@andress6726 3 жыл бұрын
Thank you Ed!
@kibrisgazetesi6586
@kibrisgazetesi6586 2 жыл бұрын
Pressed like as soon as he slap his machine 😂
@mohanedbenmansour5927
@mohanedbenmansour5927 5 жыл бұрын
bring your i7 back home :( love the tutorial
@atikrangnekar3337
@atikrangnekar3337 4 жыл бұрын
which software are you using for recording
@ledude_
@ledude_ 4 жыл бұрын
This is a great video to learn : At this time 40:57 for me this doesnt work : playerHand.src = '../assets/${this.textContent}.pgn'; computerHand.src = '../assets/${computerChoice}.pgn'; I just cant write it like this, putting a ${} in a src its like forbidden ... i tried to write it a different way but its beyond my knowledge.
@anishsharma1281
@anishsharma1281 4 жыл бұрын
You have to use backtick ` ` not single quote ' '. Below is the correct code. playerHand.src = `../assets/${this.textContent}.png`; computerHand.src = `../assets/${computerChoice}.png`;
@ajaykmr8684
@ajaykmr8684 4 жыл бұрын
Hey, I hope that you're already out of this problem. But there might be some people who might be looking for the same doubt so instead of going for this complex approach, i have a simpler one for beginners so they might eventually get rid of this . so instead of writing such complex thingy, use "assets/" + this.textContent + ".png";
@harshitpal5217
@harshitpal5217 4 жыл бұрын
@@ajaykmr8684 Thanks, I was stuck at this.
@jamesharrold5045
@jamesharrold5045 4 жыл бұрын
@@ajaykmr8684 Hey, thanks for the solution. When I enter ./ I don't get the drop down menu that allows me to link the assets file, do you know why this may be?
@goodboy8180
@goodboy8180 4 жыл бұрын
are you get the solutions
@chaitanya_p
@chaitanya_p 4 жыл бұрын
I defined playerChoice along with computerChoice as playerChoice = option.className; the method in the video wasn't working for some reason
@Jason.Rivera
@Jason.Rivera 5 жыл бұрын
I had no idea that building a rock, paper, scissors game would be this damn complicated. *cries internally* I can't picture myself coming up with this all on my own....feeling kinda discouraged now
@billyfairbank
@billyfairbank 5 жыл бұрын
The good news is almost anything you want to create has been (at least partially) done before. Use this as a launchpad for making your own versions of great ideas. Even experienced devs feel discouraged sometimes. I'm sure it took MANY revisions to make this tutorial.
@Jason.Rivera
@Jason.Rivera 5 жыл бұрын
@@billyfairbank thank you
@tomisinergy4963
@tomisinergy4963 4 жыл бұрын
He doing programing at js manny years imagine yourself to programming like 5 years. You will do this game with closed eyes. But you put an honest answer unlike this other fake programmers.
@joemao5473
@joemao5473 5 жыл бұрын
So awesome. Thank you so much !
@sayyedshoeib7107
@sayyedshoeib7107 2 жыл бұрын
how to find ho is winner after the player or computer point is 5,10 final result
@MasterZiomekPL
@MasterZiomekPL 5 жыл бұрын
If you're new to JS understanding *this* part will save you a lot of trouble 30:35 At least it would for me.
@davidngassa2135
@davidngassa2135 5 жыл бұрын
Awesome video! Thanks
@manglesh0605
@manglesh0605 4 жыл бұрын
every round should starts with the rock and than after animation should change to whatever value it get . how to do that sir plss rply.
@zenu4558
@zenu4558 5 жыл бұрын
Awesome!!!!stuff loved it🥰🥰🥰
@tonit6549
@tonit6549 2 жыл бұрын
What do I do if when i run it saids deprecated feature used?
@starlight1468
@starlight1468 4 жыл бұрын
My hole compare hands method not working please help?????
@aryanagarwal9845
@aryanagarwal9845 2 жыл бұрын
How did you attach that assets folder there?
GSAP Animation Tutorial | Create Awesome Animations With Javascript
30:40
Javascript Dom Manipulation | Javascript Tutorial For Beginners
16:50
developedbyed
Рет қаралды 209 М.
ES6 Javascript Tutorial For Beginners | ES6 Crash Course
56:07
developedbyed
Рет қаралды 268 М.
Web Development Tutorial - JavaScript,  HTML, CSS - Rock Paper Scissors Game
1:27:17
Explained in 2 minutes: SASS vs. SCSS
1:51
onjsdev
Рет қаралды 9 М.
Beginner Vanilla Javascript Project Tutorial
1:15:19
developedbyed
Рет қаралды 905 М.
5 Projects You Can Build In A Week That Will Get You Hired
10:36
Web Dev Simplified
Рет қаралды 959 М.
How To Create An Image Slider In HTML, CSS & Javascript
24:42
developedbyed
Рет қаралды 481 М.
Intro to Game Development with JavaScript - Full Tutorial
1:16:15
freeCodeCamp.org
Рет қаралды 533 М.