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
java.lang.OutOfMemoryError: Java heap space
By sparrow72, with 7 replies.
Last reply by danpost, almost 14 years ago:
When you delete all objects of a class, you are also deleting all objects that are sub-classes of that class. Since Level1 extends Levels, Level1 is an instance of Levels, but more specifically, an instance of Level1. I have never tried anything like this, but maybe you can use a List method to remove 'this' within the parameter?
how to jump
By Benedict, with 4 replies.
Last reply by danpost, almost 14 years ago:
@Jinice, Instead of lines 3 and 4 in the trampoline code above, use: <Code Omitted>The boolean field 'onGround' should be declared as an instance variable in your character class, initially set to 'true'. Change to value to 'false' in the code block for the 'if' statement. When a 'landing' is detected, change it back to 'true'. Things to be aware of: detecting the landing could be a bit tricky; if your character is falling fast and the object to land on is not very thick (height-wise), the character could just pass it up or get stuck inside of
help with subclass referencing and 'cannot find symbol - ...' errors
By sparrow72, with 6 replies.
Last reply by davmac, almost 14 years ago:
To specify a class as a parameter, you can use a
class literal
, which ends with ".class". So, in this case it should be: <Code Omitted>
Execution just... skipping
By darkmist255, with 9 replies.
Last reply by SPower, almost 14 years ago:
For some extra information, those stop signs are called breakpoints.
Using 'lists'
By Gazzzah, with 7 replies.
Last reply by danpost, almost 14 years ago:
Well, I took some time looking through the APIs, and came up empty. That is, until I remembered an in-house project I had done for someone that required some directory searching; so, I located the project and reviewed the source. I almost gave up on that idea when I saw the JFileChooser, FileNameExtensionFilter, and JFrame import statements (nothing refering directly to Files themselves), but decided to look deeper in the code. I found a reference to the File class within the code and reviewed the imports, again. Then, I saw it:
import java.io.*;
. That had to be it! I went back to
Help Me Please!!!
By benedict3578, with 8 replies.
Last reply by danpost, almost 14 years ago:
@SPower Actually, and unfortunately, your 'mistake' is worse than benedict3578's. His could only mean what you corrected his to say, as the Actor class is already named 'Actor' and cannot be renamed. Yours, on the other hand, has other possibilities which do not fit the case. Let's not nittpick semantics, at least in those cases where it is obvious what is being said. :)
Error within Terminal Window
By Marie, with 4 replies.
Last reply by SPower, almost 14 years ago:
The course is posted! Sorry for the time it took, I was busy with some other things. Look at this scenario:
http://www.greenfoot.org/scenarios/5709
Exception with sound file
By SPower, with 3 replies.
Last reply by SPower, almost 14 years ago:
Thanks, I'll look at it.
getNeighbors
By fishwaffles1337, with 5 replies.
Last reply by fishwaffles1337, almost 14 years ago:
I've published the game feel to look at it and give any suggestions, it's obviously still a work in progress.
http://www.greenfoot.org/scenarios/5708
Finding the length of a list.
By fishwaffles1337, with 3 replies.
Last reply by danpost, almost 14 years ago:
The problem is that line 32 creates a new variable called neighbors, and does not assign the list to the class field called neighbors. Therefore, line 41 will always return 'false', because the size of the class field is never populated. Easy fix, change line 32 to: <Code Omitted>By not declaring the variable here (no casting of type), the class field will be used. Also, by specifying 'Cell.class' as the class to list, only neighboring cells will be listed. One more thing, I am not sure why you asked if the size was greater than one. I have a
Problem speeding up texture mapping
By SPower, with 6 replies.
Last reply by SPower, almost 14 years ago:
You don't have to help me: I just had to change this: <Code Omitted>to this: <Code Omitted>I usually don't see those things very fast: usually after speaking out load what's written down :), which is what I did this time.
Polymorphism in greenfoot?
By davemib123, with 4 replies.
Last reply by davemib123, almost 14 years ago:
great ... thanks for the syntax tip davmac
how do i make a new object?!
By freed, with 6 replies.
Last reply by freed, almost 14 years ago:
thanks guys ur super!
How to make a checkerboard
By nerdgirl92, with 7 replies.
Last reply by danpost, almost 14 years ago:
I was not sure how to explain it to you, you being new and all. What you originally said you needed to do would require some knowledge that an person with some experience would acquire.
nerdgirl92 wrote...
"Create a new scenario. In it, create a world with a background that displays a pattern. Create an Actor subclass. Program the class so that it generates a new GreenfootImage of a fixed size, filled with a fixed color. Use this image as the actor’s image. Experiment with different color and alpha values."
I now believe that you misunderstood what you needed to do for this assignment.
Greenfoot and CC3
By mduggan, with no replies.
I am a newbie here. i was hoping one of you are using greenfoot on a RM CC3 network. and can my be advise me if you found any problems. Thanks in advance
952
953
954
955
956
957
958
X