JS Asteroids Game Part 3 (Collision Detection and Explosions)
Mt. Ford Studios
In the third part of this JavaScript Asteroids Game tutorial series, we learn how to use circle collision to detect when the ship strikes an asteroid. When it does, we’ll make the ship explode! After the explosion, the ship resets back to the middle and stays invincible for a few seconds.
If you liked the original 1979 Atari game, Asteroids, go ahead and download the code below and create your own cool web-browser game!
CODE Previous tutorial (Asteroids Part 2 – Asteroids Creation): https://drive.google.com/open?id=1Pw4_n4xpuinuNZMpbvu2-1McRtOmOH-B This tutorial (Asteroids Part 3 – Collision Detection and Explosions): https://drive.google.com/open?id=1G7uwqyL1rMUHYUN_ogH7Zx3oHr0jZIs9
USEFUL LINKS Mozilla MDN Circle Collision: https://developer.mozilla.org/kab/docs/Games/Techniques/2D_collision_detection Visual Studio Code: https://code.visualstudio.com/
FIND US ON FACEBOOK https://www.facebook.com/MountfordStudios/ ... https://www.youtube.com/watch?v=3QCjyAyF03g
58402481 Bytes