Leave a Reply

20 Comments on "WAPG 5 Collision Hit Detection DOM Programming JavaScript Tutorial"

Notify of
avatar

Justin 2004
Guest
Justin 2004
5 months 28 days ago

hey bro remember you made a video how to make chat room in flash php and mysql ? where i can find the code

E Youth
Guest
E Youth
5 months 24 days ago

Lol. you can build now using javascript and study websockets

Mark Mahathey
Guest
Mark Mahathey
6 months 19 days ago

awesome

Adam Khoury
Guest
Adam Khoury
6 months 19 days ago

Thanks for the feedback.

sdhpCH
Guest
sdhpCH
6 months 19 days ago

Hope that is not a dumb question but… if you add tw to tx, isn't it important which part of thing is tx? Left, right, center, top, bottom – of "thing"? So, if it f.e. would be at the center, wouldn't we have to add tw/2 instead of tw in order to detect the real pixelperfect collision of the squares? Am I thinking this wrong?

sdhpCH
Guest
sdhpCH
6 months 18 days ago

I was simply wrong, thanks for your help, Adam.

Adam Khoury
Guest
Adam Khoury
6 months 19 days ago

When we are adding(+) the width(w) to the left edge(x), we are just determining the where the right edge is for that particular object. Try approaching the target object from both sides, you'll see it works as intended. We're not subtracting anything in the formula. If you did subtract the width from the left edge it would give a false location, false by the width of the object.

sdhpCH
Guest
sdhpCH
6 months 19 days ago

Thx Adam… Not sure if I did understand that well. If tx is left edge and I add or subtract the width to it – doesn't that mean that we have a different distance to the collision event as the player square approaches the target from the left side or the right?

Adam Khoury
Guest
Adam Khoury
6 months 19 days ago

tx represents the object's X position(left edge). It's not a centered coordinate, it is a left edge coordinate. Adding tw to tx determines the area that the object takes up on the screen on the horizontal plane. I hope that makes sense. And there are sometimes multiple ways to skin a cat when writing formulas, so you are encouraged to alter the formula to your liking.

Edwin Ochoa
Guest
Edwin Ochoa
6 months 19 days ago
I would appreciate your opinion on this: is php still worth the time, should I learn laravel or code igniter or should I move on to Node, React, Angular, Mongodb, etc. I have worked with these technologies a bit but I don't enjoy them as much as php and as a result I am kind of moving towards Android development instead of web development. I still think php is the king but Node, Angular, and React seem to be stealing the spotlight. A graduate came to our university with a recruiter and told students not to bother learning php. I… Read more »
Adam Khoury
Guest
Adam Khoury
6 months 19 days ago
I think it's time I make a video about using 3rd party tools, what the primary purpose of Node.js is and where it can be used, and how widely used PHP is and all of the improvements being made to PHP. I will try to formulate a video about these topics all in one video. Most people writing articles and blogs online are misinformed. And most people that graduate university with computer science degrees are poorly educated, because their teachers are not even properly educated or experienced. But keep in mind that web development and Android development cannot be compared… Read more »
Edwin Ochoa
Guest
Edwin Ochoa
6 months 19 days ago

Adam Khoury www.sitepoint.com/sitepoint-smackdown-php-vs-node-js/ . It's probably too much to ask and if so I understand but it would be great if you made a video explaining how true those claims are, that PHP is not scalable and that it's slower and less efficient than Node and that it's becoming obsolete. From what I have read Facebook uses hip hop virtual machine to execute their php making it faster than regular php.

Adam Khoury
Guest
Adam Khoury
6 months 19 days ago
Being a web developer and not using/knowing PHP is like being a carpenter and not owning a hammer. PHP cannot be put in the same category as Angular, React or Node. In fact Node cannot even be put in the same category as Angular and React. Node is different and has one specific purpose. PHP has a mongoDB function set. I think the people you are getting information from are improperly educated and misinformed. If PHP were not useful for web development then Facebook, Google, WordPress, Wikipedia, Etc… would not apply it when building software. If you are moving towards… Read more »
محمد السوسي
Guest
محمد السوسي
6 months 20 days ago

thnak you very very much Sir.

Adam Khoury
Guest
Adam Khoury
6 months 19 days ago

No problem, thanks for tuning in sir.

Jay Mee
Guest
Jay Mee
6 months 20 days ago

nice vid 😀 so its easy to make a mouse courser customized with it so it uses mouse position in real time with js? could you make a tut on this please? ( I have no idea how to even hide the original pointer).

kundan kumar
Guest
kundan kumar
6 months 20 days ago

I am your big fan Mr adom khoury

ƵOΜBΥMΞDIΛ.ȊC
Guest
ƵOΜBΥMΞDIΛ.ȊC
1 month 3 days ago

Why did you spell his name wrong? Dude you only have to copy and paste it.

Rewind Remix NCS
Guest
Rewind Remix NCS
6 months 20 days ago

Nice stuff

OLAIYA Taiwo Hassan
Guest
OLAIYA Taiwo Hassan
6 months 20 days ago

This is great sir, my Great Mentor

wpDiscuz