Bouncy Updated for 2.6
Geoff Canyon
gcanyon at inspiredlogic.com
Tue Jun 7 03:36:14 EDT 2005
I've updated the Bouncy stack with the Revolution graphic for 2.6. It
now happily bounces around the screen with a deep mask. The engine
handles it very nicely (disclaimer: handles it nicely on my 1ghz
PowerBook. Please let me know how it behaves on older hardware).
Use this command in the message box in 2.6 to see it:
go url "http://www.inspiredlogic.com/rev/bouncy2.rev"
Make sure you select the browse tool, and then fling it!
For those who don't remember, bouncy is a windowshaped stack that can
be tossed around the screen. It bounces off the bottom and sides, and
makes a noise when it does. There is gravity and a slight friction,
so eventually it will slow and stop. The top of the screen is left
open. With practice you can fling the window so high it will take
many seconds to reappear on screen.
I wrote the first iteration of bouncy while waiting for a plane. I
didn't expect it to run too well, but it surprised me. Now it has
surprised me again. Even with a deep mask on a roughly 200x700 pixel
stack, it not only works smoothly, it works smoothly with twenty of
those stacks going nuts on screen
Features include (not all tested under 2.6, let me know if you hit
issues):
-- Grab and throw in any direction.
-- Drag and drop wherever you like.
-- Shift-drag to slingshot. Some people find it hard to throw
bouncy. The answer is to hold down the shift key, click and drag
bouncy. When you let go bouncy will slingshot quickly toward where
you started dragging from.
-- Option-click bouncy to create a clone of the stack. There is no
limit to the number of copies you can create. As you create more and
more they will eventually get jumpier as you throw them all, but
twenty copies of bouncy all going at once works fine on my computer.
-- Command-click to paint bouncy at random. Works better for
changing a solid color to another solid color (it uses the paint
bucket tool) so not so applicable any more.
-- Drag an image file onto bouncy to set the image and shape.
Accepts .png and .gif
-- Drag a sound file onto bouncy to set the sound bouncy makes when
it hits the wall. Accepts .wav and .aiff
-- Hold down the Escape key to stop all copies of bouncy and
position them on screen. NEW -- staggers them when it repositions
them. They used to all pile at the same location.
-- Command-C to copy bouncy's script. This is more for when bouncy
is distributed as an application.
Bouncy is a little under two hundred lines of code, reasonably clear
and commented. I'd show it to my mother, anyway. ;-)
If anyone wants bouncy as an app, let me know.
Regards,
Geoff Canyon
Inspired Logic
More information about the use-livecode
mailing list