Assignment Set 9

p5.play Basics

9.0 Exercise — p5.play Mouse Events

You can do one of two things:

  • Create a grid of sprites that cover your canvas that all react on mouseOver. Try doing something with size, velocity or attactionPoint. The checkerboard exercise or the nested for loops code would be a good place to start.
  • Add the ability to press on sprites to the spawner code. Display a "score" on the screen that keeps track of the number of sprites you've clicked.

BONUS 25pts: Do both.

Be sure to use the blank p5 play project template here.

9.1 Exercise — p5.play Sprite Groups

Use sprite groups to do the following:

  • Create a gray "player" sprite that you can move around.
  • Create a green sprite on the screen that you can push around with your player.
  • Create at least three red sprites on the screen.
  • If the green sprite hits a red one, make the green sprite disappear.

BONUS 25pts: Create another sketch where you control a player navigating through a canvas of 10 randomly placed sprites. These 10 sprites should function as walls. Create two other randomly placed pickups that disappear when you touch them.

Be sure to use the blank p5 play project template here.

9.2 Project — Multiple Object Game

Create an engaging "game" (or interactive challenge) that explores a simple interactive concept. Be creative. Please include the following concepts we learned in p5.play:

Projects will be graded on both creativity and implementation.

Be sure to use the blank p5 play project template here.

To hand in your work get the URL from the editor and link to it from your index.html page. To receive credit, it must be uploaded by class on the date specified. Label it clearly. Here is help if you need it.