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
non-static method-non-static-non-static-non-static...
By Minion1, with 7 replies.
Last reply by danpost, over 12 years ago:
You are probably calling the 'redCheck' method either before the Cursor object is placed in the world or after it has been removed. You could put a check as the first statement in the 'redCheck' method to avoid the error: <Code Omitted>
MenuDijkDoorBraak cannot be cast in FloodWorld
By Thellior, with 1 reply.
Replied to by Thellior, over 12 years ago:
https://www.dropbox.com/s/kjmmnb4yreezj00/Dijkdoorbraak.rar sorry for the Dropbox link. but i dont know how to share the code
Username length
By TestUserLength12345, with no replies.
What is the longest possible username possible to use for the greenfoot website? I want to create a custom scoreboard but I may have issues with displaying large usernames. I would like to know how long is possible.
how to spawn an actor that have different speeds?
By Mcstevens, with 4 replies.
Last reply by danpost, over 12 years ago:
You need to declare an instance int field in the class to hold the speed for each object created and assign the random value (1, 2, 10, or 20) in the constructor of the object. <Code Omitted> if radNum=0: radNum/2=0, *9=0, +1=1; radNum%2=0, +1=1; 1*1=1 if radNum=1: radNum/2=0, *9=0, +1=1; radNum%2=1, +1=2; 1*2=2 if radNum=2: radNum/2=1, *9=9, +1=10; radNum%2=0, +1=1; 10*1=10 if
How to make 3d games?
By bbwf, with 4 replies.
Last reply by Duta, over 12 years ago:
3D rendering is very difficult. There are actually many different ways to render 3D objects, but for all of them the algorithms are quite complex. If you're wanting to do 3D, Greenfoot isn't really a realistic option. You could try JMonkeyEngine (that was what I used when I first did 3D). If you're wanting to create a 3D rendering engine (I wouldn't personally recommend it, but it's up to you), then Google should help you out with what the algorithms actually are
How to make a Counter that counts up?
By bbwf, with 2 replies.
Last reply by bbwf, over 12 years ago:
Thanks
Get a counter to return score
By LonelyCreeper, with 1 reply.
Replied to by seelensauger, over 12 years ago:
<Code Omitted> that's how I made it in my first game i hope this is what u asked for
Really need help with multilevels
By Rockermaster, with 3 replies.
Last reply by davmac, over 12 years ago:
First: class names should begin with a capital, and method names shouldn't. So, it should be "Level1" not "level1", and "addPoint" not "AddPoint". You want to be able to call addPoint regardless of whether the world is a Level1 or Level2, right? The easiest way is to make a new world class called eg ScoreWorld. You put the addPoint method in ScoreWorld, and you make Level1 and Level2 be subclasses of ScoreWorld. i.e. in Level1, where it says: public class Level1 extends World Change it to: public class Level1 extends ScoreWorld If you like, you can override the addPoint m
Is it possible to have a smaller world on top of a larger one?
By camsterb, with 1 reply.
Replied to by Entity1037, over 12 years ago:
This is an easy. if (getX()>= getWorld().getWidth()-){ setLocation(getX()-,getY()); } The best way to do this is to have two variables for x and y movement. Example: xmove=0; ymove=0;. Then you should at the end of the script do setLocation(getX()+xmove,getY()+ymove);. For the left you would do if (getX()<= getWorld().getWidth()-). For Y, you must do if (getY() >= getWorld().getHeight()-) You get the Idea now, right? Not difficult at all
How do you create a high score display
By LonelyCreeper, with 4 replies.
Last reply by LonelyCreeper, over 12 years ago:
How do you get the scoreboard to record all the previous scores and display everything at the end?
Adding an object...
By zakariaonlyy, with 4 replies.
Last reply by zakariaonlyy, over 12 years ago:
It worked perfectly, thank you :)
Download issues
By dpatlee, with 13 replies.
Last reply by pck, over 12 years ago:
Game/maniac wrote...
just put the damaged app in the bin and download it again. That normally works for me when I get a damaged file or app
That won't help in that case, as Gatekeeper incorrectly states the app is damaged.
Greeps following paint?
By sask_girlz_rock, with 1 reply.
Replied to by danpost, over 12 years ago:
Uploading and discussing of the Greeps project is discourage on the site as it is used in competitions. Sorry, but you will have to figure this one out on your own.
Greenfoot Error java.lang.IllegalStateException
By Spgoodwin, with 1 reply.
Replied to by davmac, over 12 years ago:
The error pretty message pretty much explains the problem:
An attempt was made to use the actor's location while it is not in the world. Either it has not yet been inserted, or it has been removed.
Most likely, you've got some code which removes 'this' actor from the world, but then goes on and does something else which requires the actor's location.
Counting multiples in scoreboard
By kaciedy, with 13 replies.
Last reply by bonana, over 12 years ago:
still the font style to change... And I've got another problem with my own scoreboard. The scoreboard gets activated by actor z, whose score is not counted. The scoreboard should display the score of actor a, actor b and actor c. I tried to use a public static int scoreA / scoreB / scoreC in the classes of these actors and "actor a" + scoreA / "actor b" + scoreB / "actor c" + scoreC as a string in the scoreboard class, but it always shows a score of 0. Does anyone know how to fix it? (I'm sure you do ;-) )
894
895
896
897
898
899
900
X