Coding Challenge #5: Space Invaders in JavaScript with p5.js

Subscribers:
1,740,000
Published on ● Video Link: https://www.youtube.com/watch?v=biN3v3ef-Y0



Duration: 40:45
568,204 views
9,919


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







Tags:
coding challenge javascript
p5.js space invaders
js space invaders
space invaders javascript
code space invaders
coding challenge game
space invaders
javascript
coding
javascript (programming language)
p5.js
game programming tutorial
how to program space invaders
html5 game programming
challenge
p5.js tutorial