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
Lists
By CavemanWrath, with 1 reply.
Replied to by danpost, over 7 years ago:
Use the 'getNeighbours' method in a list iterating for loop -- something like this: <Code Omitted>You will need to be more specific than getting Actor type objects so that you can perform your check on the actors.
Space Invaders Project
By Toaster, with 8 replies.
Last reply by Toaster, over 7 years ago:
It worked. Thanks! I know i'm asking a lot, but could you tell me or guide me on how to get my aliens to move from one side, down, then move to the other? I'll try to upload my game if you need to know what I'm talking about.
Trying to add score when actor gets to 100 on the x axis
By ryan22, with 10 replies.
Last reply by ryan22, over 7 years ago:
Thanks sm
Shooting: bullet does not move across screen
By michelleed, with 3 replies.
Last reply by danpost, over 7 years ago:
I do not think the Vector class should extend the Actor class -- a vector is NOT an actor (I doubt you saw that in any scenario examples). A vector is an object with two values -- an angle and a length, which is what are needed to describe a vector. The Mover class creates a Vector object to describe the current direction and speed (or 'movement') of the actor. The Mover class should extend the Actor class and the Vector class should extend the Object class (this is implied if no 'extends' clause is given in the class declaration line). Next question: At the beginning of your world cons
Can't upload my scenario
By donysamdhila, with 1 reply.
Replied to by danpost, over 7 years ago:
There is, I believe, a 20MB limit on uploaded scenarios. There may be some things you can do to reduce the size of your scenario. First, start by remove any and all sound and image files currently in your 'sounds' and 'images' folders of your project folder that are not being used (you may not find you have any to remove -- but so be it). Next, make sure you use the 'jpg' (or 'jpeg') format for images used in the backgrounds of any of your worlds (they use less storage space than other formats). Also, if you can reduce the size of any of your sound files either by cutting their length or u
setting a timer for my game
By rory, with 1 reply.
Replied to by danpost, over 7 years ago:
rory wrote...
I want to set my game to have a 2-minute timer (displayed on the screen) and after the timer ends the game stops. I have no clue how to program this. help.
My
Value Display Tutorial
shows how to create a displayable timer.
trying to access a counter from MyWorld in Actor class
By ryan22, with 4 replies.
Last reply by danpost, over 7 years ago:
ryan22 wrote...
The Minus and Plus Ten are just object in the game where if you hit one, you lose or gain points based on it.
I understood that. I was just wondering why you would create one for no reason at line 7 above.
background music
By doglover555, with 3 replies.
Last reply by Super_Hippo, over 7 years ago:
Does the file have the same name? Maybe it is 'Intro' and not 'Into"? I am not sure how it works in Mac, but you could try to use a file name without a space.
Help. Is there a reverse?
By RB3454, with 1 reply.
Replied to by Super_Hippo, over 7 years ago:
When the scenario is stopped, no code can reactivate it again because no code is executed (after the current act is finished). You can pause the whole scenario using the Greenfoot.delay method.
Interactions between two classes
By MarioLuigi, with 10 replies.
Last reply by MarioLuigi, over 7 years ago:
Thank you very much!!!
List of Method in Greenfoot Class ?
By donysamdhila, with 5 replies.
Last reply by donysamdhila, over 7 years ago:
Thanks Dan.
Lag
By MaxBest, with 4 replies.
Last reply by MaxBest, over 7 years ago:
danpost wrote...
Probably best is to upload the project with source so someone can run and check it out themselves.
Thank you for your help but I have worked it out now, I accidentally had an infinite loop spawning a GUI in the same place so I couldn't tell it was spawning more than once but was causing loads of lag.
how to scroll?
By kevoncmlc2000, with 9 replies.
Last reply by danpost, over 7 years ago:
kevoncmlc2000 wrote...
ill try it. thanks
Keep in mind that actors leaving the viewable world which are no longer needed should be removed from the world to prevent possible lag.
help
By _The_Black_Swordsman_, with 3 replies.
Last reply by danpost, over 7 years ago:
_The_Black_Swordsman_ wrote...
whats a field?
Line 1 is a field declaration line -- a variable that is declared within a class, but not within a method or constructor (which are just plain variables). Each object created from the class comes with a placeholder for, in this case, an 'int' value called 'rotation' given an initial value of '0'. As 'private', no other class has direct access to the field. The field will exist as long as the object it belongs to exists. A field can be of any of the primary types (int, double, float, boolean, etc.) or it can reference an object of the s
Problem with java.awt.Color and java.awt.Font
By ryan22, with 1 reply.
Replied to by danpost, over 7 years ago:
The newer versions of greenfoot have the 'setColor' and 'setFont' methods using parameters of type 'greenfoot.Color' and 'greenfoot.Font'. Remove the import lines 3 and 4 and replace 'Font.PLAIN' on line 14 with 'false, false' to conform to the 'greenfoot.Font' constructor.
305
306
307
308
309
310
311
X