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
actor suddenly freezes
By Steven.Z., with 1 reply.
Replied to by davmac, over 10 years ago:
I have seen this in the case that I leave the mouse cursor over the "run" button after clicking it. The button changes to pause, and when this happens, a tooltip appears for the pause button. At this exact moment the scenario stops responding to keypresses. The good news is that this only seems to happen once, and also that it looks like it's been fixed in our development codebase (but not in Greenfoot 2.4.1 unfortunately).
Error
By howdoesonecode, with 8 replies.
Last reply by davmac, over 10 years ago:
Ok, received, and yes, it was an obscure bug in the Greenfoot collision-checking code (it can only trigger when there is only a single actor in the world). Thanks. It will be fixed in the next release.
Installing Greenfoot on USB Stick
By rehan, with 1 reply.
Replied to by davmac, over 10 years ago:
You need to extract the downloaded zip file somewhere. You could extract it to your hard drive, but in that case it's better to use the proper Windows installer instead.
What is a heap space error
By BrownBoii333, with 2 replies.
Last reply by davmac, over 10 years ago:
I've gotten these before and most times they just go away after i switch computers. Is it just saying that it can't handle that amount of code or what?
It's saying that the
heap
is exhausted. The heap is used to store objects and arrays. In Greenfoot, the most common cause of this is that you have a too-large image in your scenario's images folder. Another way of causing it is by having a "memory leak" in your program, where you continuously create more objects and do not reclaim old objects. In Java programs this isn't so common, since the "garbage collection" process
Space invaders
By MrGigglez, with 1 reply.
Replied to by danpost, over 10 years ago:
Your ship has a rotation of zero, which makes it move left and right with 'move(-10);' and 'move(10);'. By setting the rotation of the bullet to that of the ship, the bullets will also move left and right when using the 'move' method. If you want to use the 'move' method to move an object upward, that object must have a rotation of '270'. This may or may not have the unfortunate result in having your bullets flying sideways depending on the image used for them. There are several ways to avoid this. Re-post if help is needed in this regard.
Code
By Express88, with 7 replies.
Last reply by danpost, over 10 years ago:
What method is the code from line 16 down in? Look like an undeclared block of code to me. Then, what two objects do you want removed at once?
Drag-able object stops being drag-able when another actor is brought in
By KiwiMC1482, with 2 replies.
Last reply by danpost, over 10 years ago:
What are the dimensions of the image that is set to the line object?
Getting a random number between 10.0 and 15.0 but with decimals?
By DiplomatikCow, with 5 replies.
Last reply by danpost, over 10 years ago:
The SmoothMover class probably has a 'public void move(double distance)' method, or something like that. If so, you can just do: <Code Omitted>
Added Levels of difficulty
By sh935wi, with 1 reply.
Replied to by danpost, over 10 years ago:
In what way is the difficulty to increase? Show what you have tried?
Putting another question
By MrGigglez, with 27 replies.
Last reply by danpost, over 10 years ago:
For the value of 'x' in line 34, you will need to add '2' instead of '1' or case 21 will never be used and nothing will show for case 1. As far as the fields in the Background class, lines 12 and 13 can be removed (not used anymore). Line 11 can also be removed; but, line 34 will need to be adjusted to this: <Code Omitted>As I do not know what 'var' (line 14) is for, I cannot say whether you need it or not.
Score on Game over screen
By gamer98, with 1 reply.
Replied to by danpost, over 10 years ago:
There are multiple discussion threads dealing exactly with this issue. Usually, it is the case that they have something like this; <Code Omitted>and do not realize that they can split the line up to this: <Code Omitted>By doing this, they can then proceed to call methods on the new game over world. For example:
Setting a Firing delay
By howdoesonecode, with 6 replies.
Last reply by danpost, over 10 years ago:
howdoesonecode wrote...
my only problem now is getting a bullet to delete after it has intersected an enemy ive tried like a hundred different ways and nothing works any ideas?
Show what you have tried.
Greenfoot Opens but doesnt show classes
By MrGigglez, with 5 replies.
Last reply by MrGigglez, over 10 years ago:
I fixed it ! Thank you
Bounce an Object off of walls, but not so easy?
By DiplomatikCow, with 3 replies.
Last reply by DiplomatikCow, over 10 years ago:
Thanks :)
Speed change
By MrGigglez, with 1 reply.
Replied to by danpost, over 10 years ago:
This should be a continuation of your other discussion post -- not a new one.
603
604
605
606
607
608
609
X