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 convert game's project in green foot to aplication game Windows
By Mzarifin58, with 1 reply.
Replied to by danpost, over 1 year ago:
Mzarifin58 wrote...
I have a game's project in my greenfoot. Buat i want to convert it to aplication game Windows for game exhibition assignments at my school. How to convert it?
You go by way of the '
Share
' button and choosing the correct tab.
How can i rotate an actor around another ?
By VikenPM, with 4 replies.
Last reply by VikenPM, over 1 year ago:
I already managed to fix it , thx for the support tho :D
Greenfoot 3.8.0 released, with Java 17 support
By nccb, with 1 reply.
Replied to by MrBradley, over 1 year ago:
Long awaited, much appreciated. Thank you.
How would I make a sound play til I stop holding a button
By Bobert, with 1 reply.
Replied to by danpost, over 1 year ago:
Bobert wrote...
I am new to greenfoot, and trying to make a sound sustain while key is pressed. ... make an if statement where: -If a Key is pressed and held for <1 second, loop play a sound. (or play a separate version of the sound, and maybe "if key is not pressed", Stop playing sound (dont know if its possible, maybe with sound.stop ())
Did you try this? What was your attempted codes?
how do i create a button that does one thing when clicked once then another when clicked again
By Owie2712!, with 3 replies.
Last reply by danpost, over 1 year ago:
Spock47 wrote...
Your implementation idea is correct. There are just some minor mixups: << List Omitted >>
Notes about the list: (1) The default value for
boolean
fields is
false
, so it is not required to add "
= false
" to line 11; (2) This may not be necessary if the objects created are equivalent each time. This will become apparent after moving on to (3) below; (3) The state of being "open" can be determined by a simple check, without the use of a boolean field. Note the code below:
Wall collisions messing up horizontal movement?
By TheGrrMan, with 1 reply.
Replied to by danpost, over 1 year ago:
TheGrrMan wrote...
I have collision code that works well. You can't move up or down through blocks. There's also code for walls, but whenever I enable them, moving left and right on tiles is messed up. My game is tile-based, and I don't think the code is really meant for moving on multiple tiles at a time.
Please clarify: * tile based: how is your world created? please provide the
super
constructor call line in your world constructor; if the third value is 1, then please explain what you mean by tile based. * moving multiple tiles at a time: does this mean skipping over some
How do I create a function so when I click on one character with my mouse it effects another
By Owie2712!, with 1 reply.
Replied to by danpost, over 1 year ago:
Owie2712! wrote...
I’m trying to create a side menu that appears on the screen when u click a arrow on the same side but I have tried in the world class and both the arrow and the side menu and both haven’t work what I want to happen is when I click the button (arrow) the side menu appears and the arrow moves along so u can close it again
Cannot fix unseen codes. Please provide what you tried in your world class.
How do I make My Space ship detect if there is another space ship in a certain radius around it?
By Tema, with 1 reply.
Replied to by danpost, over 1 year ago:
Tema wrote...
I want to make my actor (SoldierShip) detect if there is another type of ship nearby. I don't think I have any code that would help
The Actor class has a method to list objects within some radius of an actor. Take a look:
Actor class documentation
re PLASMA EFFECT
By ronald, with 21 replies.
Last reply by ronald, over 1 year ago:
thanks Spock47 then it works of course I make modifications to adapt the code to greenfoot I knew it was a color problem as bufferedimage does not work on greenfoot but hey you have to find the right code but I never thought of awtColor I tried with awt image bufferedimage - awtgetImage I don't even know if we can do that I didn't succeed, anyway thank you again Spock47, a new STAR TREK film in preparation or not??? I'm kidding, don't be offended
Need Help with Collision
By Outis, with 1 reply.
Replied to by danpost, over 1 year ago:
Basically, after moving, if an obstacle is touched, then move back. For example, after line 36, which moves Mario horizontally: <Code Omitted>} A bit more is involved when moving vertically when gravity is in play. See what you can do with it.
How to make something jump i am a beginner
By names, with 1 reply.
Replied to by danpost, over 1 year ago:
names wrote...
Hallo i started programming a month a go but i still dont know how to make a actor jump
Maybe the code in this scenario might help:
Jump and Run Demo w/Moving Platform
ZOOM and SPEED
By ronald, with 5 replies.
Last reply by ronald, over 1 year ago:
OK this is a hex code for 3 RGB colors and hsl are percentages of hue clarity, saturation and lightness and the color blue in hsb is h / 255, s / 255, b /255 cad (0.9f,0.5f,0.8f) approximately. I'm coming back to HSL, so it's for a color too??? I get lost a little Thanks for your help
length - width height
By ronald, with 21 replies.
Last reply by ronald, over 1 year ago:
First of all thank you for the pendulum code that's what I feared, a pendulum is moving, it's not good, it's more difficult to handle, i.e. changing size while moving... that's what I said to myself when I compared your scaling world demo scenario which is stable and a moving pendulum otherwise I thank you again
Acquiring Old Source Code to My Game
By WillyRed, with 1 reply.
Replied to by nccb, over 1 year ago:
If you shared the source code when you uploaded it, then you can download it publicly from the site. If you didn't share the source code, then you didn't share it with us, so we don't have it either. You'd have to work out the details but the only alternative I can think of is to grab the JAR and decompile it. If you go to the legacy version of the scenario, e.g.
https://www.greenfoot.org/scenarios/18225?js=false
then you can search the page source for "<applet" and find the path to the JAR then download it. That at least has
Help with external libraries
By VIad, with 1 reply.
Replied to by rdFx, over 1 year ago:
Hi, the external library is not exported. (Referring to your game as "game-jar" and to the external library as "external-jar") When you open your game-jar and view the content of it, you can actually see that your external library is missing. There are two ways (i know of) to fix this: 1. You could extract your external-jar and add the extracted folder(s) to your game-jar exported by Greenfoot. The command prompt to run your jar-file is the same as shown in Greenfoot when exporting it (because now it is actually contained within game-jar). 2. When running your game-jar via command
14
15
16
17
18
19
20
X