Coding Challenge #5: Space Invaders in JavaScript with p5.js
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 Creation! https://thecodingtrain.com/guides/passenger-showcase-guide
đŠ Suggest Topics: https://github.com/CodingTrain/Suggestion-Box
đĄ GitHub: https://github.com/CodingTrain
đŦ Discord: https://discord.gg/hPuGy2g
đ Membership: http://youtube.com/thecodingtrain/join
đ Store: https://standard.tv/codingtrain
đī¸ Twitter: https://twitter.com/thecodingtrain
đ¸ Instagram: https://www.instagram.com/the.coding.train/
đĨ Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
đĨ Intro to Programming: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA
đ p5.js: https://p5js.org
đ p5.js Web Editor: https://editor.p5js.org/
đ Processing: https://processing.org
đ Code of Conduct: https://github.com/CodingTrain/Code-of-Conduct
This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecodingtrain.com/issues/new
#spaceinvaders #game #p5js