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
Sequence Statement Error
By Gaddiel, with 18 replies.
Last reply by Super_Hippo, over 9 years ago:
Sure: <Code Omitted>
Objects dn't spawn in a scrolling world
By TheBigBossJoshi, with 10 replies.
Last reply by TheBigBossJoshi, over 9 years ago:
Hello, unfortunately, my scenario is too large to upload. Can I email you a project file?
help?
By MLP, with no replies.
this is my code for cakes for age. it works for odd number but when it comes to even number is doesn't work. for (eg) if i put in 77 for the age there is no problem it unless if i key in 24 it doesn't work. please help? class MyClara extends Clara { /** * In the 'run()' function you can write your program for Clara */ void run() { int height; height = readInt ("How old is your grandmother?"); while (height > 77) height = readInt ("Enter a number Less than or = 77"); for (int width = 0; width < 21; width ++) { forward(); } turnLeft(); for (int hw = 0; hw < (height-height % 10) / 10 + 3; hw ++) { forward(); } turnLeft(); for (int width = 0; width < 21; width ++) { move(); } turnLeft(); for (int hw = 0; hw < (height - height % 10) /10 +2; hw ++) { backward(); } turnLeft(); move(); int h = 0; for (int hw = 0; hw < ((height -(height % 10)) / 10); hw ++) { for (int l = 0; l < 10; l++) { putLeaf(); move(); move(); } if (h == 0) { running(); h = 1; } else { walking(); h = 0; } } for (int i = 0; i < (11 - height % 10); i ++) { move(); } for ( int i = 0; i < height % 10; i ++) { putLeaf(); move(); move(); } } void forward() { putLeaf(); move(); } void backward() { move(); putLeaf(); } void running() { turnLeft(); move(); turnLeft(); move(); } void walking() { turnRight(); move(); turnRight(); move(); } }
Greenfoot not compiling
By Pink_Piranha, with 9 replies.
Last reply by davmac, over 9 years ago:
Camyh15, this discussion is literally 5 years old. Please don't re-open ancient discussions; start a new one if necessary.
play and stop buttons for jukebox project
By Alucard, with 2 replies.
Last reply by danpost, over 9 years ago:
Maybe you should have a 'public static Button playButton;' field and when the appropriate value (-1) is passed to the constructor, have the field set to 'this' object being created. Also, a 'public static' array of the "play" and "pause" images might help for later comparisons so the individual song buttons can do what needs to be done with it at the appropriate times (to check which image the playButton is currently showing and act accordingly).
Making a Memory Game
By carter, with 46 replies.
Last reply by carter, over 9 years ago:
danpost, thank you so much for all your help. I wouldn't even be close to being done if it wasn't for your help. I turned the project in and will keep you posted about the grade I get (if you would like). :)
bad operand types for binary operator
By divinity, with 3 replies.
Last reply by danpost, over 9 years ago:
The gross_salary field used on line 40 is never assigned any value. The overtime variable is not used after assigned a value at line 36. The hrs field is only assign a new value (default is zero) if the hours worked was exactly 40. A consequence of this might show some other issues. Let us say that the first employee worked exactly 40 hours and the hrs field is assigned its proper value. Then the next employee, who did not work 40 hours, will not re-assign a new value to the field. The value will remain what it was for the first employee. Certainly, this cannot be what you would want.
Balloon-Popping Game
By IronRod, with 40 replies.
Last reply by IronRod, over 9 years ago:
Thank you so much @danpost, I really do appreciate all the advice you have given. My game works fine now. ;)
Out Of Memory error on compile
By trimil, with 5 replies.
Last reply by trimil, over 9 years ago:
Nah, I like using the reflect classes.
moving actor one given location and go to another
By NIRO17, with 21 replies.
Last reply by danpost, over 9 years ago:
NIRO17 wrote...
danpost, have you heard about multi agent technoly in Ai? can we use greenfoot gaming platform to develop a multi agent simiulator? can we apply JADE or MadKit like libaries to work with greenfoot?
You can use greenfoot to do pretty much anything you can do outside of greenfoot. The documentation for native libraries is
here.
Scrolling world
By GB309, with 50 replies.
Last reply by danpost, over 9 years ago:
GB309 wrote...
THANKS
danpost wrote...
... (code acquiring x-coordinate value shown here). < Code Omitted >
Wow -- did I do that??? More simply coded would be this for the third line: <Code Omitted>
multi agent with greenfoot
By NIRO17, with no replies.
have you heard about multi agent technoly in Ai? can we use greenfoot gaming platform to develop a multi agent simiulator? can we apply JADE or MadKit like libaries to work with greenfoot?
how do you make an object be removed and start game all over again when touching another object?
By LEmaestro, with 1 reply.
Replied to by Super_Hippo, over 9 years ago:
<Code Omitted>
Object don't spawn in scrolling world
By TheBigBossJoshi, with no replies.
Hi! I am working on a project, but I have hit a bump in the road. I have created a scrolling world, but nothing other than my Platform and Wall classes spawn past the first screen. I have spent way too long on this, and I need help. Here is my world class and my scrolling classes. WORLD: <Code Omitted> WORLD SCROLL (ACTOR) <Code Omitted> OBJECT SCROLL (ACTOR) <Code Omitted> What am I doing wrong?!
multi agent
By rosh11, with no replies.
how can I add multi agent to my greenfoot project?
468
469
470
471
472
473
474
X