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
HELP SUPER URGENT!!!
By HELP, with 1 reply.
Replied to by Gbasire, over 4 years ago:
if you want to check if both string are the same, do this <Code Omitted>if you want to check the value of s1 and change s2, do this <Code Omitted>
how to do brodcast command
By hackeplayz124, with 17 replies.
Last reply by hackeplayz124, over 4 years ago:
thanks this really helped
How do I change font of the text?
By lary_, with 7 replies.
Last reply by lary_, over 4 years ago:
The whole problem was the font I installed in my pc, so I have to use another one. But this is working for me. <Code Omitted>Thanks for the help, everyone.
Jitter lag problem with background
By Suavessence, with 7 replies.
Last reply by danpost, over 4 years ago:
Stars class can be simplified to this: <Code Omitted>
How to speed up Greenfoot/let it make use of more processing power?
By RoverKnight, with 2 replies.
Last reply by Super_Hippo, over 4 years ago:
The more actors you have, the slower your scenario will get, yes. In the case of Game of Life, there should be life in a cell or not. So there shouldn’t be more than one actor in a cell. However, you don’t need to use actors for the cells. Since each actor is only a boolean representation (or 0 and 1) showing with an image, you can also have an array in your world and draw the world background based on the 0’s and 1’s in the array.
setImage invisible
By BlueHand, with 3 replies.
Last reply by Gbasire, over 4 years ago:
you can do two things : 1 : getImage().setTransparency(0); this will just make the image opacity to 0 2 : setImage((GreenfootImage)null); this will set a null image, completely blank
Actor placement is messed up in uploaded scenario.
By bhsprogramming, with no replies.
One of my students in a programming class built a game that runs fine on the local machine, but once it was uploaded to this site, the online version is messed up. The game runs, but the actors in each level (mostly walls) are all in the wrong place. The layout doesn't look anything like the version on the local machine. Any idea why this is happening and more importantly, how to fix it?
Error while adding new objects on world
By tayyabah72, with 3 replies.
Last reply by danpost, over 4 years ago:
Sounds like you are trying to construct your world. That is, place the initial actors into your world. That would be coded in your
World
subclass, either in the constructor method or in a method called from that constructor (usually called
prepare
).
Error in site version but works on local computer
By Olexandra, with 4 replies.
Last reply by Olexandra, over 4 years ago:
Thanks a lot!
Getting Information about multiple Images
By Total-Eclipse, with 2 replies.
Last reply by Total-Eclipse, over 4 years ago:
Thank you this helped a lot.
CONSOLE TUTO JAVA
By ronald, with 2 replies.
Last reply by ronald, over 4 years ago:
thank you
Problems with backgrounds images
By Yohanser, with 1 reply.
Replied to by danpost, over 4 years ago:
Not enough information. Provide attempted program code and also details on how you tried to manually set the image.
How to make a smoot mover
By zaaaak, with 1 reply.
Replied to by danpost, over 4 years ago:
You do not need smooth mover support on actors that only move up, down, left and right. Add any one additional direction and you may have a reason to use it.
Converting string statement to integar
By tayyabah72, with 3 replies.
Last reply by danpost, over 4 years ago:
You can use
switch
on
char
value in this way: <Code Omitted>
Ray casting
By Roshan123, with 34 replies.
Last reply by danpost, over 4 years ago:
To be
un
obstructed, the ray is limited to only touch the two actors. It definitely must be less than or equal to two to be truthfully unobstructed. Whether the value used is two or zero is determined by the types of the two actors. If they are of "intersecting" type checked for, use 2. If only one of the two actors is of that type, use 1. If neither is on that type, use 0.
68
69
70
71
72
73
74
X