Remarks: Processing Mazes
From Maze
(Difference between revisions)
| Line 29: | Line 29: | ||
| − | After writing this first variable program in Processing to focus entirely on the image of the maze, it became clear that watching the maze build one unit at a time on the C64 is a major component of the program. This behavior doesn't naturally work with Processing because the entire screen updates as a whole, rather than character by character. Processing uses a technique called double-buffering. This means the graphics are drawn to an off-screen image buffer stored in RAM. When the image is finished, it's pushed to the computer's screen. For programs that feature animation or interaction, the result is a new image being written and drawn to the screen about sixty times a second. Unlike in BASIC, the lines of Processing program aren't assigned numbers; each line is run in order from top to bottom and according to some higher level rules. This becomes more clear when we look at this program written in Processing by Ben Fry, the co-founder of Processing, to approximate the behavior of our 10 PRINT program on the C64: | + | After writing this first variable program in Processing to focus entirely on the image of the maze, it becomes clear that watching the maze build one unit at a time on the C64 is a major component of the experience. This behavior doesn't naturally take place with Processing because the entire screen updates as a whole, not character by character. Processing uses a technique called double-buffering, which means that the graphics are drawn to an off-screen image buffer stored in RAM, and when the image is finished it is pushed to the computer screen. For programs that feature animation or interaction, the result is a new image written and drawn to the screen about 60 times per second. Unlike in BASIC, the lines of the Processing program are not assigned numbers; each line is run in order from top to bottom and according to some higher-level rules. This becomes clearer when the program written in Processing by Ben Fry, the co-founder of Processing, to approximate the behavior of our 10 PRINT program on the C64: |
int w = 16; | int w = 16; | ||
