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
Isn't there anyone who can help me with the "Conway's game of life"?
By myheartwillgoon, with 4 replies.
Last reply by vonmeth, over 12 years ago:
Sorry, I should of included that in my first post. The problem is with
overriding
. The GameOfLifeCell act() overrides the act() in Cell. It doesn't matter if the method is empty, it will still override it. You can see this overriding taking place as well with the applyRule() method.
Need Some Help Pt.2
By ddavid33, with no replies.
Hi, all im having a little problem, i wanted to create a game where the actor would have to pick up an object and drop it off in a finishing point. thanks to some of you i have now been able to create that. but now i want to put in a little challenge. I now want to add some obstacles in the way. at the moment it goes straight through it. what codes do i need to add. Thanks in advance.
Little Crab - Counting steps
By mborders7786, with 9 replies.
Last reply by mborders7786, over 12 years ago:
@danpost, Not at all. I appreciate all the help I've had on here. Just don't think I have the gift of programming.
Hi friends! Need help!
By jabirfatah91, with 7 replies.
Last reply by vonmeth, over 12 years ago:
Thank you danpost! I thought I'd try my hand at creating it and was able to make one from following the instructions you posted. If you use the code I copied in my first post, it will end up ignoring the bordering cells. Fixing it so you don't ignore the bordering cells requires making sure it doesn't cause ArrayIndexOutOfBounds exception. This proves easy when altering the code I copied above a bit to use a 'for' loop for checking the locals.
Mutliple random placements
By Wavesludge, with 29 replies.
Last reply by Wavesludge, over 12 years ago:
Thanks!
Title screen won't run
By HadAWay, with 2 replies.
Last reply by danpost, over 12 years ago:
Look closely at lines 190 and 191. Ask yourself, "What will be happening here?"; "Will this do what I need it to do?". By the way, 'removeObject' will not 'error' if the object is
not
in the world.
Unreachable statement?
By programmer274, with 13 replies.
Last reply by danpost, over 12 years ago:
'int' code breakdown: <Code Omitted>Line 2 add an instance of that variable to all objects created within this class. Therefore any Enemy object created will have its very own variable to control the rate of damage. Line 4 runs the delay, if it is being used. If the delay time has expired, its value
Help with switching images
By programmer274, with 24 replies.
Last reply by programmer274, over 12 years ago:
yes google chrome
An interesting question!
By jabirfatah91, with 4 replies.
Last reply by jabirfatah91, over 12 years ago:
Danpost! Please have a look at my discussion I created recently. I always expect great help from you. I want to use the existing code I copied+pasted there, but I want to avoid using the Greenfoot library function getNeighbours(…) in the Actor class. Then how to edit the exixting code? i will be very grateful to you with instant response!
My discussion.
How to make a scrolling background wall
By KierTulp, with 6 replies.
Last reply by KierTulp, over 12 years ago:
I just looked back at what I send earlier and i see that i havn't been clear enough, my actual problem is that when i keep the right key pressed, my player will stop, but the background will keep scrolling. I am looking for a way to make the background stop scrolling when my player hits a wall. thanks for the second tip btw, I was not really sure on how to make levels yet, altho I am not yet making levels with that tactic it will all go a lot easier!
Switching images (creating a menu)
By TisLars, with 7 replies.
Last reply by danpost, over 12 years ago:
Just to let you know, as an alternative (and this makes the coding even more simplistic): you could have the following:
Exception in thread "Thread-187" java.lang.IllegalArgumentException: image == null!
By QuestionMark, with 1 reply.
Replied to by danpost, over 12 years ago:
I have a feeling that it is not locating the splashscreen image on the site. Remove the import and see if it uploads then.
IllegalStateException :(
By Stormtrooper299, with 3 replies.
Last reply by vonmeth, over 12 years ago:
It exits out of the act() method.
Here
is more information in ways 'return' is used.
Can anyone help me code a Goldfish game?
By TristinAubin, with 1 reply.
Replied to by vonmeth, over 12 years ago:
playLoop() should work fine.
Another
topic
that has a code example.
How to have more than one key being used at once?
By bbwf, with 5 replies.
Last reply by vonmeth, over 12 years ago:
Like danpost posted above, you can remove the following from the act method in your bullet code as well (it is already done in the constructor). <Code Omitted> So the bullet fires off fine when you are not moving? I don't see why it wouldn't work while moving.
910
911
912
913
914
915
916
X