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
Urgent
By Avik, with 3 replies.
Last reply by Gevater_Tod4711, about 13 years ago:
Then you should set the location of the coins to the other edge of the world: <Code Omitted>
What Was Your First Game?
By JetLennit, with 7 replies.
Last reply by GreenGoo, about 13 years ago:
My first game, without using Mik's tutorials, was a very simple game where some turrets shot at a car which the player controlled.
Java Heap Space - delete background image
By Ragtime, with 4 replies.
Last reply by Ragtime, about 13 years ago:
I will try to make some improvements. Thanks.
Help for Rudi
By Kartoffelbrot, with 4 replies.
Last reply by GreenGoo, about 13 years ago:
My blobfish? It might be, I don't know.
Animation
By Gzuzfrk, with 1 reply.
Replied to by Gevater_Tod4711, about 13 years ago:
If you use the modulo operator (%) that will help. E.g. <Code Omitted>
Key Pressed
By Gzuzfrk, with 1 reply.
Replied to by Gevater_Tod4711, about 13 years ago:
You have to add an else part after your if statement. If this else part is executed you set everything back to normal: <Code Omitted>
Multi Worlds problem
By geekykid2013, with 20 replies.
Last reply by danpost, about 13 years ago:
I think the problem was your 'checkOut' method. Try this: <Code Omitted>
WHATS WRONG
By Avik, with 4 replies.
Last reply by danpost, about 13 years ago:
There is no correct code for what you have given above. First, you are using an Object in the class that is not recognizable to the class. Second, you are using a method on an Actor object that is supposed to be executed on a World object. Finally, you have one method inside of another, which you cannot do in Java coding.
Image/ Actor issues
By GreenGoo, with 5 replies.
Last reply by danpost, about 13 years ago:
How do you know? what will tell you that it registers or not?
help
By Avik, with 3 replies.
Last reply by danpost, about 13 years ago:
You placed the code after a 'return' statement that will always execute. Therefore the snippet is actually unreachable where it is placed. The compiler was not expecting code there; hence, the error. Your 'scrollPosition' appears to change by one every act cycle. In fact, being 'scrollSpeed' is 'final' (never changes), you can change your act method to:
whats wrong with this?
By Avik, with 15 replies.
Last reply by danpost, about 13 years ago:
It what way does it not work? Are you getting an error message? if so, what does it say?
Collison Detection Problem
By geekykid2013, with 2 replies.
Last reply by geekykid2013, about 13 years ago:
Here is the code for my world import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) import java.awt.Color; /** * * The square world. The square world has Gold Eggs that need to be collected * * @author * @version 1.0 */ public class SquareWorld extends World { // private static final int GAP = 12; private Counter counter; private HealthBar healthBar; private Paddle paddle; private Robot robot; /** * Constructor for objects of class SquareWorld. * */ public SquareWorld() {
Collision Detection Problem
By geekykid2013, with 3 replies.
Last reply by geekykid2013, about 13 years ago:
Need Help with objects approaching from horizon
By Nz-Tank, with no replies.
In my game, there is a car at the bottom screen, to which object come down from a street that is narrowed. This gives the street a horizon effect. However, i can't seem to make the objects come at me from the horizon, as they are coming from all directions. I also want to collect them, but can't.
Need help smoothing out game
By programmer274, with 3 replies.
Last reply by danpost, about 13 years ago:
For any class you want to have a delay in, add the following: <Code Omitted>Then, enclose the action(s) that you want not to happen for a certain amount of time within an 'if' block using: <Code Omitted>To start (or reset) the timer, just set the value of the 'delayTimer' field to approximately sixty times the number of seconds you want it to delay for (so to delay for abo
841
842
843
844
845
846
847
X