Lucid Projects

Blog - Day to day mumblings...
Harry The Alien

Harry The Alien

17 Sep 2019 - Jake Sherwood

harry the alien

ICM - WEEK 2 - p5.js Drawing

ICM - WEEK 2 - Harry the Alien p5.js Drawing - refactor previous week’s assignment.

Canvas of final work at bottom

My week 1 assignment was a bit complicated so I tried to simplify things which created it’s own set of problems.

I set up “Harry” the alien from the week 1 assignment as the focal point. He flies around the screen as you move your mouse based on mouseX and mouseY. I tried to change this to the calculations for making the ball and square move towards the mouse from the worksheet. But it was complicated with so many shapes making up the alien. All the pieces just converged to the mouse and I lost Harry… he basically imploded when I ran that sketch. See Harry imploding here.

I used the random() function to generate new stars that flicker in and out of the canvas and are different every time.

I used variables for my ufo Y axis to move it up and off the screen over time.

Over all I struggled with this one. I’m not sure if my original shapes / design were just too complicated but I tried numerous different ways of doing things and never got things exactly the way I wanted.

Final p5.js sketch link:

categories: icm

join me on this crazy ride. enter your email:

contact [at] jakesherwood [dot] com

contact me if you'd like to work together