Really nice idea! I used to spend hours playing with these and never getting anywhere...
Now here's a challenge - how about a solve button? One that actually solves the puzzle by sliding the blocks so you can see what it's doing?
I might have a go at that myself actually when I'm next in the mood for a challenge...
I have an idea to make it a bit trickier - instead of all the balls starting at 0 velocity, you could assign them a small value to start with just so you're forced to do something rather than sit there with them all accumulating in the middle!
They're actors - I did try drawing them directly to the background, but that seemed to make things worse. Though thinking about it, that was my coding at 2 in the morning so there's a good chance there was something I missed...
Actually, I scrapped the array of points / redraw the entire screen each time for the reasons you mentioned pretty early on, I figured it'd be pretty inefficient and get very laggy after a while, especially redrawing the whole screen.
In fact, none of the lines are stored at all. There's only one point stored, and that's the previous one. Then it draws a line between the previous point and the new one, then sets the new point to the previous point and loops again. Nothing is redrawn at all, it's just one line drawn per act cycle (while the mouse is being dragged, of course.)
The only reason I can think of for it being laggy is the sheer number of lines on the screen - and there's not a lot I can do about that!
That's the next thing to do! This was forming the basis of a tutorial though and I wanted to keep it very simple to start with. Hopefully it'll build up into something a bit better.. :)
2008/8/22
Circles
2008/8/22
fifteen
2008/8/19
balance
2008/8/14
balance
2008/8/12
balance
2008/8/9
balance
2008/8/2
Paint v2
2008/8/1
Paint v2
2008/7/31
Paint