Brian Eno is a musician, producer, and composer whose compositions over nearly 50 years have been seminal in the development of ambient and electronic music. Together with Peter Chilvers, he has recently developed an app for the iPad called Bloom. The application allows the user to touch anywhere on the screen, which produces a musical tone that begins to fade out until it is inaudible, at which point it repeats. Along with the tone, each touch results in a small dot, which grows at that location over time, becoming more and more transparent. The effect after several touches is of long, sustained chords that decay and repeat, along with a visual effect that resembles slow-motion water droplets spreading out after hitting a surface.
You can see the app on the iTunes app store at https://itunes.apple.com/us/app/bloom/id292792586, and you can watch a video of the app in action at https://www.youtube.com/watch?v=2tZ7eWqHsdg.
As an aside, Eno and Chilvers have produced a number of pieces of "generative music", all implemented as apps for the iPad. You can see other works of theirs at http://www.generativemusic.com/
In this project, you are to write a program that emulates the visual component of Bloom. There is no need to include sound, which we have not covered in this course. Specifically, your program should do the following:
The key to doing this is to keep a set of arrays, one for each essential property of a drop. In addition, record the number of click s that have occurred.
At each frame, traverse the arrays in parallel, from index 0 up to the number of drops created so far (not the entire array). The necessary components of each drop will be in the same position of each array. To get a feel for the idea behind this, look at the array examples posted in the Example Code section of our class web site.
You can make any game you like, with any rules you like, but your game must incorporate a minimum of five of the techniques provided in the Supplementary Ideas. You may include more, of course, and if you want to make a modification to one or more of the techniques, that's fine.
Your code must be syntactically correct. Any solution that contains a syntax error anywhere (and hence crashes when you hit the "play" button") will receive no credit. If you run into any trouble here, please ask me or one of the TAs for help.
Your work will also be assessed in part on the elegance and clarity of your code, that is, the clarity an simplicity with which you accomplish complicated tasks. This is a somewhat subjective criterion, but it mainly boils down to the idea that there should be exactly as much code as you need to get a job done, neither more nor less, and what's there should be comprehensible to an independent reader.
As a partial (but not complete list), variables should be used instead of hard-coded values, but the scope of a variable should be neither more nor less than what is needed (e.g. only make a variable global if there's no other choice). Loops should be used instead of repeating a related series of operations one at a time. Tasks that are repeated should be defined as functions that are called, rather than copying and pasting the same text over and over.
Work whose visual presentation reflects a particularly thoughtful attention to grace, detail, and coherence of presentation will count favorably.
Finally, your source code file must begin with a "header" comment of the following form:
/* file name Author: your name CPSC 120, Project 2 Created: the date */
Try adding a sound component to each drop, i.e. a tone that sounds and decays with the drop as it expands. You'll need to read up on adding sound to a Processing program. You can start with this tutorial: https://processing.org/tutorials/sound/. Be warned that this is difficult material, so only tackle it if you finish the required parts of the project early, and want to have some fun with the rest.