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
Variables not taking on the proper boolean (true or false)
By abby410, with 9 replies.
Last reply by danpost, over 9 years ago:
Lines 14 through 16 create the required objects. You need not create more on lines 59, 61 and 63 (removes these lines). Same thing with lines 43, 45 and 47 (remove them).
Ints doubles and setLocation()
By Nosson1459, with 11 replies.
Last reply by Nosson1459, over 9 years ago:
thnx
Need help
By Nooooob, with 40 replies.
Last reply by danpost, over 9 years ago:
Super_Hippo wrote...
Theoretically, it should be done the same way as the blocks falling. So in the world, check for a key press, move all 4 pieces, if it fails (touches block or reached edge), move it back to where it was. "Theoretically" because it doesn't really work as it should I guess.
Yes, all blocks of each tetromino should be moved together at the same time, then collision checking should be performed for all the blocks and upon any collision encounters, they are all moved back together. With a bounded world, two blocks of the same tetromino will be found colliding upon edge e
How to stop a clock?
By Fifilein, with 26 replies.
Last reply by Fifilein, over 9 years ago:
Thank you! Now it works. Thank you very much!
Shared Scenario stage bigger than background image
By lordhershey, with 2 replies.
Last reply by lordhershey, over 9 years ago:
That amount is ok, what I see is something like: <Image Omitted>
Returning Variables Across Worlds
By PJaymz, with 2 replies.
Last reply by davmac, over 9 years ago:
If I understand correctly, what you really want to do is carry one "CorrectAnswer" object between your worlds. So, in fact you don't want a "new CorrectAnswer" at all; what you want is a parameter for your constructor. In that case the constructor for QuMaj becomes: <Code Omitted> (Note, remove the current line 36 from your prepare() method). (If y
RESIZE IMAGE
By rachpaguia@gmail.com, with 7 replies.
Last reply by rachpaguia@gmail.com, over 9 years ago:
I FINALLY DID IT!!! THANK YOU ALL SO MUCH FOR YOUR HELP
Need help accessing variable from another class
By timothytitus, with 5 replies.
Last reply by timothytitus, over 9 years ago:
Oh I see thanks
How to make object jump
By Avilianne, with 3 replies.
Last reply by Avilianne, over 9 years ago:
Thank you! The demo was a huge help!
Null Pointer Exception?
By SeaShore, with 3 replies.
Last reply by SeaShore, over 9 years ago:
Thank you danpost!
Fractions
By Nosson1459, with 20 replies.
Last reply by Nosson1459, over 9 years ago:
So it seems this discussion is coming to a close. Thank you (plural) for all the help.
BACKGROUND HELP
By rachpaguia@gmail.com, with 7 replies.
Last reply by rachpaguia@gmail.com, over 9 years ago:
Thank you so much!!
Adding the same object multiple times
By fgryh123, with 2 replies.
Last reply by Super_Hippo, over 9 years ago:
What stops you from adding several ones? <Code Omitted>
How to negate an if statement if a button is pressed
By ObliviaOng, with 2 replies.
Last reply by ObliviaOng, over 9 years ago:
I was able to code for it based on your suggestion, but I didn't exactly use the else part of the code that you gave. Though it was a really big help, thanks!
Doubles and Integers
By Wasupmacuz, with 4 replies.
Last reply by Wasupmacuz, over 9 years ago:
_ben_ wrote...
Your problem is that you write double vales to int. > Theory: an int is a 32bit value, thus it can hold 2^32 different values, a double is double an in thus 2^64 values. Thus, if you have a huge double int might be too small and you have "lossy conversion" > Fix: typcast the double to int. Typecasting works by butting the desired type in brackets before the expression. Here: screen = (int)(worldZ*perspective); this works since it is all just memory. Attention: you might still loose data during the conversion, but there won't be an error. An alternative way would be to check if t
383
384
385
386
387
388
389
X