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