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
Image Color
By Hutanoi, with 3 replies.
Last reply by danpost, about 11 years ago:
You need to set the drawing color BEFORE drawing the String text on the image.
How can I adjust Greenfoot itself?
By Upupzealot, with 9 replies.
Last reply by davmac, about 11 years ago:
And what is the full name of "ibsp"?
"Incremental Binary Space Partition". The tree is not re-built from scratch each time an actor moves, but rather adjusted incrementally.
Download old scenario
By joeschmoe, with 5 replies.
Last reply by joeschmoe, about 11 years ago:
oh nevermind, I got it! thanks for your help! I needed to put in "/applet_attachments/0002/2064/greenfoot2944599267081925210.jar"
Publish Scenario
By gnvrajareddy, with 1 reply.
Replied to by lordhershey, about 11 years ago:
I have never seen that happen. If you are using the same computer to develop on as you had to make this post I could not see why the host name resolution would fail.
How many elements of a specific value in an array
By wockrad, with 1 reply.
Replied to by lordhershey, about 11 years ago:
If the array is sorted you can use a binary search to find one of the instances of the '3', then you just count up and down until you hit non-3's There will be a linear element to this and your worst case running is big O of n. If you could make you array a giant string then you could use regular expressions to find all instances of a pattern, but that would take a lot longer than the first method. You could also do this, go through the array, enter the numbers as keys in a hash table, have the value being the number of times it was seen. Then you can query the hash table (HashMap) when ever y
Text appear by pressing a button
By CaptainMorgan, with no replies.
I need to make the question then the answer appear when I press space but I'm not sure what the code is and I can't find it. Help? <Code Omitted>That's all the code I've got.
getWorld.addObject... help???
By CaptainMorgan, with 2 replies.
Last reply by CaptainMorgan, about 11 years ago:
I got replaced getWorld and forgot to change it back, but yeah thanks. It works now
rotating image is broken?
By vtn2@calvin.edu, with 3 replies.
Last reply by davmac, about 11 years ago:
Huh... those image links didn't seem to work
The problem is that you linked to the imgur page for the image, and not to the image itself. The correct URLs are: http://i.imgur.com/aJlKvIC.png http://i.imgur.com/72h1Mea.png Which look like this: <Image Omitted> and <Image Omitted>
Clear World
By programmer22, with 2 replies.
Last reply by danpost, about 11 years ago:
The different approach would be to make your menu out of a different world class and then set it as the active world.
Making an extra level or getting the current to reset
By 11frendash, with 2 replies.
Last reply by 11frendash, about 11 years ago:
ok cool, i will try these interesting methods. i am obvously a beginner to you guys, haha
Ending a programme
By 11frendash, with 24 replies.
Last reply by 11frendash, about 11 years ago:
yeah ok seems to be working, also if it works it stays. thats my boring motto, hahaha
stuck again
By FootLongTurkey, with 3 replies.
Last reply by danpost, about 11 years ago:
Please supply the error message you are getting (copy/paste into your post). I have a feeling (though I cannot be sure) that it may be that there are no 'MyActor' objects in the world and you are getting an IllegalArgumentException' error when trying to 'get' a non-existant element from the existing list. BTW, the list will ALWAYS exist; it just might be empty of elements.
adding a functional scoreboard
By SkyLordAkash, with 3 replies.
Last reply by 11frendash, about 11 years ago:
oh ok, how did you fix it? post the programme
Falling Blocks
By TallMidget, with 3 replies.
Last reply by CooliMC, about 11 years ago:
No Problem :D
Help add a scoreboard
By zachfreeman, with 7 replies.
Last reply by geoffreyguilcapi, about 11 years ago:
import greenfoot.*; // (World, Actor, GreenfootImage, and Greenfoot) import java.awt.Color; import java.awt.Font; import java.util.Calendar; /** * The ScoreBoard is used to display results on the screen. It can display some * text and several numbers. * * @author (your name) (Geoffrey) * @version 1.0 */ public class ScoreBoard extends Actor { public static final float FONT_SIZE = 48.0f; public static final int WIDTH = 400; public static final int HEIGHT = 300; public ScoreBoard() { this(100); } /** * Create a
669
670
671
672
673
674
675
X