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
HTML5 Translation
By RM11, with 1 reply.
Replied to by danpost, about 23 hours ago:
RM11 wrote...
In both projects of my students the attempted translation produced the following diagnostic messages: INFO: Running TeaVM << Links Omitted >> The code they wrote is super simple, images are in the image folder and there is just one sound. So is there anything I else I could do?
I would first remove the sound file and try uploading again. Beyond that, there is not much more to offer as the source codes are not available to us. Maybe upload them again, but with the '
Publish source code
' checkbox checked.
Exam
By IaDaH, with 1 reply.
Replied to by danpost, 1 day ago:
IaDaH wrote...
I'm new to greenfoot, live in belgium and I'm going to have an exam about it tommorow 10am(Belgium time), but i really don't understand java. is their someone who is willing to help me?
Everything you need to know about java is in the
java tutorials
.
pause, resume, and exit button
By no_name2, with 3 replies.
Last reply by danpost, 9 days ago:
In fact, the act method could be refactored:
Garden Project Help
By Philipe_Manor, with 1 reply.
Replied to by danpost, 9 days 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, 9 days 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, 10 days 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, 10 days ago:
Thank you! work very well.
Need help making a button
By no_name, with 3 replies.
Last reply by danpost, 12 days 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, 12 days 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, 14 days 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, 14 days 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.
I hame littel eroro
By Philipe_Manor, with no replies.
Hello friends i want make a Cashew game. Mi idea es to ham a cashew moving over a nut backgroined. Yo want it to be like crossing road : ] I dont want no cross eyed game. Mi game es my own idea, so por favor don't copy. that eroro is i cant make the loser screen which es crack the nuts open. the nut on screen shuld be averaged size for a cumpoters screen but min is 2 feet and i cant make it bigger. Mi nut es tu small to cover la face. Face es too big. ples help mi por favor, los chicos. chao, Philipe : ] public class MyWorld extends World { /** * Constructor for objects of class MyWorld. * */ public MyWorld() { // Create a new world with 600x400 cells with a cell size of 1x1 pixels. super(600, 400, 1); Face smile = new Face(); addObject(smile, 370, 200); Nuts nutty = new Nuts(); addObject(nutty, 200, 200); Nut nutt = new Nut(); addObject(nutt, 390, 200); } } /** * Write a description of class Nut here. * * @author (your name) * @version (a version number or a date) */ public class Nut extends Actor { /** * Act - do whatever the Nut wants to do. This method is called whenever * the 'Act' or 'Run' button gets pressed in the environment. */ public void act() { if(Greenfoot.isKeyDown("right")) { move(20); } } }
How do i compile greenfoot to .JAR?
By Gooberchicken, with 2 replies.
Last reply by Zacy0, about 1 month 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, about 1 month 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.
1
2
3
4
X