Skip to content
aydintugbora edited this page Feb 25, 2020 · 28 revisions

Systems!

It is totally reasonable to simply refactor an assignment from previous weeks with new organization ideas (System class, inheritance, ES6 array functions, etc.). Or feel to pick one of the ideas below and/or design your own exercise!

  • Use a particle system in the design of a "Mover" object. In other words take one of the earlier examples and instead of rendering a Mover as a simple circle, emit particles from the mover's location. Here is an "asteroids"-style example.
  • Create a particle system where the particles respond to each other via forces. For example, what if you connect the particles with spring forces? Or an attraction / repulsion force? (Sample Answer)
  • Model a specific visual effect using a particle system -- fire, smoke, explosion, waterfall, etc.
  • Create a simulation of an object shattering into many pieces. How can you turn one large shape into many small particles? What if there are several large shapes on the screen and they shatter when you click on them? (Sample Answer)
  • Create a particle system with different “kinds” of particles in the same system. Try varying more than just the look of the particles. How do you deal with different behaviors using inheritance?
  • Use an array of images and assign each Particle object a different image. Even though single images are drawn by multiple particles, make sure you don’t call loadImage() any more than you need to, i.e. once for each image file. (Sample Answer)

Directions

  • Document your work on the web with a blog post and link below.
  • Try to post by 6pm the day before class if at all possible.
  • Add a question below!

Questions

  • I want to create two types of objects using a class and subclass. The class has the characteristic for circles, and the subclass the same one but as a square. I want to only affect the squares when a square is pressed and affect circles when a circle is pressed. However, I am not sure why I cannot manipulate the squares only, without attracting the circles. How to do that using inheritance? - Themis
  • questions!

Post your work

Clone this wiki locally