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
problem with installing kinect on windows 8
By shiavdeepthi, with no replies.
Hello, I am not able to install the files listed on the site to support kinect.In the list there are 4 files . When i try to install the first one C++ redistibutble(x86) its says that my system already has an updated version of it so its not installing that When i try to install OPEN NI frame work(2nd one)---It gives me a error saying that problem with windows installer package. Am i not able to install any thing.Is it that ,its not compatible with windows 8.If yes,can i install kinect windows SDK and work green foot Can anybody help me out in resolving this and install kinect drivers listed on the website.Its very much urgent. Thanks, deepthi
Can someone help me with this code from an old game?
By RagingAsian, with 2 replies.
Last reply by danpost, over 12 years ago:
There also may be a problem with the last 'else if' conditions of both 'if' segments. It would appear the condition is not checking the proper direction for the movement (the '-1's possibly should be '1's).
No. That is not what was funny about it. It is not quite right and I cannot yet describe what it is. I think it is just the use of the same condition in the last two 'else if's in each 'if' segment. I think the following will do the same thing, but looks better:
Removing an actor at the same time another actor is removed
By patrick26, with 10 replies.
Last reply by danpost, over 12 years ago:
Ok, try this. In your Enemyfireball class, add the following method <Code Omitted>Then, change both 'setLocation' lines in your 'plant' method to this: <Code Omitted>
making sound
By nona, with 8 replies.
Last reply by danpost, over 12 years ago:
You can go to
The Greenfoot Book
page and at the bottom in the middle section 'For students', the second item 'The Book Scenarios' will download those scenarios the are used in the book. The 'chapter02-04/Little-Crab' scenarios have the 'slurp.wav' sound in them.
A910
By cropper, with 3 replies.
Last reply by martinherman, over 12 years ago:
:)
Problem with pool game and moving ball
By concistency, with no replies.
I've been struggling with trying to get my cue ball to move in this pool game, my professor gave me a "empty shell" and calculations in order for it to work, but I can't seem to get the ball to move on the click, the cue ball is suppose to move towards the mouse click based on the calculations he gave (don't have to use turnTowards), here is what I currently have in the Ball.class, here is some of my code from the Act call: **I GOT IT**
Using input from user to change an image
By stefi, with 8 replies.
Last reply by stefi, over 12 years ago:
Thank you!!:)
Problems with moving in an uploaded scenario
By jogit666, with 4 replies.
Last reply by jogit666, over 12 years ago:
Yes, I realized. And never mind, it works on a different computer, I guess its a mac/safari problem.
Movin to a Target in ONE Straight Line.
By tobias1798, with 1 reply.
Replied to by danpost, over 12 years ago:
Take a look at my
Radial Graphs
scenario. It will show you the possible direction (angles of movement) that are possible with different speeds of your actor using 'move'. To move in a straight line, you would either have to track the location of the actor using 'double' values (like the SmoothMover class does) or you can hold the initial location coordinates in fields and use a counter to move the new distance from the original location, with code similar to the following:
Specrtometry: Converting Pixels to Spectrum
By Mkheo, with 1 reply.
Replied to by davmac, over 12 years ago:
A google search on "rgb to spectrum" showed some interesting-looking results so you might want to try that. Note that you can't convert all RGB combinations into a single wavelength, because some colours are made up of more than one frequency of light.
Animal class
By nona, with 2 replies.
Last reply by nona, over 12 years ago:
danpost wrote...
Use the menubar and select "Edit>Import class...", choose 'Animal' and click the 'Import' button. Then change what your Actor subclass extends to 'Animal'.
thank you
Is their a way to transfer health from one world to another
By kzg0015, with 1 reply.
Replied to by danpost, over 12 years ago:
What is the code you used to create and set the new world active?
Pattern not work Help!
By NINJAGO_KAi, with 7 replies.
Last reply by NINJAGO_KAi, over 12 years ago:
once again thank you danpost
Detecting a certain number of hits
By patrick26, with 2 replies.
Last reply by danpost, over 12 years ago:
Instead of detecting the Plant object from within the Fireball class, detect the Fireball objects from the Plant class and put the counter there (since the counter represents the 'health' of the plant). Anyways, by having it in the Fireball class as a non-static field, each fireball object set its field value to zero, increments it to one when intersection occurs, and then the fireball is removed, which makes the fireball and its fields destined for garbage collection.
Ping Pong
By vdk, with no replies.
I'm making a kind of pingponggame and I want that if the computer or the player has a score of 5, game over appears. This is my code for my counter... import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) import java.awt.Color; public class Counter extends Actor { public LeftBat linkerbat; public RightBat rechterbat; private static final Color defaultColor = new Color(255, 255, 255); private int count_score = 0; public void act() { setImage(new GreenfootImage(linkerbat.getScore() + "-" + rechterbat.getScore(),30,Color.BLACK,null)); gameOver(); } public Counter(LeftBat lb, RightBat rb) { linkerbat = lb; rechterbat = rb; } public void gameOver() { if ( if (count_score ==5) { Greenfoot.stop(); } } }
699
700
701
702
703
704
705
X