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
Very basic question
By CodeTime, with 1 reply.
Replied to by danpost, over 7 years ago:
CodeTime wrote...
So I have some questions about code and how I could change it. (this came from the tutorial. << Code Omitted >> How would I change it if my world class is named "earth" for example?
It does not matter what your
World
subclass name is. All instances of subclasses of
World
are still
World
objects. So, the code need not be changed if you change the name of the
World
subclass. Now, although not necessary, you could be more specific as to what type world it actually is by changing line 2 to the following: <Code Omitted>This de
New Greenfoot Broke My Game (supposedly)
By trianburner, with 9 replies.
Last reply by nccb, over 7 years ago:
Hmmm I can't see a way that setLocation can remove the actor from the world, though. Sorry for all the hassle, but would you be willing to send us the scenario for us to try it out? This looks like a bug in Greenfoot as that exception shouldn't be thrown, but I'm struggling to see exactly how it happens at the moment. If you are happy to email the zipped scenario to support@greenfoot.org then we will take a look, fix anything on our end, and also advise you on a work-around.
Explode the Rocket
By Celesterra, with 10 replies.
Last reply by Celesterra, over 7 years ago:
It works now! All I had to do was change it to equal 4 instead of 5. Thank you all!
Implementation of Gifs
By Karsten, with 1 reply.
Replied to by danpost, over 7 years ago:
You will need to provide more code. The full class of the actor and possibly your World subclass as well.
Greenfoot Jar is not working
By leney, with 1 reply.
Replied to by nccb, over 7 years ago:
This may be an issue with Java version. If you are double-clicking the JAR in Windows, it will use whatever version of Java happens to be the primary version on your machine. If this is not Java 8 (especially if it's Java 9 or later), that won't currently work well with Greenfoot's exported JARs, which currently only work with Java 8 (until we update to Java 9+ in future). Best work-around is to use a batch file as you describe -- you can try changing which Java is associated with .jar files but it's probably more trouble than it's worth, especially if other applications on your system need
focusedProperty not updating
By JohnDoeWasTaken, with 1 reply.
Replied to by nccb, over 7 years ago:
This is a hack that we don't officially support... but having said that, the code looks like it should work. Technically you should add the focus listener on the JavaFX thread but I doubt that is the issue. If you run the exported program from the command line, do you see any exceptions in the console? Maybe add some System.out.println lines to check which parts of the code are reached.
Minor improvement to SmoothMover: rotation as double
By TheGoldenProof, with 1 reply.
Replied to by danpost, over 7 years ago:
My
QActor
class, which provides smooth moving by allowing fractional moving has fractional rotation as well. See my
Smooth Mover Demo
scenario.
Laser Limit
By Celesterra, with 14 replies.
Last reply by Celesterra, over 7 years ago:
Thank you very much!
I cannot get the wombat to shoot in the direction its facing. It only shoots to the right.
By Rawlfish, with 9 replies.
Last reply by Rawlfish, over 7 years ago:
Now I just need to get a life counter and make the leaves give the wombat health back.... lol
Help with excercise 9.73 from "Michael Kölling Introduciton to Greenfoot"
By MKO, with 1 reply.
Replied to by danpost, over 7 years ago:
You want to show a value that goes from 0 to 100 (a percent value) to indicate how recharged the proton wave firing state is. You probably would want to use a loading bar type object which will show the progress visually instead of using text. Please refer to my
Value Display Tutorial
scenario.
Help with actor movements
By fvila02, with 6 replies.
Last reply by fvila02, over 7 years ago:
Thank you so much that helped a lot i modified it a little bit and make it into 2 if statements and added some code and it works perfectly now! Thanks a lot for the help!
Hello, can anyone help with this error pls?
By Night, with 2 replies.
Last reply by Night, over 7 years ago:
thx :D
how can I add selected actor in another world?
By Tasya16, with 26 replies.
Last reply by Tasya16, over 7 years ago:
you are AWESOME
Greenfoot does NOT like it when you rotate the background image
By TheGoldenProof, with no replies.
i used some simple code to try to rotate the background by one degree every 60 frames: <Code Omitted> and this is what happened (photo taken after playing for some time) : <Image Omitted> I'm not here to complain... I just thought this was worth laughing at.
Collision not working after adding some shaking to the Actor
By lubna_1988, with 3 replies.
Last reply by danpost, over 7 years ago:
lubna_1988 wrote...
Regarding the initialOffset field, I did not get your point.
My point is the there is a one-to-one correlation between the value of the
initialOffset
field and what would be returned by using the
getRotation
method. Because this is the case here, you really do not need that field. You can just use the returned value from the method, either directly or in some simple expression, to get the value of what the field would contain.
193
194
195
196
197
198
199
X