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
Parameters and Instance Variables.
By MRCampbell, with 3 replies.
Last reply by danpost, about 7 years ago:
MRCampbell wrote...
Is there documentation of standards on naming different type of variables?
Not really. It mostly is up to the programmer. Oftentimes, the same name as the field will be used as follows: <Code Omitted>Other times, you might see an underscore being used: <Code Omitted>If you were to add complete documentation and "publish" the class, you may be "forced" to specific naming so that the documentation ma
Moving Actors Diagonally without turning and cycling through photos problem
By NerdWithProblems, with 3 replies.
Last reply by danpost, about 7 years ago:
A lot of code for doing quite little. The following would probably have sufficed: <Code Omitted>
Accessing Actor's Instance Variable from a List of Objects Created in a World
By MRCampbell, with 5 replies.
Last reply by Super_Hippo, about 7 years ago:
Yes and yes.
Falling Animation
By AniSusi, with 1 reply.
Replied to by danpost, about 7 years ago:
It might be easiest if you placed each animation image set in an array; then make an array of animation sets: <Code Omitted>You
Coding in a New World
By 19moreno, with 1 reply.
Replied to by Super_Hippo, about 7 years ago:
Store the two images in a field. In the act method, change the image either every act cycle of every x act cycles with the help of a timer variable.
need help with error
By Tasya16, with 1 reply.
Replied to by Super_Hippo, about 7 years ago:
You remove the actor from the world and then try to get the current position of the actor in its world. But it isn't in a world anymore.
How can i make the scenario restart when the car hits the wall?
By Exy.evans, with 1 reply.
Replied to by Zamoht, about 7 years ago:
You can probably use setWorld and then create a new instance of the current world you use.
Running Greenfoot from Another Class
By Xevinaly, with 3 replies.
Last reply by Zamoht, about 7 years ago:
I don't have experience doing this in Greenfoot, but it should not be that different from other solutions, and should work without access to the main method. Could you try to show some of the code you use, that doesn't work?
New Level Based on Score
By oltmanac, with 1 reply.
Replied to by Zamoht, about 7 years ago:
You have to move the "nextLevel2" method call from the constructor to the "act" method, so the check is performed during each act cycle.
creation of text images causing lag
By ErasedBlade, with 7 replies.
Last reply by Zamoht, about 7 years ago:
As mentioned by others you should avoid removing and adding objects. However I believe the slowdown happens because you create a new GreenfootImage that is quite large. Two ways you can improve this, if possible make the image smaller than 1000x100, and instead of creating a new image every time, you could store the image in an instance field and update it as needed.
How to add timer?
By hd3377, with 4 replies.
Last reply by Super_Hippo, about 7 years ago:
For an easy start, import the Counter class. Try to follow its description and come back with questions if you have any.
I need help with a beginner memory game, I can't get my card to match
By samNY, with 2 replies.
Last reply by Super_Hippo, about 7 years ago:
I would probably control it from the world and not from the cards. If the cards should do it on their own, you can have one static field which saves the card which was clicked on first. So when you click a second card, you can decide if this card's image equals the static one and after this check, set the static card variable back to null.
Game lags with bigger world sizes
By Tim1Blau, with 5 replies.
Last reply by Tim1Blau, about 7 years ago:
Thanks for your answer, I have sent the project files to the given adress. I hope you can help me with my problem!
How do I make my character only move Left or Right?
By secretbackupboss, with 3 replies.
Last reply by Super_Hippo, about 7 years ago:
This line is doing nothing at all: <Code Omitted>
Plagiarism
By jackreacher659, with no replies.
Will it detect plagiarism if i paste my code in here and if there is the same code in my assignment or report ??
189
190
191
192
193
194
195
X