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
Generating Random Color and Brightness
By theDoctor, with 3 replies.
Last reply by DonaldDuck, over 14 years ago:
Just to add to this, you can assign an alpha value to your new color. The color constructor new color(float r, float g, float b, float a) does this. Greenfoot.getRandomNumber returns an int, but it should be converted to a float in the color constructor. If not, it's an easy fix. Change your color constructor to this. <Code Omitted>
platform game
By craigv, with 1 reply.
Replied to by Duta, over 14 years ago:
Have a look at http://www.greenfoot.org/scenarios/3767 - that's how I do it
How to edit a variable of another class
By Oneshot, with 3 replies.
Last reply by Duta, over 14 years ago:
:L I didn't know that, having never read the documentation myself... looks useful though
Unlimited random placing of objects
By Oneshot, with 14 replies.
Last reply by Oneshot, over 14 years ago:
//
Vector and smoothmover support classes where.
By Mikeson, with 1 reply.
Replied to by davmac, over 14 years ago:
I'm not sure what lead you to think that "Vector" would be renamed to "Explosion" - no, the classes have not been renamed. You can find the original SmoothMover and Vector classes in the
asteroids
scenario.
Greenfoot and Kinect
By Darklighter, with no replies.
Hi im trying to run the kinect greenfoot SDK but i cant get past running NiUserTracker everytime i do it just comes up with One or more of the following nodes could not be enumerated: Device: PrimeSense/SensorKinect/5.0.3.4: The device is not connected! I have installed everything like the guide said and my kinect is connected ive tried reinstalling and rebooting and i still cant get it to work
getColorAt method
By nooby123, with 6 replies.
Last reply by Duta, over 14 years ago:
danpost wrote...
Sorry, I saw the lack of image and went from there, without checking anything else. You know what they say, 'Never assume!'. :< You still got 50% of the fix though, so we forgive you :p
"Saving" the World
By DMCGames, with 1 reply.
Replied to by Duta, over 14 years ago:
Yes - there are probably better methods, but I use the following (I haven't got any uploaded scenarios with multiple levels, but I've made a few) method: Once you're moving on to the next level (with the setWorld(new NextWorldName()) method), pass the objects to the next world in its constructor. In other words, you'd have it like this: setWorld(new NextWorldName(getObjects(null))) and then in the NextWorldName class, you'd obviously have to modify its code so that its constructor takes a java.util.List as a parameter, and then store it. Then, when you want to go back to the first world, you
Moving an object to the Player
By Oneshot, with 2 replies.
Last reply by Duta, over 14 years ago:
Morran wrote...
If you want the zombies to move to the player, you can try something like this:
Duplicating Actors?
By Nate, with 4 replies.
Last reply by Duta, over 14 years ago:
Nate wrote...
Hey, I figured it out. Apparently that particular piece of code needed to be in the original "if" statement in order for it to work. I have no idea why that is seeing as my other buttons worked fine. Oh well.
Maybe because of what I said?
@Akuhano about Brick breaker
By danpost, with 8 replies.
Last reply by Akuhano, over 14 years ago:
Haha yeah, that's what I've been doing with it x]
Maximum scenario size for upload?
By mal, with 6 replies.
Last reply by mal, over 14 years ago:
AIFF is Apples version of WAV
new to java programming how do i add a time limit to my card memory game..
By Waynesworld85, with 3 replies.
Last reply by extremejava, over 14 years ago:
You can either use the java.util.Date class or as suggested above use the System.currentTimeMillis() approach. Both are effectively same.
Java Classpath in Windows
Long Load Times
By Morran, with 5 replies.
Last reply by Morran, over 14 years ago:
Okay, thanks.
Scoreboard
By programmer22, with 19 replies.
Last reply by danpost, over 14 years ago:
You need to be a bit more specific. Where is your counter? How is it declared? Are you trying to get the score TO the scoreboard? Usually, the score is kept within the scoreboard class, and a reference to the scoreboard is kept in the world class. That way, methods such as getScore(), bumpCounter(int), and other counter related methods can be placed there and the act method will update the scoreboard image (if the score is in view the whole game-set).
1017
1018
1019
1020
1021
1022
1023
X