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
Counter Problem
By Wriggi, with 8 replies.
Last reply by Wriggi, almost 8 years ago:
Ok sorry, i have found my error now anyway. Thanks for the help
How to controll the time
By wueschn, with 2 replies.
Last reply by wueschn, almost 8 years ago:
Thanks a lot, it works!!
Moving Backgrounds - Question
By wueschn, with 3 replies.
Last reply by danpost, almost 8 years ago:
wueschn wrote...
there must be a situation when you see it wandering from right to left and seeing that the background image below is resting. But from beginning on it works perfekt and everything is wandering perfect without seeing something resting in the background ..... That is perfect, but it is not clear to me why it is so perfect ...
I am not sure what you mean by "
image below is resting
". If you want clarification on some point, you will have to be more specific, show all codes used for scrolling (other than the
Scroller
class itself (which should not be modified
howwe get greenfoot on laptop
By mayl2121, with 2 replies.
Last reply by Sean03, almost 8 years ago:
here is windows download
link
here is mac download
link
Keep on getting error
By Will5230, with 3 replies.
Last reply by Will5230, almost 8 years ago:
That worked Thanks alot guys!!!
Anyone wanna make a game with me so i can submit it to class?
By IamSifter, with 4 replies.
Last reply by danpost, almost 8 years ago:
Super_Hippo wrote...
Games are the easiest way for a beginner to practice programming though. At least that's my opinion.
Yes, but one must first become familiar with the basics of the java language and what methods are available in the classes provided in the
greenfoot
package. Looking through the API documentation of the classes should help immensely in the latter, and the java tutorials should help with the former. Then trial and error programming will help in learning what is possible as well as how to accomplish things. This last part can be done while creating your game;
Counter not working
By ckeegan, with 1 reply.
Replied to by danpost, almost 8 years ago:
You create a
Car
object, but show a
cars
class. Cannot do anything about the counter until it is known what you are doing there. Remove
act();
from the
Level2
class constructor and then take the first 3 lines in
act
and move them to the
prepare
method.
question about scrolling
By aim_dll, with 1 reply.
Replied to by danpost, almost 8 years ago:
aim_dll wrote...
I want my screen to automatically scroll into the according direction when I hover my mouse over the bottum/top/right/left.
Please refer to my
Scrolling Tutorial
scenario. It does not specifically cover mouse-at-edge action, but other than that, it will not be any different.
Contact during the whole time if object1 via object2
By Bolla13, with 1 reply.
Replied to by danpost, almost 8 years ago:
Bolla13 wrote...
I want whoever a lobster sees a crab to only get one life ripped off. The problem is that the crab "crawls" over the lobster and has about 5 times contact = lifetime is deducted.
Your solution might work (with some minor adjustments) if not for two issues. The first one is that you probably have multiple lobsters in the world. A boolean field like
hits
would only detect (a) crab intersect any, but unknown, lobster; or (b) crab not touching any at all. That is, it does not track which lobster is intersecting. So, if a 2nd one touches while one is already inte
Hide cursor in Greenfoot 3.5.0 onwards
By AlexDascalu, with no replies.
I am trying to update the code for a Greenfoot game I made so that the mouse cursor is hidden. In previous version I manage to do that with some Swing code but since 3.5.0 switched from Swing to JavaFX that code no longer works. I know how to set the cursor if I have a reference to the JavaFX Scene, and I have found in the source code the GreenfootStage class which extends Stage, but I can not find a way to access the GreenfootStage of the game. Can anyone please help me?
How to respawn an object(s)
By jonah420123, with 3 replies.
Last reply by ErnieBoi, almost 8 years ago:
danpost wrote...
jonah420123 wrote...
I have coded the button to disappear on touch but I cant figure out how to make the coins spawn in when the button disappears. I don't know what code to show so if you need any just let me know.
Show any and all codes related to the button. Also include any attempt to spawn the coins when the button disappears or provide what ideas you might have for implementing it.
I am th fan of yours i am ernie you are great greenfoot man yes yes
How to hide actors in the left pane
By AlexDascalu, with no replies.
Hello! I have made a game in Greenfoot that is intended to be used for educational purposes, and I am trying to find a way to hide some of the actors of my game from showing up in the left pane of Greenfoot, so as to make the game less intimidating to a pupil. I could not find anything like that in the API or on the Internet. Does anyone know if there is a way to do that?
yahtzee code
By BlueberryGaming, with 1 reply.
Replied to by danpost, almost 8 years ago:
BlueberryGaming wrote...
i am trying to figure out in a case statement/switch statement how to make large straight and small straight we have the die value named as die Value and roll total
Use an array for the individual die values: <Code Omitted>then sort them in ascending order and iterate thru them to find the straights:
Cant find symbol (variable disk)
By jonah420123, with 1 reply.
Replied to by danpost, almost 8 years ago:
jonah420123 wrote...
if(disk!=null) <------ says it "cannot find symbol" here as well ... arena.removeObject(disk); <------- says that it cannot find symbol here
Apparently, you have not initialized a variable called
disk
before trying to reference it: <Code Omitted>Once it is initialized, you will need an assignment statement: <Code Omitted>to possibly acquire a reference to a disk object. Then your
if
statement will have a chance to be
true
as well as
false
(provided your assignment may or may not actually a
how to reset a number??
By Toodumbtocode, with 1 reply.
Replied to by danpost, almost 8 years ago:
Toodumbtocode wrote...
like how do you reset a score after it gets to a certain number??? thank you
No code, no details -- No help. Always include related codes and specifics. The code should include some attempt at trying to accomplish what you are having difficulty with.
232
233
234
235
236
237
238
X