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
Skor
By JosephCS, with 1 reply.
Replied to by rikpratama, almost 9 years ago:
buat variabel skor di class MyWorld; buat method setSkor() di class MyWorld; method ini untuk mengupdate skor di Actor Player panggil method setSkor() https://youtu.be/SCm5IUrhfwU
claraworld.net
By Ankitgujjar, with no replies.
<Image Omitted> <Image Omitted> This problem continues to test you in regards to code decomposition strategies, use of variables and possibly code modification. Clara’s task is to invert her world. This means putting a leaf in every empty cell and removing a leaf from every non-empty cell. While producing your solution for this problem you must use at least one variable (a good idea is to make this variable of type boolean). This variable should be used to help Clara in memorising the direction of her current movement. The simplest way to approach this problem is to base your solution around the sample code for ClaraCleaner from Lecture 3. But here, instead of cleaning the world you must invert it and you must make use of the variable that you declare in order to decide on whether to reposition Clara to the east or to the west, rather than looking at the trees around her to make this decision. Once you do it – make sure you clean up all the unnecessary code from the base solution. The initial configuration is shown in Figure 1 and the result should look similar to Figure 2. Figure 1 Figure 1. Figure 2 Figure 2. Clara always starts in the upper left corner facing east! Your program should be generic enough to handle any world configuration. Example worlds supplied with this problem will help you to test your code.
Trying to display instructions before game stops
By Brantgarron, with 3 replies.
Last reply by danpost, almost 9 years ago:
Add the following line to the 'instructions' method: <Code Omitted>
Need Help with Tetris Game
By Arifwc, with 4 replies.
Last reply by Arifwc, almost 9 years ago:
Thankyou super_hippo. really appreciated it
Lists
By CavemanWrath, with 1 reply.
Replied to by danpost, almost 9 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, almost 9 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, almost 9 years ago:
Thanks sm
Shooting: bullet does not move across screen
By michelleed, with 3 replies.
Last reply by danpost, almost 9 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, almost 9 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, almost 9 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, almost 9 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, almost 9 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, almost 9 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, almost 9 years ago:
Thank you very much!!!
List of Method in Greenfoot Class ?
By donysamdhila, with 5 replies.
Last reply by donysamdhila, almost 9 years ago:
Thanks Dan.
308
309
310
311
312
313
314
X