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
Don't get subclasses
By Psychpsyo, with 5 replies.
Last reply by davmac, over 9 years ago:
danpost wrote...
@davmac, should not your first line read: List<Apple> l = getObjects(
Apple.class
); ?
Yes, that's correct, sorry.
JTextField
By Luc_Stoffer, with 1 reply.
Replied to by danpost, over 9 years ago:
Luc_Stoffer wrote...
Hello everybody Does everyone know, if there is any alternative for JTextField with the same abilities just for numbers?
You can turn the numbers into text easily enough. But, maybe you are not explaining in detail enough for us to understand the real issue you are having. First, explain what you are trying to do. Then show what you have tried (include some code example). Then we can understand better what you want and can, hopefully, give you some advise, pointers, or whatever, to help fix the issue.
Inventory
By Freekywill, with 9 replies.
Last reply by lordhershey, over 9 years ago:
There are a few inventory scenarios floating around that may have shared the source.
code for pause world
By loxtn10, with 24 replies.
Last reply by loxtn10, over 9 years ago:
I started the project knowing only few things. I didnt know such tricks tp simplify my ideas. You see I learn overtime. Tip noted though. Thanks ! Cx
Trying to make the Shark chase the Crab & You Win Sign
By SkyCodes99, with 1 reply.
Replied to by danpost, over 9 years ago:
SkyCodes99 wrote...
I would like to get the shark character in my game to be smarter and actually chase the Crab.
What have you tried as far a this? If nothing, what information do you think the shark would need to accomplish this? and, what steps do you think would be involved?
Also, I would like to have a "You Win" appear after the Crab has eaten all the Worm Charcters in the game.
If the Crab has eaten all the worms, then no worms would be left in the world. Add an act method in your CrabWorld class. Have it check to see if no worms are in the world, and if so, sh
Adding a scoreboard
By LonelyCreeper, with 16 replies.
Last reply by NAMYA0303, over 9 years ago:
needs compiling
By loxtn10, with 6 replies.
Last reply by danpost, over 9 years ago:
loxtn10 wrote...
this
image
I already did, but still it doesn't work. :((
Sorry, I should have realized the code was in the Scene world class by the use of 'removeObject' and 'getObjects' without 'getWorld().' before them. See your other discussion thread.
debug need (general topic)
By loxtn10, with 2 replies.
Last reply by loxtn10, over 9 years ago:
kindly delete this discussion thanks...
need help for my school project
By Dayuyu, with 24 replies.
Last reply by danpost, over 9 years ago:
Be aware that GreenfootImage objects (as with any java.awt.Image object) is rectangular and that there may be some transparent area to any side of the visible image. These areas are still part of the image and are included during standard collision detection methods. In other words, one image is considered touching another when the images touch, regardless of whether a touching area is transparent or not. This is most likely the source of your problem here. I have created a scenario that will automatically reduce the size of an image to remove any and all excess transparencies that can be
Bug report: "Needs compile" not going away
By ellen.spertus@gmail.com, with 9 replies.
Last reply by loxtn10, over 9 years ago:
I also encounter this, this shouldn't happen the deadline of the project game is coming near, help me please
What are the steps to coding/making an "extra ammo" collectable thing so that when the character gets it, the ammo becomes full again?
By Dudimus, with 1 reply.
Replied to by danpost, over 9 years ago:
Just create a class for the "powerup" and have the Chased object "look" for it and when one is found (a) remove it from the world and (b) replenish the ammo (maximize the value of the 'ammo' field. How (when, where, and limitations) these "powerup" objects are placed into the world depends on your desires.
spawning at the beginning of the game
By HarleyQuinn, with 1 reply.
Replied to by danpost, over 9 years ago:
HarleyQuinn wrote...
I'm trying to make items randomly spawn at the beginning of the game, does anyone know how to do it?
You might take some hints from my
XWorld XActor Classes
scenario. There are methods in the XWorld class that might be of interest that help in placing objects in a world.
How to resize animated gifs?
By Laurence, with 14 replies.
Last reply by Laurence, over 9 years ago:
<Code Omitted>
With the code now like this, it works relatively well except one small issue. Despite the still-image being the exact size a
Help to show score at end of the game
By BEASTYLAD, with 6 replies.
Last reply by BEASTYLAD, over 9 years ago:
Thank you very much, i understand now when i think of it in the same way that the shot was complete. Thank you again.
updated Kinect instructions for Mac OS X
By dangjavageek, with 3 replies.
Last reply by dexpot, over 9 years ago:
pendragon wrote...
Following these steps, I get all the way to make and sudo make install and get this error message: clang: error: no such file or directory: '/opt/local/lib/libboost_thread-mt.a' clang: error: no such file or directory: '/opt/local/lib/libboost_atomic-mt.a'
You might need to attach -no_static: <Code Omitted>
445
446
447
448
449
450
451
X