This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

tombud999
tombud999 presents ...

2009/8/4

Tossing

New tossing type: Grab (click & drag) the golden ball and toss it by
releasing it (no auto release). There is no restriction of direction or
start-end positions of tossing movement.

Grab (click & drag) the red ball and toss it by
moving it accross the first vertical line,
then release the mouse button (not the mouse :D) or
moving it accross the second vertical line (auto release).

The tossing force depends on the direction & speed of the mouse movement.

Be carefull, don't toss your mouse! :D

Tell me what do you think about this mouse control?

Updates:
Some bug fixes.

Previous updates:
New Toss2 class.
New SmoothMoverWithGravity class extends Wanderer class.

Add gravitation effect.
Auto reset ball position.

4771 views / 7 in the last 7 days

2 votes | 0 in the last 7 days

Tags: mouse simulation physics demo with-source throw reusable wanderer throwing tossing toss

open in greenfoot
Your browser does not support the canvas tag.
tombud999tombud999

2009/8/14

Thanks, I'll fix the red ball tossing.
delmardelmar

2009/8/17

I like the golden ball feel. Should make a good control for some type of game.
tombud999tombud999

2009/8/18

Thanks, I'm preparing a new game scenario using this tossing control, and keep this scenario as a demo / reuseable.
A new version of this scenario was uploaded on Sat Aug 22 09:06:32 UTC 2009
tombud999tombud999

2009/8/22

Fix the red ball tossing & some bugs. About the golden ball, I think it need a speed limiter, because if we toss it really hard upward, it can take a long time before get back to the ground, some time it doesn't get back, ... I believe it splat on my room ceiling! :D
mjrb4mjrb4

2009/8/22

Are you sure sometimes it never comes down? For practical applications I agree, a speed limiter would definitely be a bonus - but I've managed a speed of 299 maximum and it came down after around 20 seconds or so at that speed. Unless you've gone higher? :-)
davmacdavmac

2009/8/24

You've introduced a new bug :) The first black line is no longer significant. I don't have to drag the red ball past it before releasing the mouse button...
tombud999tombud999

2009/8/24

So this already a small game of "How fast can you throw the golden ball", and you beat me (I only max at speed 218 :P) About the golden ball, you're right, now it's always get back to the ground after the last bug fixes. About the red ball, the first vertical line is still needed as count down starter (try dragging the red ball between the two lines). If you release the red ball before the first line, then it considered as cancelling the toss, so the red ball just drop down by gravitation : ) I know the red ball tossing is not good :P, don't bother about it, I just keep it as history, I'm building a new game scenario base on the golden ball codes.
Sockman101Sockman101

2013/4/5

Best speed: 166
JetLennitJetLennit

2013/5/20

I got zero, is that supposed to happen?

See all comments

Want to leave a comment? You must first log in.

Who likes this?

spaceblue Herman