Coding Challenge #4: Purple Rain in Processing

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



Duration: 12:14
1,893,887 views
40,922


In this viewer submitted coding challenge, I attempt to code a Purple Rain Simulator in Processing. Code: https://thecodingtrain.com/challenges/4-purple-rain

πŸ•ΉοΈ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/5C07OcK6A

πŸŽ₯ Previous video: https://youtu.be/AaGK-fj-BAM?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
πŸŽ₯ Next video: https://youtu.be/biN3v3ef-Y0?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
πŸŽ₯ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH

πŸ”΄ Coding Train Live 34: https://youtu.be/r8QMcI5qxQM?t=3919s

Related Coding Challenges:
πŸš‚ #1 Starfield in Processing: https://youtu.be/17WoOqgXsRM
πŸš‚ #27 Fireworks: https://youtu.be/CKeyIbT3vXI
πŸš‚ #169 Pi in the Sky Game: https://youtu.be/_H9JIwWP7HQ

Timestamps:
00:00 Introduction to the challenge
00:37 Setup the sketch
01:08 Create a Drop class
02:45 Set initial values and create a Drop object
03:23 Create an array of drops
04:27 Randomize initial values
05:30 Reset raindrop location when offscreen
06:11 Few more improvements
06:56 Add gravity
08:26 Add z value for 3d illusion
11:29 Final Version!

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

#purplerain #processing







Tags:
processing
tutorial
processing tutorial
object oriented programming
creative coding
programming
challenge
coding challenge
oop
object oriented
programming challenge
pvector
processing 3
purple rain
rain simulator