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
Help with this Code!!
By tartags11, with 5 replies.
Last reply by tartags11, about 11 years ago:
Put this in your world: <Code Omitted> I recommend using a counter to keep score. If you are using something else, then just
Health in pictures
By Tioma7, with 14 replies.
Last reply by Tioma7, about 11 years ago:
danpost wrote...
The main problem that I see is in your 'getDigit' method. You have it receiving an image and a single-digit int value. The method sets the image to a new image, which removes any image you previously gave it, and then the method is exited, which loses the image change altogether. I do not think you realize that the image received by the method becomes local to the method and no longer is linked in any way to the image created by the calling method (the field itself is not passed to the method, just its value). Therefore, you will need to pass the new image back to the calli
Moving from World to World (i.e. through a door)
By askgriff, with 9 replies.
Last reply by danpost, about 11 years ago:
It is
here
.
Up and down arrows increase and decrease speed
By LugNut29, with 4 replies.
Last reply by LugNut29, about 11 years ago:
Ha..Yeah I'm very, very green to programming. I have been playing around with this a little and it seems to work about 90% of the time. When the fish gets in a corner, it seems that the up and down keys quit working. I'm sorry if I'm asking a lot of questions.
Bullet collision problem
By Tioma7, with 11 replies.
Last reply by Tioma7, about 11 years ago:
i solved that, had to add that if bullets hits enemy loop stops
asteroids Score Board
By taky123, with 25 replies.
Last reply by taky123, about 11 years ago:
OMG thanks it works your a life savior dude i dont know how to thank you :D
Cannot find Symbol - Method size()
By Balathasar, with 11 replies.
Last reply by GreenHouse, about 11 years ago:
Having a big world ( Very big )
By Jonche, with 1 reply.
Replied to by FlyingRabidUnicornPig, about 11 years ago:
There are several scrolling worlds on the site. Try out
danpost's Scrolling Super World
or
SPower's Scrolling World
. Or look for some others.
help
By KevinWelch2001, with 2 replies.
Last reply by KevinWelch2001, about 11 years ago:
thank you
nullPointer with removeObject :S
By JimmyFake, with 14 replies.
Last reply by JimmyFake, about 11 years ago:
Zamoht wrote...
I found this on a
stackoverflow thread
. Map is an interface. Create an instance of one the classes that implements it: Map<String, String> temp = new HashMap<String, String>(); temp.put(colName, data); Or, in Java 7: Map<String, String> temp = new HashMap<>(); temp.put(colName, data);
That's it. I overlooked the fact that Map is an inferface. Initializing it with the HashMap Implementation, lifts the nullpointer exception.
danpost wrote...
Try inserting before the
Getting a method to work
By winsticknova, with 5 replies.
Last reply by danpost, about 11 years ago:
The body you added to the method does not set the speed of the actor (it moves the actor down by the speed given). You need a statement that
sets
the
speed
of the actor (assigns the given value to the field that represents the speed of the actor)..
Passing Character Data through world
By Tavi, with 6 replies.
Last reply by danpost, about 11 years ago:
Work on one issue at a time. It is too easy to get confused when you try to work on more than one thing at a time. Compile often to prevent compounding errors. For now, it might be best to reduce it to a working state and build on it from there.
Top down shooter vertical screen scrolling.
By Tioma7, with 11 replies.
Last reply by Tioma7, about 11 years ago:
askgriff wrote...
But you should always start your game -- get the world set up, the variable declared, the graphics set, etc. Have you started looking through any of the "scrolling world" scenarios? There are some good ones.
I have seen a lot of scrolling scenarios and i dont want just copy them and paste i want to understand how its made, and i didnt get it :(
Someone know how to catch this?
By ddvink, with 2 replies.
Last reply by danpost, about 11 years ago:
The error occurs in 'checkFloor', but the cause of the error is probably found in your 'act' method (the order in which you call your methods. You probably have a method that removes the actor from the world before calling the 'checkFloor' method; hence, causing the error. You could probably add a line into your act before the call to 'checkFloor': <Code Omitted>
TicTacToe Game
By MontclairState, with 12 replies.
Last reply by MontclairState, about 11 years ago:
You are right davmac that works as well. Thanks you both for your input :D
768
769
770
771
772
773
774
X