I trullt adore how instead of using a github link to share a sourcecode you just copypasted whole script in a youtube comment :D nevertheless, thanks for a wonderful tutorial!
Hey bro I love your channel I have started learning HTML from your 1 hour HTML course , I'm planning on learning CSS and Javascript from your channel after finishing HTML, after Javascipt I will learn Rust programming language, can you make a course on Rust as well ? It would be really great Love from Oman
Olá, a nossa plataforma gostaria de o convidar a anunciar para nós e nós pagaremos pelo seu anúncio, por favor contacte-me se estiver interessado, obrigado"
underrated channel, very fast and daily uploading of a very useful content. thank you so much this is absolutely helpful to me while I am currently learning js
Keep up the good work. I really appreciate your content. This copywork and trying to understand it is the best way for me to learn as fast as possible.
Luckily I started in your java tutorial series when I discovered your channel, javascript has a lot of common format for the syntax. I'm also studying your DS&A tutorial series, and that one is heavily related to both of these two languages that I am learning as well. Hopefully I will finish that DS&A too so that I can go over c# and c++ programming.
Hey man! I am a college student, and your tutorials have helped me immensely. Do you have a patreon, or a donation website for us to show our gratitude? I would like to pay you a cup of coffee (or a beer) lol. All this knowledge for free is just crazy! Thank you so much!
Can you please do some tutorials on c# advanced topics like control and connecting to database please? I am a biggest fan i have seen all your videos about swing and now am pro on swing thanks to you bro ✌️✌️
Hey bro is it possible you make a tutorial about programming phones with android studio after this JS course? (Thanks alot for coming back to youtube).
Hey Bro, I’m a big fan of your channel. I just graduated high school and I’m majoring in Computer Science next year. I want to spend the summer coding, but I don’t know where to begin. I’m essentially starting from scratch after taking a course in Python from Udacity. My main interests are working with data and math (I’ve taken multivariable calculus). I’m asking you because I enjoy your detailed content, and I know you’ll have a lot of experience answering these types of questions. I’m looking to learn robust skills and make cool projects and generally avoid being bored. Hope you can help. Thanks.
Hey dude just asking r u gonna do any c# games and stuff like the rock paper scissors and guess the number ones because they were really fun to follow and learn! Keep the amazing work up!
You are a legend !!!! and a big inspiration. You make coding super easy. Would love to know if you will be doing any content on WEB 3.0...A BIG THING!! Your great knowledge will really go a long way to help us understand all about solidity and building web3 dApps
9:50 idk why but it doesnt draw the paddle :( anyone can help me? i checked the code, everything checks out but it doesnt draw the paddle. only difference in my code is that i typed "black" instead of whatever colour he chose :(
Hello dude. I just wanma ask if the contents you have in this 90-video playlist is the same with the other playlist containing 60 videos. I just found both of the playlist when I'm looking for your tutorial on javascript.
@BroCodez bro could you please make a project on Sudoku Game In Web Development and in that project there will be different types of level and every new game there is a new game board where the numbers from 1 to 9 will be in random order in random section in every new game and there is a button whose name is solution and when you click on that button you can see the solution of that particular game and every new game the solution button will give the appropriate solution for that game.
Hey bro! I want some advice. From u I have learned java and learning javascript but I am one of those guys who suffer from imposter syndrome. so what should I do? if I have to do some example projects can u give me ideas? BTW you make epic videos, keep it up, and best of luck :thumbsup: .
UPDATED (initial ball Y direction is more randomized)
*****************************************************
const gameBoard = document.querySelector("#gameBoard");
const ctx = gameBoard.getContext("2d");
const scoreText = document.querySelector("#scoreText");
const resetBtn = document.querySelector("#resetBtn");
const gameWidth = gameBoard.width;
const gameHeight = gameBoard.height;
const boardBackground = "forestgreen";
const paddle1Color = "lightblue";
const paddle2Color = "red";
const paddleBorder = "black";
const ballColor = "yellow";
const ballBorderColor = "black";
const ballRadius = 12.5;
const paddleSpeed = 50;
let intervalID;
let ballSpeed;
let ballX = gameWidth / 2;
let ballY = gameHeight / 2;
let ballXDirection = 0;
let ballYDirection = 0;
let player1Score = 0;
let player2Score = 0;
let paddle1 = {
width: 25,
height: 100,
x: 0,
y: 0
};
let paddle2 = {
width: 25,
height: 100,
x: gameWidth - 25,
y: gameHeight - 100
};
window.addEventListener("keydown", changeDirection);
resetBtn.addEventListener("click", resetGame);
gameStart();
function gameStart(){
createBall();
nextTick();
};
function nextTick(){
intervalID = setTimeout(() => {
clearBoard();
drawPaddles();
moveBall();
drawBall(ballX, ballY);
checkCollision();
nextTick();
}, 10)
};
function clearBoard(){
ctx.fillStyle = boardBackground;
ctx.fillRect(0, 0, gameWidth, gameHeight);
};
function drawPaddles(){
ctx.strokeStyle = paddleBorder;
ctx.fillStyle = paddle1Color;
ctx.fillRect(paddle1.x, paddle1.y, paddle1.width, paddle1.height);
ctx.strokeRect(paddle1.x, paddle1.y, paddle1.width, paddle1.height);
ctx.fillStyle = paddle2Color;
ctx.fillRect(paddle2.x, paddle2.y, paddle2.width, paddle2.height);
ctx.strokeRect(paddle2.x, paddle2.y, paddle2.width, paddle2.height);
};
function createBall(){
ballSpeed = 1;
if(Math.round(Math.random()) == 1){
ballXDirection = 1;
}
else{
ballXDirection = -1;
}
if(Math.round(Math.random()) == 1){
ballYDirection = Math.random() * 1; //more random directions
}
else{
ballYDirection = Math.random() * -1; //more random directions
}
ballX = gameWidth / 2;
ballY = gameHeight / 2;
drawBall(ballX, ballY);
};
function moveBall(){
ballX += (ballSpeed * ballXDirection);
ballY += (ballSpeed * ballYDirection);
};
function drawBall(ballX, ballY){
ctx.fillStyle = ballColor;
ctx.strokeStyle = ballBorderColor;
ctx.lineWidth = 2;
ctx.beginPath();
ctx.arc(ballX, ballY, ballRadius, 0, 2 * Math.PI);
ctx.stroke();
ctx.fill();
};
function checkCollision(){
if(ballY = gameHeight - ballRadius){
ballYDirection *= -1;
}
if(ballX = gameWidth){
player1Score+=1;
updateScore();
createBall();
return;
}
if(ballX paddle1.y && ballY < paddle1.y + paddle1.height){
ballX = (paddle1.x + paddle1.width) + ballRadius; // if ball gets stuck
ballXDirection *= -1;
ballSpeed += 1;
}
}
if(ballX >= (paddle2.x - ballRadius)){
if(ballY > paddle2.y && ballY < paddle2.y + paddle2.height){
ballX = paddle2.x - ballRadius; // if ball gets stuck
ballXDirection *= -1;
ballSpeed += 1;
}
}
};
function changeDirection(event){
const keyPressed = event.keyCode;
const paddle1Up = 87;
const paddle1Down = 83;
const paddle2Up = 38;
const paddle2Down = 40;
switch(keyPressed){
case(paddle1Up):
if(paddle1.y > 0){
paddle1.y -= paddleSpeed;
}
break;
case(paddle1Down):
if(paddle1.y < gameHeight - paddle1.height){
paddle1.y += paddleSpeed;
}
break;
case(paddle2Up):
if(paddle2.y > 0){
paddle2.y -= paddleSpeed;
}
break;
case(paddle2Down):
if(paddle2.y < gameHeight - paddle2.height){
paddle2.y += paddleSpeed;
}
break;
}
};
function updateScore(){
scoreText.textContent = `${player1Score} : ${player2Score}`;
};
function resetGame(){
player1Score = 0;
player2Score = 0;
paddle1 = {
width: 25,
height: 100,
x: 0,
y: 0
};
paddle2 = {
width: 25,
height: 100,
x: gameWidth - 25,
y: gameHeight - 100
};
ballSpeed = 1;
ballX = 0;
ballY = 0;
ballXDirection = 0;
ballYDirection = 0;
updateScore();
clearInterval(intervalID);
gameStart();
};
Document
0 : 0
Reset
#gameContainer{
text-align: center;
}
#gameBoard{
border: 3px solid;
}
#scoreText{
font-family: "consolas", monospace;
font-size: 100px;
}
#resetBtn{
font-family: "Permanent Marker", cursive;
font-size: 22px;
width: 100px;
height: 50px;
border: 4px solid;
border-radius: 15px;
cursor: pointer;
}
I trullt adore how instead of using a github link to share a sourcecode you just copypasted whole script in a youtube comment :D
nevertheless, thanks for a wonderful tutorial!
❤️
Hey bro I love your channel I have started learning HTML from your 1 hour HTML course , I'm planning on learning CSS and Javascript from your channel after finishing HTML, after Javascipt I will learn Rust programming language, can you make a course on Rust as well ? It would be really great
Love from Oman
lmao bro code when did you become gigachad
Olá, a nossa plataforma gostaria de o convidar a anunciar para nós e nós pagaremos pelo seu anúncio, por favor contacte-me se estiver interessado, obrigado"
Hey bro!
I'm from Brazil and I don't have money to learn here....
With you I learn English and to program.
Thank you from the heart.
God bless you
Somos dois irmão! 🇧🇷
where u bro in this time?
IT was a wonderful experience to go through this set of 90 videos for JS, learned a lot, I salute you code bro!
A nice way to learn some of the beginner stuff, and the way you coded it was really clean.
Wait this is beginner stuff?
@@mbg_legend3077yes it is
underrated channel, very fast and daily uploading of a very useful content. thank you so much this is absolutely helpful to me while I am currently learning js
Yeah and he's one of the few people that can explain in simple terms what code is doing. idk why others seem to stumble over their explanations
@@puppergump4117 so trueeee!!
Thank so much, best javascript course EVER!!!! thankyou so much Bro, Gog Bless you
You have domenstrated game development briefly i cant thank you enough❤️
Keep up the good work. I really appreciate your content. This copywork and trying to understand it is the best way for me to learn as fast as possible.
Luckily I started in your java tutorial series when I discovered your channel, javascript has a lot of common format for the syntax. I'm also studying your DS&A tutorial series, and that one is heavily related to both of these two languages that I am learning as well.
Hopefully I will finish that DS&A too so that I can go over c# and c++ programming.
You have 420 thousand subs rn. Congratulations! Keep up the good content Bro. You are one of the best tutors on RUclips.
freaking amazing series!
In such a nerdy industry its great to have a chad among us
Thanks a lot for this valuable Video
i got it to the end of the course. thank you very much!
I hope ur viewers came back man
I love ur vids ty for everything u've done
Much love bro ❤
This is the channel we all needed but don't deserve.
you literally upload the best programming content on youtube
Just now i knew that I can build a whole website with just a short html code and a huge js code. This content is perfect 👌 keep on it
Javascript Looks like a Great Coding Language!
Gonna learn it after C++.
Thanks again for Uploading Quality Coding Videos
its not
Would be nice to get Bro video about Java Springboot tutorial...
I made my pong game more like the original in black and white and it looks nice. Thanks for the tutorial Bro Code.
Please make more cool games with Java too 🙏🙏
this channel is so underrated
Hey man! I am a college student, and your tutorials have helped me immensely. Do you have a patreon, or a donation website for us to show our gratitude? I would like to pay you a cup of coffee (or a beer) lol. All this knowledge for free is just crazy! Thank you so much!
Ikr this dude is so good with his explaining
Your voice and content is dam good ❤️
Bro actually a legend.
Love your videos. Can you please make a playlist on React?
loving this content, simple yet effective way to explain. keep it up
!
Hello bro! I love your channel and I learned a lot from you, and I want to ask you if you can make a PHP course.
Can you make a tutorial php & laravel please
Please make course on PyGame tutorial
Thank you you are the best bro I hope you open a live stream to make allow us to talk with you
Excellent work
Thanks dude for this amazing playlist , keep it up 🔥🔥
heyy mate bro code is back!
Bro Can u do tutorial on JavaScript ES2022 .
You deserve so much more subs your videos is entertaining and educational at the same time keep doing the great job you are doing
Can you please do some tutorials on c# advanced topics like control and connecting to database please? I am a biggest fan i have seen all your videos about swing and now am pro on swing thanks to you bro ✌️✌️
Please make a video on class time table management system software only using Java
Hey bro is it possible you make a tutorial about programming phones with android studio after this JS course? (Thanks alot for coming back to youtube).
thanks, this is really helpfull for me, can you do same as this play list about react?
Hey Bro, I’m a big fan of your channel. I just graduated high school and I’m majoring in Computer Science next year. I want to spend the summer coding, but I don’t know where to begin.
I’m essentially starting from scratch after taking a course in Python from Udacity. My main interests are working with data and math (I’ve taken multivariable calculus). I’m asking you because I enjoy your detailed content, and I know you’ll have a lot of experience answering these types of questions. I’m looking to learn robust skills and make cool projects and generally avoid being bored. Hope you can help. Thanks.
Thank you bro Code. Make a React video please
Sir, can you make a tutorial on Nodejs ?
Hey dude just asking r u gonna do any c# games and stuff like the rock paper scissors and guess the number ones because they were really fun to follow and learn! Keep the amazing work up!
What a legend, this is really cool
Can you make a Lua course?
please can you make a video about reflexion thanks and listener in other class
Can you make a django tutorial?! You are the best
Well, I gotta watch this one now.
Btw, are there any chances of you making a Lua tutorial?
you are doing god's work
bro you are awesome
You are a legend !!!! and a big inspiration. You make coding super easy. Would love to know if you will be doing any content on WEB 3.0...A BIG THING!! Your great knowledge will really go a long way to help us understand all about solidity and building web3 dApps
u can write dapps in React & pure JS tho
same bro
Hey bro!
Your are the best 💖
hi i have a suggtion for a video do you think you could make a video on how to make a extension for crome? (if you havint already)
Do Lua programming language as your next tutorial series!
bro please make tutorial c++ OOP
Bro helps me!!!!!
How can I publish my HTML website on the internet?
Hello, Please make a video on data structures and algorithms in python
can u make a video about discrete math
Wow after a long time bro how are you doing
great bro. rust language video want
Could you make a tutorial series on Java Spring Boot? Pretty please with cherry on top?
Can you do ethical hacking/cyber security courses?
Would you please
Give me a road map for learning programming the fastest and most *efficient way* ???
Hey Bro, please update the video as soon as possible, I am looking forward to it!!!🤩🤩🤩🤩
Can you make haxe full course?
9:50 idk why but it doesnt draw the paddle :( anyone can help me? i checked the code, everything checks out but it doesnt draw the paddle. only difference in my code is that i typed "black" instead of whatever colour he chose :(
console says "cannot rea properties on null" for gameBoard
You are amazing
I watch your videos and they are helpful
Now I have a project but I have some problems
Can you help me with my project?
pov ur with a 60 percent keyboard
Hello Bro Code, can you make a video to talk about programming 2D games in python?
can you please make course about Lua i wanna learn that to make games in love :(
How to increase and decrease the speed of the ball ?
pls send the github link cuz my console is giving me a lot of errore with this one
its working now but I can't control the blue paddle
Hello dude. I just wanma ask if the contents you have in this 90-video playlist is the same with the other playlist containing 60 videos. I just found both of the playlist when I'm looking for your tutorial on javascript.
Can you do rust please
Pls bro can you make video how to get your first job jr position
Bro can ya make a vid for LUA pls?
Bro pls make the typescript programming language tutorial, i need it
@BroCodez bro could you please make a project on Sudoku Game In Web Development and in that project there will be different types of level and every new game there is a new game board where the numbers from 1 to 9 will be in random order in random section in every new game and there is a button whose name is solution and when you click on that button you can see the solution of that particular game and every new game the solution button will give the appropriate solution for that game.
Could you make program to calculate E=MC2?
Hey bro pls can you give us tut on php?
Hey bro! I want some advice.
From u I have learned java and learning javascript but I am one of those guys who suffer from imposter syndrome. so what should I do? if I have to do some example projects can u give me ideas?
BTW you make epic videos, keep it up, and best of luck :thumbsup: .
Hi Bro, why doesn't VS code offer code completetion while you're coding in Javascript and when you press dot?
make a ruby course please
hey bro can you create a game like a mario?
Definitely! Send a text on WhatsApp to the number displayed above. Let's work!!
How to become a pro coder at leetcode??
I don't know if you have time, but I request you to make videos on a few Scripting Language(Like : Lua, Squirrel etc).
much ❤
the top, when I installed soft soft (restart didn't help). I have a creative softblaster z softcard. I'm assuming it has sotNice tutorialng to do
Lua next please
hi bro.Do django full course pls
Bro, you should do a Kotlin tutorial!!!!
BRO CAN YOU MAKE MORE VIDEOS IN JAVA ITSELF
For the youtube algorithm! 🙏🙏🙏
Bro java game builds plees
Can you teach rust?
Bro code in a few days:
Re making an os in javascript
Also next cpp video when :v
You must do Cobol. And Basic
anyones ball get stuck on checkCollision function?
Increíble