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
Idea for Project
By Mrfl1mflam, with 2 replies.
Last reply by PhilipsManor, 1 day ago:
I suppose I have a magnificent idea, young lad! You should use English, British (The most superior language :D ), Australian, Japanese, and Mandarin for thou project. If you don't want to be instructed by thou sweet mother to eat porridge colder than dear Goldilocks ever did, you shall follow my guidance. I have bestowed upon thee the most finest and most noble tongues to ever grace the realm of speech.
Roboterworld does not work.
By Kudo1507, with 1 reply.
Replied to by Kudo1507, 2 days ago:
Hey, my idea for my roboter is that he loses energy if she moves but for some reason she says that she does not have any energy left after just one move but she keeps moving and the "Laderoboter" does not help her. He is supposed to go up to her and charge her but he does not do anything unless Robita is on his field. Here is her coding thing: public class Robita extends Roboter { /** * Globale Variablen (= Attribute) */ int energie; int maxEnergie ; //Start mit vollem Akku int batteryLevel = 10000; long geburtsZeitpunkt; char geschlecht;
HTML 5?
By InaKurateGames, with 1 reply.
Replied to by danpost, 3 days ago:
InaKurateGames wrote...
My game isn't translating to HTML 5. How do I do that? (I'm using Java if that even matters)
Here are some restrictions you may not be aware of: * don't use "java.awt" of any kind * don't use "javax.swing" of any kind * reference all sound and image files in the "sounds" and "images" folders of your scenario folder without pathnames (just the file name)
Why is my game not translating to HTML 5
By Ohyeahhbh, with 3 replies.
Last reply by InaKurateGames, 3 days ago:
I also have the same issue, but where is the StartButton class? Im using Java if that matters
How do i show the actors
By Mahdir2111, with 3 replies.
Last reply by danpost, 19 days ago:
Mahdir2111 wrote...
I mean to show the actors on the world
Use the
World
instance method called
addObject
: <Code Omitted>To understand better, its documentation is
here
.
How do i export my scenario as a jar file
By Mahdir2111, with 10 replies.
Last reply by Mahdir2111, 19 days ago:
Is there a way to do it manually
Creating documentation
By iordanissavgm, with 6 replies.
Last reply by iordanissavgm, 22 days ago:
I use the greek locale on my pc, if that matters. But even if i added a dot in the GifImage english code comments, the issue remains. Maybe a bug fix should be on its way.
GreenfootSound not acknowledging getVolume/setVolume?
By Bennylit, with 2 replies.
Last reply by danpost, 23 days ago:
Bennylit wrote...
I have a music track I want to fade out, and I thought I could accomplish this by using this code: << Code Omitted >> As you can see, it should slowly decrease the volume in intervals of 10. ... When I check the volume before and after it runs this code, it's the same.
There is a coding issue here. You programmed the "fade" in a single
for
loop without any time constraints. In other words, the loop will complete its task in a single act step. Regardless of what it actually does, it will not take any time in doing it. You need an
if
statement where t
how do I program bubbles shooting
By yumyumlover69, with 1 reply.
Replied to by danpost, 26 days ago:
yumyumlover69 wrote...
I want to shoot bubbles out of my Bubblegun, but i don't know how I need to program that
I would start with this:
how do I make score show up on the game?
By radu_edi, with 10 replies.
Last reply by radu_edi, about 1 month ago:
Thank you for the help, it worked! I multiplied the score with getIntersectingObjects(Class).size() like this: <Code Omitted>
Access to variables of other classes
By Jder2te, with 1 reply.
Replied to by danpost, about 1 month ago:
Jder2te wrote...
I need to access a variable from another class. this works for one of them, but for some reason the second variable is not changing. << Code Omitted >> That is the second variable with does not work, << Code Omitted >> in this example the method does work. did I make a syntax mistake or something ?
Very confusing as far as which one worked and which one didn't. I hope you are not expecting the collision variable to update when all you did was move this actor. You performed no collision checking between the setting of the actors location and the testing of the co
VERY COMPLICATED - Loading Zones somehow losing references to final variables?!
By Bennylit, with 16 replies.
Last reply by Bennylit, about 1 month ago:
I have found the problem, and for documentation purposes, I will share what I did to fix it. The problem was that when creating the rooms, even though they were final, some rooms were created before others. For example, this was the code for creating the final static rooms: <Code Omitted>You might notic
Uneaven hitboxes (very desperate)
By Jder2te, with 22 replies.
Last reply by Bennylit, about 1 month ago:
Of course. If you need further assistance, we'll be here.
Checking the Solution for a Picross Game
By magentaink, with 16 replies.
Last reply by danpost, about 1 month ago:
magentaink wrote...
I'm struggling to visualise how two 2D arrays in a 3D array would work for it?
Each 2D array in the 3D array is a solution with increasing difficulties. I only combined what you already had to simplify things.
just to double check, the indexes on the solutions array are row, column, solution right? I didn't think it would make that much of a difference since the clues essentially mean the same thing as the solution but I suppose the way it's stored and used does make the difference. How would an array representing my clues look so it doesn't turn out look
Greenfoot.ask() window doesn't close on web
By sthompson, with 5 replies.
Last reply by danpost, about 2 months ago:
sthompson wrote...
Changing the act() code to call getKey() once and then use that key to decide what to do fixed the issue, though (I think using isKeyPressed() in act() was resulting in multiple text boxes opening on top of each other in web, whereas in Greenfoot the textbox opening pauses the program.
Still each string comparison should be accompanied with a check to ensure that the string returned is for the question asked. That is
1
2
3
4
X