Skip to content
zarak5 edited this page May 12, 2018 · 30 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.
  • 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 and link to it below.
  • Try to post by 10am the day of class if at all possible.
  • Add a questions below!

Questions

  • your question here -- your name (optional)
    • an answer will appear here
  • When comparing numbers from a CSV file, I ran into an issue where >< operators were comparing values as strings rather than numbers (and giving wrong answers). I used parsefloat() to ensure the numbers were compared as numbers, but why does this happen? -- Aidan

Post your work

Clone this wiki locally