This week I expanded on my last sketch, adding changing background colors based on nyan-cat’s height in the sky and mouse-based locations that a mini-nyan cat uses to follow the mouse.
I am not very good at all at programming so I needed a little more help on this one. I found the Processing reference to be very useful. The reference can be accessed quickly by typing a keyword in Processing, highlighting it, right-clicking and selecting to look it up in the reference. It explains everything about the highlighted term in question, how it can be used, and it provides explanations of related terms as well. But for questions I did not have the keyword for, like when I was having problems declaring variables, the Processing.org forums provided me with the information I needed. I discovered that variables declared in one method cannot be seen in another, so variables used by both the setup and draw methods needed to be declared outside both methods. I found that information here: http://forum.processing.org/topic/cannot-find-anything-named-token
Thanks to the technical resources Processing provides I was able to create this sketch.