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
Greenfoot calling an array
By kayuhnjayuhn, with 3 replies.
Last reply by danpost, over 11 years ago:
If you are using the Animal class 'canSee' method, then: <Code Omitted>should check for all cars.
Installation questions
By AlbrechtMehl, with 4 replies.
Last reply by ionel.maftei, over 11 years ago:
I want to install JDk 1.6 for greenfoot. Help me!
Codes for making a Scorecounter
By Neymar.Jr, with 23 replies.
Last reply by danpost, over 11 years ago:
I do not see where you are calling that from the Level subclass.
Class not recognizing another actor
By Daringa, with no replies.
Its a maze game that uses an actor as the walls so it can be reset upon touching the Actor, except it doesn't recognize the actor <Code Omitted>Thanks, Dar
Background Sound
By BD289, with 3 replies.
Last reply by BD289, over 11 years ago:
Neymar.Jr wrote...
Do you men since you made the Menu the background music doesn't stop or pause now???
??????
Null Pointer Exception Issue
By Tommy99, with 1 reply.
Replied to by davmac, over 11 years ago:
Please
use code tags
when you post your code, so that we can refer to the code by line number and copy/paste it easily. You're getting a NullPointerException on this line in the Home class: <Code Omitted> The reason is, you are calling 'getWorld()' before the object has been added into the world; it therefore returns null, and when you then call getWidth() this gives an exception. You need to postpone calling getWorld().getWidth() until after the object has been added t
help with random spawn
By nc-munk, with no replies.
I am making a game for a school project. I need help a random spawn function it is should spawn an asteroid in top for the screen and move down and i cant make them spawn and move my code look in line 27 to 42<Code Omitted>
enemy not spawning
By GamesGrinder1998, with 1 reply.
Replied to by GamesGrinder1998, over 11 years ago:
the code doesn't seem to work for here...
slow game
By poon, with no replies.
Hello i'm making a game for my object oriented programming class , i have a world with a scroll based on a project named "Scrolling Man" . that´s the code for the scroll : public void scroll(int cX, int cY) { x = x +cX; y = y +cY; getBackground().drawImage(Background,x, y); } the method is called when an arrow is pressed and it works, but i have a problem. the method makes very slow my game, i tried to reduce the size of the background but that no solves the problem, i removed the method call, and the game have not more lag. Please help me, how can i make the scroll without lag???
Help for Bomb Power-UP
By Neymar.Jr, with 39 replies.
Last reply by danpost, over 11 years ago:
On line 13, you have to use this: <Code Omitted>as line 11 causes 'getWorld' to return a 'null' value.
How to avoid adding objects on top of others
By gamer121, with 1 reply.
Replied to by danpost, over 11 years ago:
Replace the last two lines of code posted with this: <Code Omitted>
Removing Bomb and Bad when they intersect
By akilino, with 9 replies.
Last reply by akilino, over 11 years ago:
davmac wrote...
Please, use code tags when you post code. I gave a link explaining how to do this earlier. It makes it so much easier to point out parts of your code (discuss the line numbers) and also to copy-and-paste your code.
Sorry davmac, I thought that what you wanted to say with that, to understand better the code, was the comment. Now I noticed that it is to present the code in a better way to understand. My apologies.
Adding multiple objects to the world after an intersection
By gamer121, with 1 reply.
Replied to by bourne, over 11 years ago:
Use a loop like the following: <Code Omitted>
Enemies code not working
By GamesGrinder1998, with 6 replies.
Last reply by erdelf, over 11 years ago:
did u even change something `? this should work line 68-71 <Code Omitted>
Variables keeping track of values
By gamer121, with 28 replies.
Last reply by gamer121, over 11 years ago:
Nevermind, I finally got it to work! Thanks for all of your time and help. I really appreciate it!
691
692
693
694
695
696
697
X