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
How to detect whether an object exists?
By Logic_Greenfoot, with 2 replies.
Last reply by Logic_Greenfoot, about 2 years ago:
danpost wrote...
Logic_Greenfoot wrote...
I made a small game. I hope it can refresh another wave of enemies after one wave of enemies is eliminated, but I don't know how to detect whether the first wave of enemies is eliminated. I hope some kind people can help me.
Have act method of your world check for their non-existence: <Code Omitted>
omg, it works.My teacher doesn't know this at all. Thank you for your help
New at programing in Greenfoot and need a help with a timer
By Enigma321, with 1 reply.
Replied to by danpost, about 2 years ago:
Enigma321 wrote...
i need to change images after 10 seconds on a actor. Itiried delay but it works partialy becoue it stops the entire game not just the process of changing images, i need a timer to work in background so the actors and the game dont stop moving. << Code Omitted >> This is my solution to the problem but it doesnt work. if you can fix it or tell me how it would save my grade at school thanks.
You cannot run the timer in the block of code that initiates the timer. Maybe this will work:
How can I modify the data of another class in one class? How to write this code.
By Logic_Greenfoot, with 3 replies.
Last reply by danpost, about 2 years ago:
Logic_Greenfoot wrote...
In order to run this code, do I need to reference the Java library?
No.
Create border where object bounds off
By N8TH1N6, with 13 replies.
Last reply by danpost, about 2 years ago:
N8TH1N6 wrote...
I got some entities I added but when I spawn them with this code << Code Omitted >> They dont spawn in the gray area I tried to move them diagonily in the middle but dont really know how
If you know the size of the gray area, call it
gas
(for gray area size), then use: <Code Omitted>If the size of the gray area is immutable, then you can just use the value itself (instead of a variable name, which would need to be declared and set to the appro
How can I show final Score in another world?
By Bob_Rafael, with 2 replies.
Last reply by Bob_Rafael, about 2 years ago:
Nice, it works thank you
I am having problems with my game loading on greenfoot.
By Craby006, with no replies.
When I am editing it it works fine but when I publish it assets are missing and it lags. I don't know if it is the subclasses or not or some other hidden issue.
Creating a "choose your fighter" screen
By blueGreenYellow073, with 1 reply.
Replied to by Spock47, about 2 years ago:
Yes, a solution where the player can choose her/his type of ship in a second world called Shop can be found at https://www.greenfoot.org/topics/64967/0 You can use it, you just have to use (rename) Shop/MyWorld as your StartScreen and instead of „Ship“ types you want to have „Fighter“ types. Live long and prosper, Spock47
my game is laggy only the the greenfoot website
By moltenmaster, with 6 replies.
Last reply by danpost, about 2 years ago:
moltenmaster wrote...
Excuse me, were you able to find out the source of th lag?
It may be that all the songs being loaded at one time is slowing things down a bit. Try using the String names of the songs in your code and load one at a time as needed, letting the previous one be dismissed (no references to it remain).
How to run my project on NetBeans
By SliceOfCheese, with no replies.
I readed the documentation on how to do it, and all good until the part where I specefy how to run the project, I have in there exactly what the documentation says, but still, when I press run, it does not find anything to run, so I have no way of playing my project. And I need it to be on neatBeans, since Im using a data base. Please help, I have to send this proyect in less than 16 hours, and I dont know what to do :( Thanks in advance.
How to remove a text after some time
By Eugalp, with 1 reply.
Replied to by Super_Hippo, about 2 years ago:
Try to use "" (empty String) as the text on the same location to make the previous text disappear.
Is it possible to use something like a Playstation or Xbox controller within Greenfoot
By Eugalp, with no replies.
I want to make a game where multiple entities can be controlled at the same time aka have multiple people playing and I was wondering if it was possible to make a Playstation or Xbox controller work within Greenfoot?
Adding object
By N8TH1N6, with 6 replies.
Last reply by N8TH1N6, about 2 years ago:
N8TH1N6 wrote...
danpost wrote...
N8TH1N6 wrote...
the first one is in the "MeineKrabbe" class wich is in actor
Okay, but lines 3 through 24 appears to be game control code which is not something any crab has any business doing. That implementation should be in your game world
act
method. Also, as coded, it appears that the pause menu and exit button will only be in the world for one act cycle. That is, once placed in the world and the "r" key is found to not be down, they will be removed. You would have to have the "r" key down when pressing the "escape" key to see those actor
How to connect SQLite with Greenfoot
By SliceOfCheese, with 5 replies.
Last reply by SliceOfCheese, about 2 years ago:
I Solved it, yay! The thing is that instead of going to properties - libraries - modulePath and add the libraries, you just gotta open the library folder on the project, right click, add jar files, and add (in my case) C:\Program Files\Greenfoot\lib\greenfoot.jar and C:\Program Files/greenfoot/lib/bluejcore.jar That solved the problem for me, now the only problem, is that the main class wont run, because according to net beans, theres none, jajajaja.
Convert Greenfoot jar to exe so my friends can play my games.
By Tidali, with no replies.
Heyho Greenfoot community, Can I convert my exported jar into an exe with launch4j and then start it on other windows (or apple?) devices? Meaning you wouldn't get the Greenfoot UI, just a game like every other game. Or do I have to learn to use like Unity to develop "normal" games? I am always welcoming german answers aswell, thanks in advance!
trying to make a game over screen
By RHMU, with 1 reply.
Replied to by danpost, about 2 years ago:
RHMU wrote...
I have a game over text but I am trying to make it so when a timer gets to 90 seconds it appears. << Code Omitted >> it says that the addObject "int cannot be differenced and the (timeCount == 90) is says bad operand types for binary operator << Code Omitted >>
Line 19 declares
myWorld
as type
int
, yet line 60 uses it as a non-primitive type (not
int
, as used at the beginning of the line, at least). Plus, there are too many parameters used in the
addObject
command on line 60.
26
27
28
29
30
31
32
X