siteIcon

Tech Novice Tools

Processing Apps

burgerIcon

Simulitis Sagavirus

Stage 2: Animate the population

About this stage

It's time to move the 'Blues' around. Create a population of blues and then hit the 'Go' button to make them move around.

They currently bounce off the walls...not each other...we'll develop that ability in the future.

Use the Speed slider to adjust the speed of the blues.

Ponder Points (Simulitis ~ Stage 2)

  1. Study the tickPopulationUp function and explain why we had the line:
    var newPopulation = currentPopulation*1.0 + 1;
    rather than:
    var newPopulation = currentPopulation + 1;
    Why didn't we have to do similarly in the tickPopulationDown function?
  2. The coding statements in the 'Ponder Point' above look different than the other information there. What is the HTML tag that's doing this for us? Do some research on it and explain its use.
  3. What is the complete CSS rule that makes the 'Go' button green?
  4. To get each 'Blue' to animate independently, we had to create a 'class-like' function that gives each one attributes that determine their individual behavior. Looking at sketch2.js code, how many attributes does a 'Blue' have? What are they?
  5. How many functions (methods) are affiliated with each Blue? What are they?
  6. Play around with the app by adjusting various populations and speeds. Do you notice any problems? Explain them and suggest some solutions.
  7. Are there any features you suggest at this time? What are they?

Last update: 03/15/20


Controls:

Population Controls:

Population:

Speed: