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
method AddMushrooms in class Background cannot be applied to given types: etc... help please
By roshiyoshi, with 10 replies.
Last reply by roshiyoshi, over 11 years ago:
thanks so much danpost, really appreciate the help
Intersecting Object Help
By cellostar47, with 3 replies.
Last reply by cellostar47, over 11 years ago:
IT WORKS! Thanks danpost.
Need help to left click to change world
By ZahDx, with 1 reply.
Replied to by danpost, over 11 years ago:
I think you need to review the methods provided in the
Greenfoot class documentation
and choose a more appropriate method (other than 'isKeyDown').
Platform Problems щ(ಥДಥщ)
By awent0428, with 4 replies.
Last reply by danpost, over 11 years ago:
I do not see any attempt at coding any collision. What have your tried? Things I have noticed: * class names should begin with uppercase characters (by convention) * method names should begin with lowercase characters (by convention) * the setting of the images for your cat, as coded, need to be read from file to create the image and then set every act method the cat moves; this is far from efficient and may cause lag; it would be far better to hold the images in fields and set the cat to the appropriate image only when a change in direction is detected. This means you would need three
Problem with intersecting objects
By K_wow, with 11 replies.
Last reply by K_wow, over 11 years ago:
davmac wrote...
Ah. Have looked at a bit more. The problem is that you have moved your arm back to its "bodyside" position before you check for the collision. Because you have moved it right in to it's controlliing player's body, it's no longer intersecting with the other player. After doing the collision check, you move the arm to wherever it should be. You should check for collision after the arm has reached the correct position, instead. So: <Code Omitted> should be:
Issue with smoothly rotating towards a target rotation
By K_wow, with 13 replies.
Last reply by K_wow, over 11 years ago:
Nevermind, I fixed it. I was supposed to check whether rotationDiff was greater than 0, not less than 180. Thanks for all the help guys! :D
Typing Game
By Spock, with 7 replies.
Last reply by Spock, over 11 years ago:
Thanks Hippo, that did the trick :)
How do you display the "x" and "y" of an actor?
By ILOVELABRADORS, with 9 replies.
Last reply by davmac, over 11 years ago:
To call a method that's in the same class, you write the name of the method followed by parentheses containing the parameter values, if any. As 'updateCoords' doesn't have any parameters you can leave the parentheses empty in this case. If you don't understand something I've said, then please ask about it specifically. Writing a method call is so fundamental that you need to learn to do it yourself, so I'm not going to write it for you.
HELP ME SCORE COUNTER PROBLEM
By sharifahhilwa, with 18 replies.
Last reply by davmac, over 11 years ago:
Just like the exception message says, you are calling a method (
getOneIntersectingObject
) which relies on the actor being in the world, but the actor (Crosser) has been removed from the world. You need to avoid calling
getOneIntersectingObject
after the actor removes itself from the world.
Saving Actor Positions Help!
By pokemunn, with 3 replies.
Last reply by pokemunn, over 11 years ago:
Thanks guys, I'll have a crack at that.
Need help with small bit of code
By pokemunn, with 3 replies.
Last reply by pokemunn, over 11 years ago:
Thanks guys, I ended up using a bit of code from a video tutorial in Mik's Blog. Where the actor detected when it was at the edge of the world (either left or right side) and then when that was true it turned 180. I originally planned to have two 'barriers' at either end which had the same image as the side of the background but this turned out to work just as well. Thanks again for your time. :)
How would I make buttons spawn in the world and play sounds when clicked?
By mobileash66, with 3 replies.
Last reply by davmac, over 11 years ago:
mobileash66, please use 'code' tags when posting code. (Click the link that says "Posting code? read this!" under the text entry area). Your code above looks wrong because it contains: <Code Omitted> ... which creates
italic text
.
cannot find symbol - method hitAZombie(), how do i fix?
By roshiyoshi, with 2 replies.
Last reply by roshiyoshi, over 11 years ago:
thank you so much! I just realised my stupid mistake
Image Switching
By awent0428, with 5 replies.
Last reply by awent0428, over 11 years ago:
Wow! Thanks! That was easier than I thought!
The Execution Controls ლ(ಠ益ಠლ
By awent0428, with 4 replies.
Last reply by awent0428, over 11 years ago:
Zamoht wrote...
If you really want to make a good looking game you should use a game engine. Greenfoot is for learning. You can search for engines based on lwjgl (like Slick2D for instance).
I understand this, but Greenfoot is a very nice program for both learning and making good looking games. I have seen many. I also do not want to use any other engine, as I am currently learning Java.
653
654
655
656
657
658
659
X