Embracing constraints and limitations
With the starting structure of a bouncing ball, we already have the framing necessary to add the decorative elements (color change). We know a few things:
As I was writing out this blog post and explaining the math behind this exercise, I realized that my original value for "colorRange" of 256 divided by canvas width was incorrect.
Why and when to consolidate code?
I started with the code below on the left, which does exactly as it says - When the control reaches the left end of the track, keep it at the limit (50), and then separately, when the control reaches the right end of the track keep it at the limit (350). This allows an extra feature too, which is if you click anywhere between 0 - 50, it automatically brings the control to the end, and vice versa, but the code doesn't look "elegant" and almost clunky.
So, I included this constraint into the mouse interaction (see code on the right), limiting the "controlX" range by connecting it to mouseX interactivity. This code looks nicer, but the interaction experience is not as smooth as the first attempt. If I want to click to bring the control to the end, I'd click somewhere within the arc, however the actual end of the control's range of motion is the center point of the arc, which visually does not look like the "end of the slider". Perhaps I could fix this user experience issue by shortening the track, but the question still remains - why and when should I consolidate code?
Do You Have A Choice? - A sketch
Looking back at our approach of this assignment, Devan and I were so focused on the interactive aspect of the assignment, we did not develop a plot, which would have been helpful in responding to the questions below. However, it has been such a delight watching our cohort and classmates test out this game, and share the frustration, I think this would still be considered a success.
Which choices are easier, harder? Which choices are false choices?
Comments are closed.
|
Blog posts and other documentation from NYU ITP classes
Categories
All
|