Not as exciting tonight but I did make some progress with Processing. Over the past couple of days I have been reading the same chapters over and over again trying to understand some new ways of coding. Last night I successfully converted one of my previous sketches into using this new method. The new method uses object oriented Programming and is based on Java. And the fact that I’m getting down to the bottom of it is a big deal to me.
What happens is I create a new thing called a “class” and inside of that class is all the code for one particular thing within my overall program. It allows me to encapsulate blocks of code which I can then initialize multiple times in my main body of code. So, if I design a class that draws a car on the screen I can then very quickly make a full freeway of cars. It’s still a little shady in my head but I am understanding the basics of it now.
Below is my sketch which now uses class functionality. For the sake of variety I have changed the code up a bit so that it’s something sort of new for you to play with. You can download the source code for this sketch here.
Comments
2 responses to “Day 170 / Processing With Class”
nice code!
Thanks Dtez!