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
instantiate new object at specific coordinates
By footsniffer74, with 3 replies.
Last reply by danpost, over 4 years ago:
footsniffer74 wrote...
growing would be best, its meant to be like a rising sea level
Best might be to use one actor that slowly moves up showing more of its image hiding below the world's edge. Using multiple actors will cause a streaking effect along the bottom edge of the images.
NEED HELP 2D CAMERA CONTROLS
By footsniffer74, with 1 reply.
Replied to by danpost, over 4 years ago:
footsniffer74 wrote...
im making a 2d platformer, is there anyway to make extend the game world but keep the camera centralised on the player with a screen size of like 600x400?
Please refer to my
Scrolling Tutorial
scenario.
Actor movement not working
By Beaver, with 1 reply.
Replied to by danpost, over 4 years ago:
From what I see, it will take like 6 to 7 seconds before its initial moves (due to large timer value of 400), if it moves at all. Then it will not move again as timer is never reset.
Dance game notes not being removed
By Beaver, with 15 replies.
Last reply by Beaver, over 4 years ago:
Actually, I tried the boolean method a few more times, made the hitbox a bit thinner and I can finally say that it works. Thanks for the help :)
Java assignment
By Roshan123, with 3 replies.
Last reply by danpost, over 4 years ago:
Roshan123 wrote...
i m not able to get the required answers. Would u plz
only
tell me the answer of 2 and 5 number...plz
2 is vague as only things really needed are boolean loop control and code block. 5 deals with
while
and
do-while
difference (discussed in tutorial).
Problem with getKey()
By Turbo_Thorsten, with 14 replies.
Last reply by danpost, over 4 years ago:
Super_Hippo wrote...
Maybe your k key is broken?
Try a different key, like "a" (for
a
utomove).
How long does it take for code to run?
By Gabe1098, with 5 replies.
Last reply by Gabe1098, over 4 years ago:
danpost wrote...
In your code above, the ONLY thing that may cause a delay is something stemming from "
new Spider()
", which executes "
public Spider()
" in your
Spider
class. Hence, why I asked for its codes.
Ohhh Thanks!
Big problems with Actor not in World
By Turbo_Thorsten, with 7 replies.
Last reply by danpost, over 4 years ago:
Turbo_Thorsten wrote...
Ok so now I got the problem again. What's wrong with my code?
If
lookForBullet
removes tumor from world,
lookForPlayer
, which requires the tumor to be in world, fails. Add as first line in
lookForPlayer
: <Code Omitted>
setImage
By Gabe1098, with 7 replies.
Last reply by Gabe1098, over 4 years ago:
Gbasire wrote...
I just realised I did some typo errors in my previous message, sorry here are the correct lines of code : <Code Omitted>and <Code Omitted>be sure you also use the correct capitalization, the file must be "Banana.png" with a capital B
yes I noticed that and I fixed it I will see if it fixes tomorrow
How to read and use a text file?
By Darkstep, with 8 replies.
Last reply by RcCookie, over 4 years ago:
Just put it into a try/catch block like the other times and catch an IOException.
Or
expand the existing one: <Code Omitted>Also it’s fine, feel free
How do I stop my actor(Fbot) from passing through the walls?
By anderslieww, with 8 replies.
Last reply by RcCookie, over 4 years ago:
If your walls are stationary, this should work: <Code Omitted>
i want top score ,i used static variable to store problem
By venkatesh438, with 2 replies.
Last reply by venkatesh438, over 4 years ago:
thanks bro
Problem with getting a variable
By Turbo_Thorsten, with 8 replies.
Last reply by danpost, over 4 years ago:
Try this for line 34: <Code Omitted>
Power Up Problem
By Gabe1098, with 1 reply.
Replied to by Gabe1098, over 4 years ago:
of I updated it
Boolean and Return
By Gabe1098, with 2 replies.
Last reply by Gabe1098, over 4 years ago:
danpost wrote...
Gabe1098 wrote...
hello I am very new to greenfoot and I have been doing discussions a lot lately so can you please do a simple explanation about boolean and return
Boolean: the
boolean
data type has only two possible values:
true
and
false
. Use this data type for simple flags that track true/false conditions. Return: the
return
statement is used to immediately exit a method. In a method whose return type is declared
void
, it is used to force an immediate exit so that the following lines of code in the method do not execute. In a
64
65
66
67
68
69
70
X