Contents
3 Speeds:
If you were feeling a little lost in class you might watch all the videos in the first clump. If you were comfortable in class, you can jump over the built-in variables that reflect user input and move right to the second group of videos about finding variables in your own fictional world on screen. (eg horizonal position, direction of movement). You should watch the video about “for loops” and the function videos before class. If everything is pretty clear so far you should try turning the graphical things moving around the screen into “objects.”
1) Review (If you understood everything in class you might skip these)
- 3.0: Flow (setup and draw) — You guys kind of know this already. The main loop function is called “loop” in Arduino but is called “draw” processing
- 3.1: Built-in variables (mouseX,mouseY) — we did this in class
- 3.2: Events (mousePressed, keyPressed) — we did this in class
- 4.0: Variables — This should be review
- 4.1: Incrementing a variable –This should be review
- 4.2 ICM: Using random()
- 4.3: Using println() — Instead of coming back into the serial monitor, println put text in the black window under your sketch.
- 5.0: Boolean expressions — Review
- 5.1: if, else if, else — Review
- 5.2: && (logical AND) and || (logical OR) –Review
- 5.3: Boolean variables — Review
- Examples: The flow: code blocks, setup, draw, and events: https://github.com/shiffman/LearningProcessing/tree/master/chp03_flow
- Examples: Variables: Declare, Initialize, Use: https://github.com/shiffman/LearningProcessing/tree/master/chp04_variables
- random()
- Related Reading Chapters 3-4 from Learning Processing.
2) Make the Ball Bounce (get this to work and make something interesting with it)
- 4.0: Variables — This should be review
- 6.4: Variable Scope
- 4.1: Incrementing a variable –This should be review
- 5.4: The Bouncing Ball — Riff on this for an assignment
3) Watch as much as you can stand before class (Definitely watch loops and functions ).
- 6.0 For Loops
- Examples Loops: https://github.com/shiffman/LearningProcessing/tree/master/chp06_loop
- Related Reading Chapter 6 from Learning Processing.
- 7.0: Intro to Functions and Objects
- 7.1: Function Basics
- 7.2 Modularity with Functions
- 7.3 Reusability with Functions
- Examples: Functions : https://github.com/shiffman/LearningProcessing/tree/master/chp07_functions
- 8.0 What is Object-Oriented Programming?
- 8.1 The Syntax of Objects
- 8.2 The Syntax of Classes
- 8.3 Constructor Arguments
- Examples: Objects https://github.com/shiffman/LearningProcessing/tree/master/chp08_objects
- Related Reading Chapters 7-8 from Learning Processing.
- 9.0 What is an Array?
- 9.1 Declare, Initialize, Use Arrays
- 9.2 Arrays of Objects
- 9.3 Iterating over an Array
- 9.4 Resizable Arrays
- Exampless: Arrays: https://github.com/shiffman/LearningProcessing/tree/master/chp09_arrays
- Related Reading Chapters 6 and 9, from Learning Processing, Chapter 23 for ArrayLists.
Homework
Create an animated application. Start over from scratch and build something with a very simple design. Focus on the logic of variables and avoid using hard-coded values. Play with making and incrementing your own variables. Try putting in some if statements to some rules to your world. Start by working in pairs (according to list below). You can post together or break off and complete the assignment individually. If you are stuck for ideas make a trippy hypnotic thing or a game.
Pairs
- Please try to spend a half an hour together. You can do you assignment independently or together
- Nicole, Daisy
- Abi, Henry
- Kat, Ashley
- Ieva, Emily
- Pauline, Maddie
- Caleb, Anna
- Jeremiah, Alice