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
Making Variable names
By kiarocks, with 14 replies.
Last reply by actinium, about 13 years ago:
Just posted a connect 4 in progress scenarios that uses buttons the way you want, i put the code up , the squares on the board are effectively buttons. The buttons light up when the mouse moves over a particular legal square and when you click on a particular square a coin is placed in the square.. Note also when you enter a coin the square above that coin becomes active.
Help With Greeps
By carterfootball, with 2 replies.
Last reply by mik, about 13 years ago:
Let me just say again, though: Please don't post full source code here for the Greeps competition. It's a competition that is run regularly in many places, and the whole point is that you do this yourself. If you post all your code here, you are making it too easy for others to just copy your code. So, it's okay to discuss ideas, strategies an options, and to get general help on solving your problems, but please no posts of full source code for this one. Thanks.
Help please
By jmlisowe, with 6 replies.
Last reply by AwesomeNameGuy, about 13 years ago:
Well I was re-reading my origonal post and I guess I could be more clear. Basically, whenever you have a variable that refrences an object, like Actor NewActor; the compilor thinks that NewActor is an Actor Object, and will only allow you to call Actor methods on it. Now, if the method is overridden (like act() for example), the Java Virtual Machine will call the correct act method, (the one from the subclass), so you don't have to worry about the program calling the correct overridden method, but what you can't do is call any methods that Actor doesn't have with that NewActor in your code or
adding walls
By ardwennem2, with 1 reply.
Replied to by danpost, about 13 years ago:
use 'if (getOneObjectAtOffset(0, 10, Wall.class) != null) { return true; } else { return false; }' or just 'return (getOneObjectAtOffset(0, 10, Wall.class) != null);' BTW, walls usually have an X offset, not a Y offset. But if your walls are below your Actor, the above code should work. If they are actually walls located to the right (or left) of the Actor, along the x-coordinate, just adjust the code above.
How-To Obstacle?
By aka_Francis, with 3 replies.
Last reply by mjrb4, about 13 years ago:
This simple scenario I knocked up a while back to demonstrate how to achieve smooth movement with obstacles may help - the source is available there of course. http://www.greenfoot.org/scenarios/524
I need help please.
By cphizzlemunizzle, with 20 replies.
Last reply by mjrb4, about 13 years ago:
Royalblue64 wrote...
Is this a real method? isEmpty?
It definitely is!
PicoBoard and Greenfoot
By brian, with 4 replies.
Last reply by mjrb4, about 13 years ago:
There's no error checking in the spec that I can see, so that rules that one out. At this stage unfortunately I'm really not sure, and we can't really fix the problem since we can't reproduce it. If you have any more information though feel free to pass it on.
why not have code auto-completion function?
By winnerpig, with 6 replies.
Last reply by winnerpig, about 13 years ago:
Thanks! I know now!
Dynamic resolution; Re-calling the super() constructor
By darkmist255, with 3 replies.
Last reply by nccb, about 13 years ago:
Bourne is right: the only way to change resolution is to use Greenfoot.setWorld to switch to a new world with a different size. The Greenfoot window will grow if needed to fit the new world, although it won't shrink again if the world gets smaller.
Tutorial from beginning to END
By mygreenfoot, with 1 reply.
Replied to by nccb, about 13 years ago:
What do you mean by beginning to end? Greenfoot has no end, you can make all sorts of advanced scenarios. No system has a complete tutorial; the tutorials on the Greenfoot site are intended to help you get started, and there's also the Greenfoot book if you're interested in a longer introduction to Greenfoot.
Teach Greenfoot to a 11 year old
By Harinder, with 7 replies.
Last reply by kiarocks, about 13 years ago:
Is there going to be more? since its been 3 years I wouldn't think so
falling
By sar3323, with no replies.
how can i get when played an object to instantly fall?
I need help understanding if(player != null)
By RM6442, with 12 replies.
Last reply by bourne, about 13 years ago:
I have never used the method deriveFont But in the line pic.drawString("This is an example of a font",1,20); the 20 needs to be at least about equal to the size of the font. Since this is the baseline of where the text 'sits' on. I would do something similar to: Font font = fonts.get(Greenfoot.getRandomNumber(fonts.size())); pic.setFont(new Font(font.getFamily(), Font.PLAIN, 48)); What are you needing this font for? In general purposes you wouldn't need to get all the fonts in a list. If you are looking for a "nice or cool looking" font, for a particular part of your program, I would
unusable discussion
By hlm, with no replies.
Since no discussion on google discussions, I stopped attending the discussion. I think this discussion is useless.
3D physics engines.
By Duta, with 2 replies.
Last reply by mjrb4, about 13 years ago:
If you really do want to do 3D stuff, then JBullet is a nice 3D physics engine implemented in Java. If you want to step outside of Greenfoot to do it, then IIRC JMonkey has JBullet integrated and is a nice 3D engine that's powerful and pretty easy to get started with.
1027
1028
1029
1030
1031
1032
1033
X