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
Printing symbols
By Roshan123, with 27 replies.
Last reply by danpost, over 5 years ago:
Roshan123 wrote...
But how to use /u2b07
Actually, it should be a backslash, as "\u2b07" or "\u2193". Use in quotes as shown to include the represented character within a string. So: <Code Omitted>
How do i make a random number?
By TheGenericDeveloper, with 3 replies.
Last reply by TheGenericDeveloper, over 5 years ago:
Thanks!
Problem with linking worlds via buttons
By Conkorde, with 2 replies.
Last reply by Conkorde, over 5 years ago:
Wow, thanks danpost! I have to complete this project for school tomorrow, so I was kinda worried you wouldn't respond. Thanks for saving my day!
Purpose of Font class / how to print non-bold text online
By RcCookie, with 1 reply.
Replied to by danpost, over 5 years ago:
RcCookie wrote...
What exactly is actually the purpose of the Greenfoot.Font class? You can’t actually format a text so that it prints with it, so what should it be used for?
The
GreenfootImage
class
drawString
method uses the set font to render its given text.
Snake Game Add Tail Question
By cjz19931031, with 10 replies.
Last reply by danpost, over 5 years ago:
When you create a new
LoseWorld
object, you create a
new
Snake
object. Of course its score is
0
. The
Snake
object that creates the
LoseWorld
object contains the score. Just pass it to the
LoseWorld
constructor.
Teleporting
By Programnoob207, with 3 replies.
Last reply by danpost, over 5 years ago:
Programnoob207 wrote...
Can you give me some more codes please? Btw, thanks for helping.
It might help if you go over what methods are available in the different classes provided by greenfoot. You can find them
here
. Start with the
World
and
Actor
classes (for now).
Having trouble with referencing actors because static/non-static issues
By Hissss, with 2 replies.
Last reply by Hissss, over 5 years ago:
I saw you in a bunch of other posts and want to thank you so much for the speedy reply! I have a major progress check due tomorrow and you saved my life! Thank you so much Mr. Danpost! I can't imagine how many other people you helped save and hope this message goes to heart because I'll likely be needing your help some more sometime in the future.
How to remove/add an actor from a different world
By Greenhorn4747, with 5 replies.
Last reply by danpost, over 5 years ago:
Greenhorn4747 wrote...
I never got the addObject to work it always gave either the "cannot find symbol - variable ..." error or if I put .class after the actor, the "java.lang... cannot be converted to greenfoot actor.
So, either you had a faulty reference to an actor or a reference to something that was not an actor at all. A class of type
Actor
or sub-type of
Actor
is not an
Actor
instance.
I thought the world a=inkomthi, would make count for inkomthi
Need help with a rocket game
By KevinGV, with 1 reply.
Replied to by danpost, over 5 years ago:
KevinGV wrote...
(I want to slow down my rocket, how can I do that? Like when i press "s" the rocket slows down or stops
Show your current Rocket class codes.
Creating a game but counter keeps breaking
By OpticalFlow, with 6 replies.
Last reply by danpost, over 5 years ago:
OpticalFlow wrote...
I changed the ifs so they were the same and their hitbox appears to be smaller. But the worlds do not save when I go in between them does this have something to do with Greenfoot.setWorld(new Outside());?
Correct. You will need to keep a valid reference to any world that you wish to return to if you want it to be exactly as you left it. You could adjust the score in the world proceeding to when changing worlds. Sidenote: I would not have thought the hit box size would be changed.
Scenario not working on Greenfoot site
By mrjswaine, with 2 replies.
Last reply by RcCookie, over 5 years ago:
I lately had the same problem, and for me it was caused by running a later version of the jdk. It is fine in the application but the JavaScript conversion doesn’t seem to work. Try to reinstall Greenfoot, or download the zip and replace the jdk folder in your Greenfoot installation with the one from the zip. Finally, make sure to delete all the class files and use the recompile option from one of the drop down menus because sometimes Java ain’t recompile everything automatically and just show an error.
Maximum values
By Hellotheremyfriend, with 5 replies.
Last reply by Hellotheremyfriend, over 5 years ago:
Thanks bro, I appreciate it alot
GameOver
By NewbJava, with 18 replies.
Last reply by NewbJava, over 5 years ago:
danpost wrote...
Remove line 68 from the
Rocket
class (the "stop" line).
Yes it works now thank you for your help.
Wondering how to remove objects from other classes
By Duck12, with 6 replies.
Last reply by Duck12, over 5 years ago:
never mind it works Thank you so much!
Deny CheckKeypress()/isKeyDown() and Force a move()
By ksimuscb, with 1 reply.
Replied to by danpost, over 5 years ago:
If I am not mistaken, you want your coding in the following fomat: if inverting, invert else move and check collision
102
103
104
105
106
107
108
X