VehiclesFashionRecipesBlogsHuntTravelsSportFunHandmadeITEducation
Mini-Games
x

x
zakruti.com » IT - Software » freeCodeCamp.org
Simon Game JavaScript Tutorial for Beginners

Simon Game JavaScript Tutorial for Beginners

FBTwitterReddit

video description

Rating: 4.0; Vote: 1
In this JavaScript game tutorial, you will learn how to create a Simon game using JavaScript, HTML, and CSS. Every line of JavaScript is explained. -Full code: https://github.com/beaucarnes/simon-game -HTML file: https://raw.githubusercontent.com/beaucarnes/simon-game/master/index.html -CSS file: https://raw.githubusercontent.com/beaucarnes/simon-game/master/css/style.css Tutorial by Beau Carnes. -Follow Beau on
Date: 2022-03-14

Comments and reviews: 10


-freeCodeCamp.org at 32:26 in the video I attempt to print to the console the filled array but nothing happens when I click start. Just to verify the project worked I copied the JS script and pasted it and run it. However I get an uncaught error property play or null for the function -four- audio.play(). Can someone explain why this happens. I am using sublime text with google chrome browser.
reply

Well I didn't code along with this tutorial, I just tried to understand how to build it by myself, I didn't use noise and seems to work well, but I have the same thing as your game: -When you click fast on your turn , somehow it doesn't stop and the turn of the pc becomes faster-
The game becomes crazy and starts displaying a lot of buttons, how to fix that bug?

reply

Guys Look at this please, have tried stack overflow.... -
VM144 index.js:22 Uncaught TypeError: Cannot read property 'addEventListener' of null-
at VM144 index.js:22-
(anonymous) - VM144 index.js:22-
index.js:1 Uncaught SyntaxError: Identifier 'order' has already been declared-
at VM144 index.js:1-
(anonymous) - index.js:1

reply

There's a bug in this code that I am for months trying to fix. When I click multiple times on the same button in less than a second the game crashes. I even have added async to the check() function and added good = true after noise = false; in check() function but it doenst solve the problem. Does anybody knows how to fix it?
reply

I learned JS on FreeCodeCamp and Udemy. One of my first projects was building a Memory Game, I.E. Simon. This really opened my eyes to how much I could improve it. I couldn't figure out how to get the sequence to repeat every time but you made that clear. Love your videos, hope you keep putting them out.
reply

Hey Beau, would like to ask you a question. When the user presses a button you setTimeout( () => - clearColor()- , 300); which makes the color disappear after 300 ms. However I'd like to keep the button lit up as long as the user holds down his click button. Is there a way in JS to achieve this?
reply

Thank you very much, Beau Carnes. I really appreciate you taking the time to create this video. I am also glad that you provided us the code in case we got stuck. I was trying to keep up with the video and missed some brackets.
reply

thank you for this video !
just one question : in the html file you gave an id and a class to one element, why ? could we only give the id ? beacuse the class has not been used in the css file. (it's this line : Start)

reply

At 47:26 I am getting this console error:
index.js:124 Uncaught TypeError: Cannot read property 'style' of null
at clearColor (index.js:124)
at gameTurn (index.js:76)
Anyone have thoughts on this?

reply

Hi thanks for the video.
At around 22 minutes in, when you use the if statement with strictButton.checked, couldn't you just do strict = strictButton.checked and not even need the conditional?

reply
Add a review, comment






Other channel videos