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

Report as inappropriate.

danpost presents ...


GQActor Superclass Demo

Demo of my GQActor superclass which extends my QActor class.

The QActor class gives its actors smooth movement and rotation.
The standard GActor class gives its actors a gravitational pull downward.
The GQActor class does the same as the GActor class, except it is specifically designed to extend the QActor class.

Together, very little code is needed for an actor subclass.

Use the bars along the top of the window to change the settings by mouse clicks and press-holds inside and outside the bar frames -- right side to increase or maximize and left side to decrease or minimize. Changing the gravity or jump force values without changing the other in the same direction may cause an imbalanced state (either no jump or an outrageously large jump).

Use 'left' and 'right' arrow keys for horizontal movement.
Use 'up' arrow key for jumping.

1766 views / 8 in the last 7 days

1 vote | 0 in the last 7 days

Tags: physics demo with-source gravity drag danpost support smooth-moving

This scenario is a member of: Support Classes by danpost

open in greenfoot

There is no HTML 5 translation of this scenario available.
View legacy version (requires Java plugin)

This scenarios uses Java features that are not available for use after conversion to HTML 5. Please try the legacy version, which requires the Java plugin to be installed.



Source will be published upon completion of documentation.
A new version of this scenario was uploaded on 2015-01-10 21:10:57 UTC


Source -- finally. Now includes easy image control (left and right for on ground, plus left and right for in air).


Sorry, guys. The 'touching' method will not work as documented and does not do what I had intended as is. When I get a chance, I will update the scenario (hopefully, with what I wanted).


NVM. The 'touching' method is correct as is. I must of had a brain-fart when I said it needed fixed.
A new version of this scenario was uploaded on 2017-03-12 17:35:46 UTC

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

Who likes this?