Sign Up, Lost Password
You need to login to take part
Rotate a „GreenfootImage“
By RcCookie, with 2 replies.
Last reply by RcCookie, 4 days ago:
Oops.. must have missed that method. Thanks anyways!
By Roshan123, with 20 replies.
Last reply by Roshan123, 6 days ago:
hey danpost, thanks a lot for the helping and suggesting me now it's not lagging anymore i think the problem was with the draw Oval, fill oval, setColor(rand color) when i changed it to a static image of the shield then it was not lagging anymore
Could u help 3 question scenario
By Sauravbasyalking12, with 1 reply.
Replied to by danpost, 6 days ago:
Please refer to
of the Java tutorials.
How to create levels of a game?
By ShauryaThapan, with 2 replies.
Last reply by danpost, 7 days ago:
Oftentimes, the inclusion of
fields (class variables) in your
class is sufficient to allow the game to become more difficult from one world instance to the next. Some
fields (class constants) can be used to describe the initial set-up of a "level". One
field (variable) would be used to track which level is current.
Acceleration, Collision and and Walljumps?
By Pumk!n, with 2 replies.
Last reply by RcCookie, 7 days ago:
To actually implement the moving system, you need to save your speed from frame to frame:
Methods and method signatures
By Ojhayvee, with 1 reply.
Replied to by danpost, 10 days ago:
What would be the method signatures for; 1. setLocation(); 2. getX(); 3. getY();
An example is given in the first section of
page of the java tutorials.
Not able to create a score counter
By Coder12341234, with 5 replies.
Last reply by danpost, 10 days ago:
The problem is that you have two (2) methods that could potentially remove the actor from the world, you call them unconditionally and they both require that the actor be in the world when called. You could use an if statement to place the condition of the second calling that the actor be in the world, as such: <Code Omitted>However, if you decide to rearrange things, it may cause issues again. Better, would be to start both methods,
, with the following line:
Need help with WBC-4 chapter 5 Greenfoot Homework!
By TheHDMICord, with 2 replies.
Last reply by TheHDMICord, 11 days ago:
That seems to have fixed the issue! Thank you so much danpost, you're an absolute lifesaver!
Why is this spawning in before I press "f"?
By Pumk!n, with 2 replies.
Last reply by Pumk!n, 11 days ago:
thank you so much, I am pretty new to this, so thanks
How can i change the background during game
By alicia007, with 1 reply.
Replied to by danpost, 11 days ago:
i want to change the background during my game at a specific action.
method or this
Newton's Lab: this(new Vector()) what does this mean??
By disassociated, with 5 replies.
Last reply by danpost, 11 days ago:
Can you open that up or give a hint about the concept where I can read more? The run sequence is like this right? Space/ Constructor Vector / Constructor SmoothMover / Constructor Body / Constructor
Let me just point out a thing here. When an
instance is created, it is created from the bottom up. All extending classes are built on their supers. So, when you create a body, the
portion is created before the
portion. Think of it as such that the
object inherits pre-defined traits provided by the
By Sauravbasyalking12, with 5 replies.
Last reply by Sauravbasyalking12, 12 days ago:
Thank you so much dan I got it
The jump should be made slower
By Flantox, with 1 reply.
Replied to by danpost, 12 days ago:
The one way that will most surely work is to use a smooth movement system on the actor so that you can use a "fractional" acceleration value. A slower than one acceleration will make your actor jump a bit higher, while doing so at a slower speed. See my
GQActor Superclass Demo
scenario for a demo (or download to look at or use). Adjust the gravity value, which is vertical acceleration, for the effect.
By Codec, with 5 replies.
Last reply by Codec, 15 days ago:
Thanks guys it worked.
By Sauravbasyalking12, with 2 replies.
Last reply by Sauravbasyalking12, 16 days ago:
Thank you so much kostya