How To Code A Card Game In Plain JavaScript - Spooky Halloween Edition

  Рет қаралды 40,335

PortEXE

PortEXE

Күн бұрын

Пікірлер: 103
@WebDevSimplified
@WebDevSimplified 6 жыл бұрын
Thanks for collaborating with me on this video! I really enjoyed working with you and making this project.
@zacglasgow
@zacglasgow 6 жыл бұрын
Hope to see more from both of you!
@WebDevSimplified
@WebDevSimplified 6 жыл бұрын
@@zacglasgow thanks. I really enjoyed working on this project as well!
@fujisan0388
@fujisan0388 4 жыл бұрын
Thank you to both of you
@bahrawy07
@bahrawy07 Жыл бұрын
Even after 4 years there is some ppl like me who acctually learned from this video alot ty
@zacglasgow
@zacglasgow 6 жыл бұрын
This is ULTRA quality. Well done.
@jamesaustin2039
@jamesaustin2039 2 жыл бұрын
I learned a lot from this video! You do a great job explaining each step in detail without being too wordy.
@CCGGCCGY
@CCGGCCGY 4 жыл бұрын
I'm very bad at Javascript. I was so happy that your video is explain very clear and detail that make me so easy to understand. if you have Javascript basic tutorial, I can guess that many people will want to join your course, right now I try my best to understand more Javascript to watch your other video. Your video really nice and make with heart.
@stidd1
@stidd1 6 жыл бұрын
It's nice to see vanilla js tutorials. 👍
@shadsluiter
@shadsluiter 5 жыл бұрын
I was thinking that a lot of code would be easier to write and read in jQuery. Too bad people are hating on it these days.
@xMoSicc
@xMoSicc 4 жыл бұрын
@@shadsluiter Same thoughts.
@Teacher_Ali
@Teacher_Ali 4 жыл бұрын
Just excellently and professionally done. It was like some official course video. Really high quality and lot of learning for anybody learning JS. Thanks for this amazing video. Hope to see many more from you.
@andersonhall08
@andersonhall08 6 жыл бұрын
Great videos! I would like to see more of these tutorials.
@PortEXE
@PortEXE 6 жыл бұрын
Then you've come to the right place! I produce at least 1 video per week just like this one!
@elcikay
@elcikay 2 жыл бұрын
Hi. Thanks for your lesson. I was coding along with the video and I think the shuffleCards function did not implement the said algorithm correctly, because you did not store the values with a temporary variable when you swap. As a result, after the shuffle, many of the cards may have the same order value. Hence, they are arranged based on the order with which they were written in "index.html", which means they are not really shuffled. I logged the order values to the console and confirmed this is happening. (For those who wants to fix this, take note that "style.order" by default is an empty string.)
@444yoshitha8
@444yoshitha8 Жыл бұрын
can you pls say how can we fix it
@DanijelLapadatovic
@DanijelLapadatovic 2 жыл бұрын
Thank you for this video! I learned a lot about classes from here! And i like the way how easily u explain the code!
@wasilwasolomon6323
@wasilwasolomon6323 4 жыл бұрын
wow i do appreciate you for this tutorial! i really liked the presentation and I managed to have it count. I hope this can help me to come out with two players as well
@remibardon7843
@remibardon7843 6 жыл бұрын
Thank you for this video, it is really complete and the final product is really great 👍🏻 You both did a great job 👌🏻
@harag9
@harag9 5 жыл бұрын
Just watched the CSS video and was impressed with it. Just about to start on this one (just a few minutes in) and have a quick question - Why load the script "async", Can't you just put the script element tag at the bottom of the body, that way it loads after the dom?
@andrewpham3933
@andrewpham3933 3 жыл бұрын
Learned so much from this, and you explained things so well. Much thanks man!
@santiagoramirez5507
@santiagoramirez5507 4 жыл бұрын
Great tutorial!! I'd like to watch more of these projects using vanilla js!! Kind Reagards from Chile!
@RakeGrayFox
@RakeGrayFox 3 жыл бұрын
Excellent and very brillian! Just one note, may the flip counter should be ++ed when the matching function is triggered :)
@nhanpham3225
@nhanpham3225 2 жыл бұрын
Thank you so much. Learn a lot from this tutorial!
@jovannovakovic5975
@jovannovakovic5975 5 жыл бұрын
This is pure gold, man! Awesome! Thank you very much for this! We really appreciate it. We want more! Cheers!
@PortEXE
@PortEXE 5 жыл бұрын
Working on a new video this weekend!
@PortEXE
@PortEXE 5 жыл бұрын
Head over to my Twitter account to vote for the next video topic! @portexe
@tomo_thats_me294
@tomo_thats_me294 4 жыл бұрын
Great Video thank you for your help.
@sajitheditz7530
@sajitheditz7530 Жыл бұрын
Can you upload a video connecting this game to database to display scoreboard?
@Maxtasy888
@Maxtasy888 6 жыл бұрын
Really nice tutorial, thanks for the work!
@eddiebrett
@eddiebrett 6 жыл бұрын
couldnt really see your screen properly, new to JS so seemed very quick but it is all helping me improve so thank you for making this video.
@anru_kitakaze
@anru_kitakaze 2 жыл бұрын
Thank you, amazing tutorial!
@sophiochaphidze7732
@sophiochaphidze7732 8 ай бұрын
Great video! Thank you
@sandoxs
@sandoxs 5 жыл бұрын
Just awesome, thank you very much for that tutorial!
@mech4byte
@mech4byte 5 жыл бұрын
Very informative and entertaining tutorial! Thanks for the information :)
@gumpie
@gumpie 6 жыл бұрын
Small suggestion. Increase your font size when presenting. Its a little bit small. But great content otherwise
@_.sunnyraj._
@_.sunnyraj._ 4 жыл бұрын
wear glasses
@botirbrian6249
@botirbrian6249 4 жыл бұрын
Sunny Raj he is right if u watching on phone its so hard
@anfilofiosantosfilho7792
@anfilofiosantosfilho7792 3 жыл бұрын
Congratulations!!! very, very good.
@philhamilton3946
@philhamilton3946 4 жыл бұрын
Would like to see more
@annabelle3977
@annabelle3977 4 жыл бұрын
thank you very much for that tutorial!
@kazimrahman7499
@kazimrahman7499 4 жыл бұрын
WoW....!!....Super Programmers with Great Hearts....Only Thanks will not be enough....But Thanks a lot...!! Looking forward for more GAMEs using OOP paradigm from you .....cause....your clear concept makes me easy to understand...thanks..!!
@LapahnYT
@LapahnYT 6 жыл бұрын
I thought asynchronous means that it doesn't load at the same time, it will just load whenever it is ready and the other threads can continue doing their thing without having to wait for the js file to be loaded.
@nestorcortes2257
@nestorcortes2257 6 жыл бұрын
It does, you're correct. I think he may have the concept reversed.
@nestorcortes2257
@nestorcortes2257 6 жыл бұрын
Disregard my comment. I think I have the concepts reversed.
@PortEXE
@PortEXE 6 жыл бұрын
To clarify for you so that you don't get confused; asynchronicity allows more than one thing to happen at one time. Here's the kicker though. JavaScript can't actually run asynchronously. Lots of work has been done to make JavaScript appear to run asynchronously, thus giving us "async" functions.
@nestorcortes2257
@nestorcortes2257 6 жыл бұрын
@@PortEXE Wow, that's interesting.
@agent-33
@agent-33 3 жыл бұрын
R.I.P. mobile users. I can't see the codes clearly. But I think I understood the logic thanks to explanations.
@teetir1981
@teetir1981 4 жыл бұрын
Hi can you please update a scoreboard or Highscore with this...and something to save those data in Webstorage! That would be practically helpful! Thanks much though
@enriquegrageda
@enriquegrageda Жыл бұрын
Thanks man, you havent uploaded lately. Hopefully everything is ok!
@aisjdijasijdajsd
@aisjdijasijdajsd 4 жыл бұрын
Anyone knows why isit that for the function getCardType, you cant use "card.getElementById(" ")" but have to use getElementsByClassName
@filtersland7493
@filtersland7493 Жыл бұрын
Is it possible to make it multiplayer?
@lauraklabe2259
@lauraklabe2259 3 жыл бұрын
hi i'm struggling with an assignment for art school. i'm trying to code a matching game. he has us using adobe dreamweaver and I have all my art in the game and I can get the pieces to change when i hover over it and click on it, but I'm having trouble getting the card to stay flipped once it's clicked on (rn a click flips it once and automatically flips back over) and flip back over
@pattypool6703
@pattypool6703 4 жыл бұрын
This is great video, i have been able to create the game with my own pictures, on the computer it is working in all browers but not IE, when trying on my Iphone and ipad I see the pictures in mirror and not the background. Wehn click on picture you see other cards turn to the back side of the card and turns back again. I have downloaded edge and chrome on my iphone and have to same issue, I added the animation browser code in css. When checking the virtual iphone it is working, but not on my owns. Any ideas what I am missing? The sounds is working, except the one running out of time. The picture are dancing when matched,😫😩
@johncelgrande8513
@johncelgrande8513 2 жыл бұрын
can you teach me how to add more seconds in time? i just want to ask for my project i need it
@bubsztyn
@bubsztyn 5 жыл бұрын
U guys will be successfull, great content.
@Wave9B
@Wave9B 5 жыл бұрын
thank u so much man
@muhammadnazmulhasan4613
@muhammadnazmulhasan4613 5 жыл бұрын
Very nice tutorial. Can i make the same game with PHP Script?
@igalc
@igalc 6 жыл бұрын
The " return setInterval (( ) => { .... " function, where exactly did you specify what value it is returned by the internal function?
@PortEXE
@PortEXE 6 жыл бұрын
That function returns the interval itself. On each interval the function inside will be called. It's set to return the interval itself so that we can later reference the interval in the clearInterval function.
@igalc
@igalc 6 жыл бұрын
@@PortEXE Um ok, so it returns 1000, correct?
@PortEXE
@PortEXE 6 жыл бұрын
Nope. 1000 is the number of milliseconds between each interval. I'd highly recommend looking at the setInterval() method www.w3schools.com/jsref/met_win_setinterval.asp
@neelia.concept
@neelia.concept 3 жыл бұрын
i love this! But i use Typescript and forEach does not work and i cant find something similar... if you got me any advice i would be so happy!!
@PortEXE
@PortEXE 3 жыл бұрын
forEach works in TypeScript. It must be the way you’re approaching it with your Types.
@mikolashweiss1990
@mikolashweiss1990 4 жыл бұрын
source code is wrong. "Matched Cards" isn't instantiated at the constructor level, only in the start game function and no longer works unless you also instantiate it when making the other properties of the class at the top.
@RaptorMediaGRP
@RaptorMediaGRP 5 жыл бұрын
if i wanted to make a card drag and drop how would i do that? i have tried everything
@Marksman6
@Marksman6 5 жыл бұрын
The matched sound is used only on the first flipped card and his clone. Please help
@yasminamran5
@yasminamran5 5 жыл бұрын
How do you make this game a multiplayer game?
@mostviews4171
@mostviews4171 2 жыл бұрын
hard to read fonts are very small on mobile device
@lukaslinares7198
@lukaslinares7198 2 жыл бұрын
@26:20-32:30 shuffle 43:30
@AhSoh7091
@AhSoh7091 5 жыл бұрын
hi...one part i checked a long time i cannot understand how it works. Hope someone can help me up. In the flipCard method. what return of this.cardToCheck in first If Method... i checked it return null from startGame. and this code is works !!! so i confuess... if(this.cardToCheck){ // check for match this.checkForCardMatch(card); } else { this.cardToCheck = card; }
@mohonabhattacharya4184
@mohonabhattacharya4184 3 жыл бұрын
idk if i did something wrong but when i restart the game and match two cards the animation doesn't work anyone know why?
@tommyVassallo
@tommyVassallo 4 жыл бұрын
Ahhh .. I used bootstrap to create the lay out of my cards and now the shuffling algorithm wont work.... head meet keyboard.
@PortEXE
@PortEXE 4 жыл бұрын
Have you solved this
@botirbrian6249
@botirbrian6249 4 жыл бұрын
I think u should remove bootstrap grid classes from cards and give another css class
@jaydeest
@jaydeest 5 жыл бұрын
i got a problem with the overlay not disappearing when i click.. ive rewritten the code multiple times to exact, was wondering if you knew a solution. sucks cause i went through the css one and i thought maybe i made a mistake on the css but then copied the css code from github and it still wont work.. sigh/ this looked like a fun project
@jaydeest
@jaydeest 5 жыл бұрын
you think its cause im using visual code? not sure what program your using. but you seem like a good teacher so ill subscribe
@ChaosmaedcheJulie
@ChaosmaedcheJulie 5 жыл бұрын
did you put loading in the JS in " " ?? That was my mistake...now it works as it should
@jaydeest
@jaydeest 5 жыл бұрын
@@ChaosmaedcheJulie no unfortunately i deleted the files maybe ill try it again later and revert back to your comment thanks for the tip
@444yoshitha8
@444yoshitha8 Жыл бұрын
what is happening inside the shuffle card function 😑😥
@yasminamran5
@yasminamran5 5 жыл бұрын
I mean can you give a tutorial that makes it multiplayer?
@PortEXE
@PortEXE 5 жыл бұрын
I could yes. A 2-player card game would be a fun idea, but this game is single player only. So I’d need a different card game to choose.
@EyeIn_The_Sky
@EyeIn_The_Sky 5 жыл бұрын
Hey Guys, the game when played on mobile devices or Ipad the cards faces are already turned/revealed
@michaelbabin2434
@michaelbabin2434 4 жыл бұрын
Same isssue. Found a solution?
@pattypool6703
@pattypool6703 4 жыл бұрын
Same issue on iphone and ipad, android is fine. Did you find a solution?
@pattypool6703
@pattypool6703 4 жыл бұрын
@@michaelbabin2434 Same issue on iphone and ipad, android is fine. Did you find a solution?
@piaalvarez32
@piaalvarez32 4 жыл бұрын
Same issue also on Safai on a desktop :(
@213crause
@213crause 3 жыл бұрын
Lame
@_.sunnyraj._
@_.sunnyraj._ 4 жыл бұрын
where is the js file in description
@PortEXE
@PortEXE 4 жыл бұрын
It's the GitHub link
@shelbyposton3611
@shelbyposton3611 2 жыл бұрын
Make game called tonk.
@victorschweitz3506
@victorschweitz3506 5 жыл бұрын
So, I have a bug. The bug is that the flip counter still increments by one when clicking on a card with the front facing me. I can't figure out how to fix this since it's clearly not what should be going on. Hopefully, someone can help me out. Thanks in advance!
@Marksman6
@Marksman6 5 жыл бұрын
Same bug, did you resolved it ? :(
@xanalana6713
@xanalana6713 5 жыл бұрын
Just below 1 line of code inside flipCard function flipCard(card){ if(this.canFlipCard(card){ // Just add this line if(card === this.cardToCheck) return; /* * Same code as in video */ }// end of canFlipCard }// end of flipCard function
@NoName-zr8kq
@NoName-zr8kq 4 жыл бұрын
Damn this is sooo harrd 💔💔
@alberts6096
@alberts6096 6 жыл бұрын
youtube more views pls >: -(
@PortEXE
@PortEXE 6 жыл бұрын
Haha I know right! Thanks for your support.
@dimpledharamshi6404
@dimpledharamshi6404 3 жыл бұрын
Why can't he make the text clear and big ,
@aliasger3452
@aliasger3452 2 жыл бұрын
Why u just use async and create some useless function 😅. U also doing these things in a simple way 😐
@nickslobodsky4444
@nickslobodsky4444 5 жыл бұрын
overlays.forEach(overlay => { overlay.addEventListener("click", () => { overlay.classList.remove("visible"); }); }); Doesn't work. I did exactly how you did. I'm sorry but it's a fraud. Also, i can't download the audio files. Where to get them ?
How To Code A To-Do List In Plain JavaScript
56:53
PortEXE
Рет қаралды 4,9 М.
Build a JavaScript Memory Match Game - NO frameworks or libraries!!
45:16
Wait for it 😂
00:19
ILYA BORZOV
Рет қаралды 11 МЛН
龟兔赛跑:好可爱的小乌龟#short #angel #clown
01:00
Super Beauty team
Рет қаралды 135 МЛН
Кто круче, как думаешь?
00:44
МЯТНАЯ ФАНТА
Рет қаралды 1,2 МЛН
How to Code a Card Matching Game
39:59
Web Dev Simplified
Рет қаралды 146 М.
Awesome Vanilla JavaScript Memory Card Game Tutorial
58:30
developedbyed
Рет қаралды 63 М.
Memory Card Game - JavaScript Tutorial
34:16
freeCodeCamp.org
Рет қаралды 179 М.
Everything I Do When I Start A New React Project
16:28
PortEXE
Рет қаралды 4,9 М.
HTML, CSS, & JavaScript: Matching Game
30:16
TokyoEdtech
Рет қаралды 2,9 М.
Build A Clock With JavaScript
17:43
Web Dev Simplified
Рет қаралды 361 М.
Learn the JavaScript DOM With This Project - Memory Game
29:07
Learn How to Play PROJECT L with Professor Kim!
6:53
Tabletop Tolson
Рет қаралды 5 М.
Wait for it 😂
00:19
ILYA BORZOV
Рет қаралды 11 МЛН