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
Card not removing from hand
By CP7, with 35 replies.
Last reply by CP7, about 7 years ago:
Nvm, i found the error. Thank you for all your help on this project danpost!
Adding score counter
By dionzeka99, with 1 reply.
Replied to by danpost, about 7 years ago:
Do you create and add a Counter object into the world? What is your Actor class substructure like (what extends what)? What is the current codes for the bullets and the aliens?
NEED HELP!
By bolzano, with 8 replies.
Last reply by bolzano, about 7 years ago:
Thank you. I ll try that
What am I doing wrong here? (Variables)
By Kozume, with 6 replies.
Last reply by Kozume, about 7 years ago:
Nevermind, it worked, thank you so much man
Greenfoot movement
By dionzeka99, with 9 replies.
Last reply by danpost, about 7 years ago:
dionzeka99 wrote...
<< Code Omitted >> Here you can see the moveAlien it says that it is wrong and that I must declare this method
You are showing the
Row
class where the method is being called from. The problem is that you do not yet have that method in your
Alien
class to call.
Mode 7 (3D Environments) in Greenfoot
By SickTrickz832, with 5 replies.
Last reply by SickTrickz832, about 7 years ago:
nccb wrote...
Looking up Mode 7, I think this mainly used to scale and transform the floor graphic. The technique for drawing fuller 3D is raycasting. If you're interested, part of my series on maths in Greenfoot is on how to implement raycasting. The full list of posts in order is
here
.
The post introducing raycasting
is about halfway down the list although I think you'll also want to read the posts before that on how to do line-of-sight.
Little update. NCCB T
Hey, want to let platforms spawn randomly in a sector
By Lucky, with 1 reply.
Replied to by Super_Hippo, about 7 years ago:
A method which isn't called won't do anything. You only call the randomSpawn method once when the world is created. Instead, you want to call it every act cycle, so it has to be in the act method or it has to be called from the act method.
actor rotation with arrows
By ronald, with 7 replies.
Last reply by ronald, about 7 years ago:
thank you it works as wanted
How to set win condition for a free moving connect four game
By BagBeGone, with no replies.
<Code Omitted>I need help setting up a win condition for when 4 red.class touch each other the game ends Is there a way I could maybe differentiate between objects in the same class and see if 4 of them touch each other or something?
HOW OPEN A GREENFOOT PROJECT ON NETBEANS?
By LUXY, with 2 replies.
Last reply by LUXY, about 7 years ago:
Thank you for the answer, I've followed the documentation step by step but the project dosn't start. When I run the project, It opens a dialog that shows : greenfoot.export.GreenfootScenarioApplication class wasn't found in LTA project. <<No main classes found>> I don't understand why, the greenfoot.jar that I have imported contains that class(GreenfootScenarioApplication.class). There is onother problem, when I compile the project, the terminal show me this message: warning: unknown enum constant Tag.Any reason: class file for threadchecker.Tag not found warning: unknown enum cons
Greenfoot 3.6.0 released
By nccb, with no replies.
Greenfoot 3.6.0 has now been released. The main feature of this release is that it moves to Java 11, which means a few extra notes are needed:
Greenfoot now requires a 64-bit CPU and 64-bit operating system. Our stats indicate over 95% of our users already have this. If you don't, you will need to stick with 3.5.4.
To solve Java packaging headaches on Ubuntu, Debian and co, we now include the JDK by default on Ubuntu. This should make it much easier to install for our Debian-derived Linux users.
The online export to this website has been upgraded to work with code produced by Java 11, but as yet the library we use doesn't have support for new Java 11 APIs. So if you start to use any methods introduced after Java 8 (e.g. the List.of() utility methods), this won't work in the online version.
Other than that, everything should be working as usual. Talking of the online export -- we've also now fixed the GifImage utility class so that it works in the online version. To take advantage of this, install 3.6.0, delete the GifImage class from your scenario, re-import it using the Edit -> Import class menu option, and re-export to the website.
Help me, plz.
By Handy, with 1 reply.
Replied to by danpost, about 7 years ago:
Handy wrote...
<< Code Omitted >> What's wrong with this code?
Please show entire method.
NEED HELP ASAP Spawning an Actor when an actor is clicked FOR ASSESSMENT
By HydraLord257, with 5 replies.
Last reply by danpost, about 7 years ago:
That really did not explain what you think each line does. You need to do more than one thing when the actor is clicked -- spawn an actor and play a sound. Therefore, you will need a block of code for the
if
statement: <Code Omitted>Now, "spawn" means "create and add to the world". You create an object by using the
new
keyword. For example (not your actual code -- just showing use of the keyword): <Code Omitted>Then, you add it into the world by using the
Tron Game, problem with spawning "line"
By _Tobi.X, with 2 replies.
Last reply by danpost, about 7 years ago:
_Tobi.X wrote...
I spawn the "Line" ... and try to adjust the x and y location (with the SmoothMover class) of the spawn
I cannot see a need for the
SmoothMover
class for a "Line" object. It will not be moving. I suggest just placing a new "Line" object at the cycle's location before it moves and move just enough to not have the center of the cycle image over that new "Line" object. That way you can use the getObjectsAtOffset(0, 0, << "Line" class name +".class" >>) method to check for collisions.
win screen
By Bong_Lord, with 3 replies.
Last reply by danpost, about 7 years ago:
Bong_Lord wrote...
im having problems with making both the world and switching the game over to that world, and the code within it has no errors but whenever all enemies are dead nothing else would happen. ive tried this in a sub world << Code Omittted >>
Where in the class did you try this?
176
177
178
179
180
181
182
X