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
Character movement
By Shinnaru, with 2 replies.
Last reply by Shinnaru, over 4 years ago:
Works now, I just noticed I had a method checkWall() which prevents my character from touching and/or going through the wall, so the if statement(Line 12) was not running.
How do I check after all of an actor is gone, then print "GameOver"
By anderslieww, with 3 replies.
Last reply by anderslieww, over 4 years ago:
Thanks it worked! :)
VARIOUS
By ronald, with 44 replies.
Last reply by ronald, over 4 years ago:
thank you
i want to transparent particular part only
By venkatesh438, with 4 replies.
Last reply by venkatesh438, over 4 years ago:
thank you so much....
Quick question will Greenfoot work on rosetta 2
By coder123, with 1 reply.
Replied to by RcCookie, over 4 years ago:
Since Rosetta 2 should be able to run x64 based programs for Intel it should work. But I don’t have a Mac
Hi I need help coming up with an if statement
By Icup, with 8 replies.
Last reply by danpost, over 4 years ago:
Icup wrote...
What I mean is like my 2 pong pieces keep going off the screen when I move them like I can go beyond what I can see and make them disappear and I don’t want that to happen
Show class codes for pong pieces. Also, show first line in your world's constructor (it would start with "
super(
"...)
Why can't my object change the Image?
By Turbo_Thorsten, with 2 replies.
Last reply by Turbo_Thorsten, over 4 years ago:
Ah yes I'm always missing sth thank you
addObject() or setImage() won´t work
By elektro, with 2 replies.
Last reply by danpost, over 4 years ago:
You need an
addObject
line to put
question
in the world.
How do you make a grid in a non grid world?
By Darkstep, with 1 reply.
Replied to by danpost, over 4 years ago:
Darkstep wrote...
I know you have to use a GridActor for actors going into the grid and a separate actor class for the actual grid itself
Actually ... no. You do not have to use
GridActor
(specific to a grid world) and you do not need an actor for the grid (grid can be drawn onto the world background). All coordinates will be based on "cell" width A virtual 0 coordinate would be just half a "cell" width. A virtual 1 coordinate would be one and one-half "cell" widths. All are half a "cell" width plus the virtual coordinate times a "cell" width.
How to addObject in constructor of an actor class
By Nicole05, with 1 reply.
Replied to by RcCookie, over 4 years ago:
The problem is that when the object is created it is not in a world yet. So, it has to add itself to the world first, then it can add other objects. These information have to be passed into the constructor. <Code Omitted>By doing so you can also replace this <Code Omitted>with this <Code Omitted>
Why won't "or" not work
By Gabe1098, with 3 replies.
Last reply by Gabe1098, over 4 years ago:
Roshan123 wrote...
In line 4 <Code Omitted>
Thank you so much!!!
Help idk whats wrong with this
By mariq_rasyid29, with 3 replies.
Last reply by mariq_rasyid29, over 4 years ago:
thx all for help me ^^
Add a object on scenario doesn't work
By Sajji25, with 2 replies.
Last reply by Super_Hippo, over 4 years ago:
In your constructor, you add “new” instances of the Intel and AMD classes. There are not the ones in your variables, so the mouseClicked method will always return false. As a side note, you shouldn’t use the very same names for classes and objects to avoid confusion.
Colored Code Questions
By Gabe1098, with 8 replies.
Last reply by Gabe1098, over 4 years ago:
Super_Hippo wrote...
The act method is executed once per act cycle for the active world and all actors in the world. A (do-)loop executes until it finishes. Nothing else is happening in the meantime.
Thank you so much!!!
I need help with a snake game
By Pimkimi, with 5 replies.
Last reply by Pimkimi, over 4 years ago:
danpost wrote...
Pimkimi wrote...
if you need the entire code, just ask, i will give it with pleasure
To have entire snake move as a unit, best would be to control all parts from the head. I have several snake demos in my
Demos by danpost
collection. You may want to check them out.
Being a beginner, I don't understand all your code. I don't know how to apply it in my code with the values and classes I have. But thanks anyway! And thank you for your previous quick answers, I appreciate it
65
66
67
68
69
70
71
X