Learn creative coding writing simple programs

139. Tweak values while a program runs

(Jump to 7:19 to see Tweak in action)

Tweak is a Processing mode that allows you to change any numbers in your program while the program runs. Without the Tweak mode you would have to stop your program, change a value, start your program again and observe the changes. This new mode helps you fine tune your program in real time, while it runs.

The effect of each number in a program is easy to understand when it can be manipulated interactively and the result observed without delay. Try writing this program and tweaking each value:

void setup() {} void draw() { ellipse(50, 50, 50, 50); }

Try replacing ellipse() with line() and other drawing functions.

Note: the setup() function must exist for Tweak to work.

Tags: tweak, variables, interactive

Code editor

You can make changes to the code below. Then
Below you can ask and answer questions related to this video. If your question is unrelated to the video, please post it at the Processing Forum as I'm unable to help with all of your programs and still have enough free time to eat and sleep :)
comments powered by Disqus