This site requires JavaScript, please enable it in your browser!
Greenfoot
Username
Password
Remember Me?
Sign Up, Lost Password
Activity
About
Documentation
Download
Discuss
Scenarios
Discussions
You need to login to take part
Current Discussions
How to make greenfoot project in visual code?
By won0c, with no replies.
Please tell me if there is a way to create a greenfoot project in visual code?
do Transparent pixels count toward the isTouching method?
By SharpShaBoom, with 1 reply.
Replied to by nccb, about 1 year ago:
Yes. Greenfoot's built-in collision detection uses bounding boxes for collision detection, so it doesn't care if the pixels are filled or transparent. You may be interested in
this pixel-based collision detection scenario
, which has code you could use for colliding based on transparent/non-transparent pixels.
How to upload game? Share button is missing
By hepingfandian, with 2 replies.
Last reply by danpost, about 1 year ago:
hepingfandian wrote...
When I click the button on the top-right. it goes to twitter
Not the button on the site -- the button in your Greenfoot application. Load the scenario, then click the button at top-right of window (should say "Share").
Next LEVEL
By kenNXstar, with 2 replies.
Last reply by danpost, about 1 year ago:
kenNXstar wrote...
I've been trying to get my game to transition into level2. But it won't I've tried adjusting my code but nothing works. The actor picks up 5 scrolls after that level1 is completed and should move into level 2. CODE BELOW << Code Omitted >>
Why are you checking for
more than
5 scrolls picked up, if only picking up 5?
i got a code that makes it animate but i already got the mirrord images but how to code it in that when i go left that image player_0 shows instead of player 0 and olso whit 0 1 2 3 4 5
By bonamin, with 1 reply.
Replied to by danpost, about 1 year ago:
bonamin wrote...
i got a code that makes it animate but i already got the mirrord images but how to code it in that when i go left that image player_0 shows instead of player 0 and olso whit 0 1 2 3 4 5 << Code Omitted >>
You have yet to initialize the second set of images.
slow down the walking animation
By Tenn0, with 1 reply.
Replied to by danpost, about 1 year ago:
Tenn0 wrote...
i dont know how to slow down the walking animation of my "Player" character << Code Omitted >>
You cannot slow the animation by delaying the initializing of the animation images. You will need an extra counter to count act steps between image changes. You will also need to keep track of the last direction moved so this new counter can be set properly to change the image immediately when the direction does change. First, however, you should note that with your current code, some unwanted behavior will occur. Imagine, if both "a" and "left" are down, the speed double
Help identifying another objects image
By Player2IsHere, with 2 replies.
Last reply by Player2IsHere, about 1 year ago:
Thanks!
help inverting a players movement keys
By Lonelyf60, with 2 replies.
Last reply by danpost, about 1 year ago:
Lonelyf60 wrote...
i figured out how to invert the movement but now the player moves WAY too fast while inverted
Inverting should not change the speed -- it should change the direction:
Making a Asteroids Game (help needed, 2).
By yesineedhelp, with 1 reply.
Replied to by danpost, about 1 year ago:
yesineedhelp wrote...
if "a" is pressed, it creates ForceField; however, it does not follow the Rocket. I know for sure I have to use getX() and getY(), but I'm not sure where to put it.
Since the
ForceField
objects created belong to the
Rocket
objects that create them, maybe the
ForceField
class should be inside the
Rocket
class. Either way, the
ForceField
object created by a
Rocket
object should be referenced in the
Rocket
class and controlled by the
Rocket
object it belongs to.
Another problem is then how long the Roc
Parallax Scrolling
By kenNXstar, with 3 replies.
Last reply by kenNXstar, about 1 year ago:
@danpost I took the setPaintOrder method and ended up putting everything in order. The speed on everything is super choppy. This trying to figure out how that out.
Good afternoon, I have some problem with my code. Stone should disappear when the relocation is equals to 3. But it's triggering an eror. Can you please help me?
By Ondřej, with 5 replies.
Last reply by nccb, about 1 year ago:
You're right, danpost, I hadn't spotted that colision can also remove the object.
Hilfe bei der While-Schleife
By Emalylya, with 1 reply.
Replied to by Super_Hippo, about 1 year ago:
Ja, Ausrufezeichen werden zur Verneinung eingesetzt.
help having projectiles act how i want
By Lonelyf60, with 1 reply.
Replied to by danpost, about 1 year ago:
Lonelyf60 wrote...
i want to have them move a certain range before exploading and i want them to shoot in the direction of the mouse while also having a 30 second delay ty in advance for the help heres my code: << Code Omitted >>
Where does the 30-second delay come in? When does it start? What, if anything, happens during the delay? And what happens when the 30 seconds is up? There are two things about the code provided that should be noted. One is your loose use of the
getWorld
method throughout the class. Once: the line <Code Omitted>
Making a Asteroids Game (help needed).
By yesineedhelp, with 4 replies.
Last reply by yesineedhelp, about 1 year ago:
Thank you, it works. I guess I was thinking wrong.
Change the color of a pixel
By Verdreht135, with 3 replies.
Last reply by danpost, about 1 year ago:
Verdreht135 wrote...
When i try to put "GreenfootImage image= getImage () into Myworld it says i have to declar a new method.
In a World subclass, you would use: <Code Omitted>
11
12
13
14
15
16
17
X