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
Shooting at regular intervals
By massivassl, with 4 replies.
Last reply by massivassl, over 7 years ago:
thanks a bunch
Image Switch frequency
By Pjagadish, with 2 replies.
Last reply by Pjagadish, over 7 years ago:
That's pretty cool. Thanks!
Stopping music
By SuperNinja, with 5 replies.
Last reply by SuperNinja, over 7 years ago:
Thank you so much! Worked beautifully. P.S. Super appreciative for all the help you've given me and everyone else on this site
ArrayList Help
By doglover555, with 5 replies.
Last reply by danpost, over 7 years ago:
Okay -- your lists will never contain the same things. The reason being is that you create and add items to one list (in the PackingList class), then, you acquire the other list by using 'getIntersectingObjects' (in the Mannequin class). These lists may contain similar type items, but they will not be the same items (a Tank actor in one list is not the same Tank actor in the other list). Probably best is to create one of each item to start with. Save a reference to each and add a getter method for each. Then the world can get and add each into itself and the PackingList class can add thei
How do I get an actor to slow down when it hits another actor?
By rory, with 1 reply.
Replied to by danpost, over 7 years ago:
You cannot change a hard-coded value (which you currently are using for the speed of the sheep). The value for the speed (currently '2' everywhere for the sheep) needs to be replaced by a variable (a value that can be changed). That variable needs to be maintained by using a field. You will also need a timer field to track the time remaining that the sheep is to run at slow speed.
Making my first game!
By agray11202, with 2 replies.
Last reply by danpost, over 7 years ago:
agray11202 wrote...
How do I make the actors in my class randomly pop up?
Let your world control that through its act method.
Is it possible for one actor to call another actor to appear in the game?
If you mean create another actor and add it into the world -- no problem: <Code Omitted>
Is it possible to put all of the ingredients I have touched into an if/then statement? (like if one actor has touched a specific amount of other actors do..., else...)
It is possible to track whi
text
By doglover555, with 1 reply.
Replied to by danpost, over 7 years ago:
doglover555 wrote...
what would I put in the place of LIGHT_GRAY
You would replace 'Color.LIGHT_GRAY' with 'new Color(0, 0, 0, 0)'.
Proximity Detecting
By CavemanWrath, with 3 replies.
Last reply by danpost, over 7 years ago:
CavemanWrath wrote...
How exactly would I use those? What parameters are required?
Make use of the
API documentation
.
Java 9 - Installer crash
By Forj4K, with 1 reply.
Replied to by davmac, over 7 years ago:
There is no way to make the current version of Greenfoot run with Java 9. The current development version of Greenfoot isn't publicly available and isn't in a usable state. However, the page you link to has a workaround that sounds like it should work with Java 8:
I figured out a workaround for the problem. In short: Start the JVM with the parameter -Dsun.java2d.xrender=false. With that option, I didn't see the problem anymore.
Greenfoot runs as two separate JVM instances, and to add that parameter to the correct one you need to identify which instance the err
Background Music
By SuperNinja, with 2 replies.
Last reply by SuperNinja, over 7 years ago:
Thank you I appreciate that, didn't know about the sound folder!
Help with vector movement
By HelpMe123, with 3 replies.
Last reply by danpost, over 7 years ago:
The class java.util.Vector is not a (double rotation, double magnitude) type vector class. If you look at the documentation of the class, it extends the java.util.AbstractList class and creates an object that that is a collection (meaning elements -- objects -- can be added to it to create that collection. It has nothing to do with direction and force.
Pausing the world
By IReallySuckAtGreenfoot, with 1 reply.
Replied to by IReallySuckAtGreenfoot, over 7 years ago:
I have resolved the issue. I'll post the code just in case anyone needs this later. My world:
need Help!
By kris10wb@gmail.com, with no replies.
I already searched a code on how can i make a background move. my problem is, in a space game, there's this random asteroids coming from the right edge then the rocket will shoot it and when i reached the corresponding score , a planet will appear. can anyone atleast help me? do you know some code regarding to this instances? thank you.
Problems with 's' and 'e' keys.
By MrHare, with 7 replies.
Last reply by MrHare, over 7 years ago:
If anyone else using a Mac has this problem, the fix is to open your Terminal and type: defaults write -g ApplePressAndHoldEnabled -bool false For some reason it is not an option in System Preferences .
Changing from world to world by clicking a button
By ThorneC, with 1 reply.
Replied to by danpost, over 7 years ago:
The greenfoot.Greenfoot class has the methods you will need both for checking on click on an actor and for changing worlds. Check out the documentation on the class.
307
308
309
310
311
312
313
X