23:24Coding Challenge 5: Space Invaders in JavaScript with p5.js
From the creator
This is my attempt to make a Space Invaders type game in the browser with JavaScript and the p5.js library Code: https://thecodingtrain.com/challenges/5-space-invaders ๐น๏ธ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/Azip-ZzXI ๐ฅ Previous video: https://youtu.be/KkyIDI6rQJI?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH ๐ฅ Next video: https://youtu.be/jxGS3fKPKJA?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH ๐ฅ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH Videos: ๐ Classes in JavaScript: https://youtu.be/T-HGdc8L-7w ๐ด Coding Train Live 33: https://youtu.be/WpUnYfVmKdA?t=1192s Related Coding Challenges: ๐ #46 Asteroids: https://youtu.be/hacZU523FyM ๐ #72 Frogger: https://youtu.be/giXV6xErw0Y Timestamps: 00:00 Welcome to the challenge! 00:46 Setup the sketch canvas 01:22 Planning the game 02:00 Create a Ship constructor 04:20 Add keyboard interaction to move the ship 07:35 Create a Flower constructor 09:37 Create an array of Flowers 12:35 Create a Water Drop constructor 16:00 Create an array of drops 16:55 Create a drop object on key press 18:02 Start the drop at the ship's location 19:40 Check for intersection of water drop and flower 25:00 Grow the flower and remove the drop 30:40 Some improvements 31:20 Move the flowers 37:12 Improve keyboard interaction 40:00 Thanks for watching! Editing by Mathieu Blanchette Animations by Jason Heglund Music from Epidemic Sound ๐ Website: http://thecodingtrain.com/ ๐พ Share Your Creatio
Published 2016-04-26 ยท Watch on YouTube โ
Availability and playback restrictions are controlled by the original channel.





