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
A better alternative to getOneAtOffset?
By Dudesame, with 2 replies.
Last reply by Dudesame, over 9 years ago:
Works like a miracle, thank you.
Simple Threading in Greenfoot
By MrBradley, with 4 replies.
Last reply by Super_Hippo, over 9 years ago:
I wish my teacher had any knowledge about programing when he introduced GF to us... It looks like you know what you are doing and hopefully your students can follow your thoughts. Usually you will get an answer like "Greenfoot is not thread-safe" from the GF team. Since I am not really into this, I can't tell you what you can do against this... GF is for beginners and that's why it gives you an environment without the need of using complicated java things. When I tried porting GF scenarios to android using Droidfoot, I had to use eclipse and I didn't have a clue about anything. I probably wou
When keypress not after keypress?
By Sylva, with 3 replies.
Last reply by Sylva, over 9 years ago:
Thanks for the help danpost. It works and feels much better now :D.
get one intersecting object confused me
By lookaround, with 10 replies.
Last reply by Super_Hippo, over 9 years ago:
There are actually a lot of methods which do that already. And I think they added it with the new API (even though I am not sure). For example the getObjects method in World. It returns a List of the type you pass. So this one works without casting: <Code Omitted> However, it only works for methods which return a List, not for those which return one single object. So this line does not need a cast: <Code Omitted>but this one does:
Changing between a pistol and an rifle
By Dudesame, with 4 replies.
Last reply by Dudesame, over 9 years ago:
Ah ok. thank you for my help. here is the finished code for those wondering.
Battleship Game
By ironphoenix20, with 35 replies.
Last reply by danpost, over 9 years ago:
The source was not uploaded. And it seems to be running an infinite loop on World construction.
i want re use the button up,left,right,down for next level please help me
By dadansi, with 9 replies.
Last reply by Yehuda, over 9 years ago:
So if that's what you want to do then do it. danpost's code should be in the World that you want to host these arrows.
Spongebob Jumping game
By Bobby, with 3 replies.
Last reply by danpost, over 9 years ago:
When does it become gray? * when you compile (are the execution buttons grayed also)? * when you try to jump? * some other time? Be specific. However, it may be related to some code in your World subclass (which you have yet to post).
Clicking
By Venbha, with 3 replies.
Last reply by Venbha, over 9 years ago:
Venbha wrote...
Super_Hippo wrote...
<Code Omitted> <Code Omitted> Take that as an example. If you do it in your world, you will most likely have an array of keys and not just one key.
Thankyou i will try that
Mouse press add score without background
By SchoolStuff, with 1 reply.
Replied to by Venbha, over 9 years ago:
I dont know..
SchoolStuff wrote...
So we are making a game, kind of like piano tiles. We made a counter and if you click on the block it adds 1 point, but if you click on the background the same thing happens. The code we used is: This is in class counter. public void act() { setImage(new GreenfootImage("Score : " + score, 24, Color.BLACK, Color.WHITE)); if(Greenfoot.mouseClicked(null)){ addScore(); } } How can we avoid this problem.
ANSWERS
By wolfsinem, with no replies.
ARE THERE ANY ANSWERS OF ASSIGNMENT 7 DODO'S RACE
Timer, Counter, Scoreboard. Need help in my game
By FeVo, with 32 replies.
Last reply by Super_Hippo, over 9 years ago:
\n "This is\na test" = "This is a test"
How would you use greenfoot's drawLine?
By Katht99, with 2 replies.
Last reply by Katht99, over 9 years ago:
Oh okay thank you
How to move multiple actors
By BluRogue714, with 1 reply.
Replied to by danpost, over 9 years ago:
Maybe you could get some pointers from my
Space Invaders Movement Demo
scenario.
Exam Struggles, help Explaining
By Okiele1, with 1 reply.
Replied to by danpost, over 9 years ago:
'int' and 'String' are called 'type's. They signify what a variable is to hold. 'int' is a primitive type (see
here
) and 'String' is an Object reference type (see
here
).
337
338
339
340
341
342
343
X