Here is another interesting use of lists. I developed a color-sensing bouncing ball project that can bounce off arbitrarily oriented curved lines. However, the bounce logic caused a perceptable lag in the motion. My solution was to create an invisible guide ball that computes the motion ahead of the ball that the user sees. The motion is stored in a list that the visible ball follows smoothly. I think it looks pretty good; however there is a bit of a lag when the simulation starts as the buffer fills.
http://scratch.mit.edu/projects/Paddle2SeeFixIt/285855
And another example,
http://scratch.mit.edu/projects/Paddle2SeeFixIt/286655
Offline
This really is an awesome and very clever use of lists to accomplish a baffling performance-increase for all "bouncing balls" projects out there. It also shows that Scratch has many techniques (like buffering an parallelism) which let you increase performance for complex operations without having to tweak Scratch itself. Thanks for this great example, Paddle2See!
Offline
Jens wrote:
This really is an awesome and very clever use of lists to accomplish a baffling performance-increase for all "bouncing balls" projects out there. It also shows that Scratch has many techniques (like buffering an parallelism) which let you increase performance for complex operations without having to tweak Scratch itself. Thanks for this great example, Paddle2See!
Thanks Jens - but please note that this technique will only work with bouncing balls in a static environment. It would not work for a pinball game for instance, since the moving flippers create a dynamic change to the environment that the guide ball could not anticipate. However, it might be possible to create a hybrid version of this technique that uses the buffer most of the time but also responds to environment changes that impact the visible ball.
Offline
I'm just wondering (sorry if it's spam) do you ever use paddle2seefixit to go on forums?
Offline
registeel wrote:
I'm just wondering (sorry if it's spam) do you ever use paddle2seefixit to go on forums?
I try not to. Paddle2See is my more public account. I use the "FixIt" account for fixing other people's projects, testing my own stuff, and isolating bugs. I don't log on to it every day so I don't want a lot of communication traffic on it.
Offline