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

Report as inappropriate.

danpost
danpost presents ...

2019/1/21

Smooth Mover Demo

This demo exhibits the differences between standard movement and two different smooth mover classes.

Three sub-worlds were created, one for each helper class. The 3 classes are:

Non-helper: a class with no code to assist in movement;
SmoothMover: provided with greenfoot to assist actors in moving more accurately;
QActor: provided by me to assist actor in moving and turning more accurately;

All worlds have 6000 balls move toward a stationary ball to bounce off it. About 5400 balls actually bounce in each instance. All balls attempt to approach the still one at different y-coordinate values, all different by 1/100th of the size of one pixel. The important thing to look at are what reflected angles are taken. A trail is left by all balls after bouncing for inspection.

CONTROLS:
KEYS: 1-5 to change ball speed
MOUSE: on drop-down menu to change helper class

Source is given so that any questions about "fudging" (intentional) can be dismissed.

388 views / 9 in the last 7 days

2 votes | 0 in the last 7 days

Tags: demo with-source smoothmover danpost qactor smoothmoving

This scenario is a member of: Demos by danpost


open in greenfoot
Your browser does not support the canvas tag.
A new version of this scenario was uploaded on 2019-01-21 21:21:27 UTC
A new version of this scenario was uploaded on 2019-01-21 21:23:58 UTC
momochowmomochow

2019/1/23

hi @danpost I'd like to ask for your help with my personal project which should be really easy for you. It's a board game that I'm trying to make on greenfoot. It'd be great if you could help me. I may be able to contribute to your paypal account as well.

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

Who likes this?

Notimeforoxygen data17