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
pause, resume, and exit button
By no_name2, with 3 replies.
Last reply by danpost, 11 months ago:
In fact, the act method could be refactored:
Garden Project Help
By Philipe_Manor, with 1 reply.
Replied to by danpost, 11 months ago:
Remove line 6. Remove line 24 (or add a double slash to the beginning of the line to comment it out).
How to make text appear
By Philipe_Manor, with 1 reply.
Replied to by danpost, 11 months ago:
Philipe_Manor wrote...
Hello friends, how do I make text appear on my project?
The quick an easy way is using the
World
instance method of
showText(String, int, int)
method. However, it is very limited as to size, font and color (only one). To open up different sizes, fonts and colors, you would need to create an actor and draw a GreenfootImage of a String onto its image: With an Actor subclass of: <Code Omitted>(yes, that
World Works in Greenfoot App But Not On Website
By pikitty314, with 1 reply.
Replied to by pikitty314, 11 months ago:
I fixed it! Turns out the website doesn't support PriorityQueues (so I more or less made mine an ArrayList)
World Management
By thinud.bothma@reddam.house, with 2 replies.
Last reply by thinud.bothma@reddam.house, 11 months ago:
Thank you! work very well.
Need help making a button
By no_name, with 3 replies.
Last reply by danpost, 11 months ago:
no_name wrote...
i got it to work, thank you for replying though. What do you mean by if it is not under another actor. Are you talking about the side panel to the right and the ordering of the actors?
I was talking in general. If any actor (invisible or not) overlays (on top, in ordering) the actor in question, the overlaying actor will get that click instead.
"Open in Greenfoot" isn't available anymore
By GabeC, with 1 reply.
Replied to by danpost, 11 months ago:
GabeC wrote...
Whenever I try to use the "Open in Greenfoot" button to get anyones game to run in the Greenest app, it works. But when I try to do the same with my project, the button isn't there.
When you upload a scenario, you have the option to "Publish source code". If you do not check that checkbox, you will not see the green "Open in Greenfoot" button on your scenario page on the site.
Changed image and now it won´t move
By Sonicc3, with 1 reply.
Replied to by danpost, 11 months ago:
Sonicc3 wrote...
I´m doing this for a school project so I have absolutely 0 knowledge. I simply changed the image of my class, however it won´t move, even though it moved correctly before and I´m not sure why. It says there´s no errors as well
Please show class codes for object in question.
This is spawned when an enemy is killed. This code lags in HTML5 for 0.5 seconds but not when run locally. Gifs do the exact same thing. Is it possible to fix this online?
By Zacy0, with 1 reply.
Replied to by danpost, 11 months ago:
This is spawned when an enemy is killed. This code lags in HTML5 for 0.5 seconds but not when run locally. Gifs do the exact same thing. Is it possible to fix this online? Try having the images pre-loaded instead of loading them when the actor is added into the world.
How do i compile greenfoot to .JAR?
By Gooberchicken, with 2 replies.
Last reply by Zacy0, 12 months ago:
Unfortunately, it is no longer possible in recent versions. However, most scenarios work a few versions back. Just download an older version of greenfoot (v26 iirc) and use the share button.
HTML 5 Translation
By MrParakeet25, with 6 replies.
Last reply by MrParakeet25, 12 months ago:
danpost wrote...
MrParakeet25 wrote...
As a test I uploaded a scenario of a single ant being instanced and nothing else and that still resulted in an HTML5 issue, so it it the computer?
Maybe you should have left it up here for us to look over. Start simple and work up gradually to pinpoint where the problem begins. That is, start with no sound files, limited images and minimal code to get going. Share it to see if it uploads correctly. If not, it may be your computer, your version of greenfoot, or who knows. It loads, maybe add ONLY one music file and test it again. Then continue b
Artificial Inteligence
By CowboyIggy, with no replies.
I am creating a Chess game and would like to make the player vs computer option, but I don't have any idea how to create an Artificial Inteligence to play Chess. Sure using a lots of 'Ifs' wouldn't be the best way... Someone has any ideia or a link for some discussion that could help me in that way? I didn't try any code yet also, if I try in the next days I upload it here in this discussion.
Feedback on Game Request
By EPayne, with 2 replies.
Last reply by EPayne, 12 months ago:
Thanks danpost! That totally explains why the cows weren’t spawning — I had no idea the timer reset was messing with the later condition. I’ll go fix that now. Also, just wanted to say I haven’t been on Greenfoot for long, but I’ve already noticed how active and helpful you are. Your replies are quick, spot-on, and actually help people level up their code. Big respect — keep doing your thing!
Hame a litt error
By Punithan35, with 2 replies.
Last reply by Punithan35, 12 months ago:
Super_Hippo wrote...
Try to use fillOval instead of filloval.
it works
why my class just disper
By Punithan35, with no replies.
so when i was makeing a game called BINGO game i left and the next day my number class just disper i dont konw why it disper and the text only ther is like gliched text i cant past to show the text my 10 hours of non.stop coding went wast
1
2
3
4
5
6
X