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
is anyone dealing with cacert nonsense
By john_hackermann, with no replies.
i hate when it gives the nonexistent cacert nonsense, is this normal
creation
By zay_knight28, with 2 replies.
Last reply by TheMusteryMan, 25 days ago:
there are some tutorials on Youtube aswell
I am trying to make a kill counter but it resets every time a new bullet spawns.
By HelpAccount2, with 1 reply.
Replied to by danpost, 28 days ago:
It would help if you documented the classes with comments to indicate what each code set does. Also, it is hard to tell which counter you are referring to. The
Plane
class codes might be needed as well, since some variables seem to be defined there.
A minimal re-implementation of GF in JavaScript
By andrea270872, with 2 replies.
Last reply by andrea270872, about 1 month ago:
The link is here: http://andval.net/Greenfoot_JS/index.html
found my old scenario but now doesnt seem to work
By shindingg, with no replies.
i made a scenario as part of my college work 12 years or so ago and found some of my old papers when moving house. i was just wondering is there anyway to get this working on modern day browser or if i can somehow open the scenario in greenfoot to relive my old college days. i dont have the original files as usb got lost a long time ago so any help would be greatly appreciated. i am willing to do just about pretty much anything to get this work or if i can get the sorce code from the back end etc. https://www.greenfoot.org/scenarios/8524 any help would be greatly appreciated. thanks Stephen
why should you use getOneIntersectingObject
By Jang, with 1 reply.
Replied to by danpost, 2 months ago:
Jang wrote...
i am programming a game for school at the moment aboout kollisions and as far as i know is getOneIntersectingObject important for that. But i really dont get what de benefits are. wouldnt it not just be easier to say isTouching.
Believe me. As you continue programming, you will find how useful those other collision methods can be. They all have there benefits (and drawbacks).
Snake game
By BenBoi, with 1 reply.
Replied to by danpost, 2 months ago:
BenBoi wrote...
I am trying to make snake, but i can't seem to get the other parts to follow correctly
Provided the parts of the snake each retain which part it follows, you only need to keep the head and the tail parts in fields. Never move the "body" of the snake. When moving, replace head with a body part and move head. Then, only if not eating, remove tail piece (the tail field needs updated first to the piece the tail follows).
how do i add delay to 1 actor?
By Fat_moose, with 1 reply.
Replied to by danpost, 2 months ago:
Fat_moose wrote...
I am trying to make a healthbar but the healthbar goes down way to fast, i tried the Greenfoot.delay() but then everything slows down. Can someone help me?
The Greenfoot.delay() method will suspend all actions for the number of act cycles given as its parameter. If the touching of another actor causes the healthbar to decrease, then it is probably true that for each act the touching occurs or continues, the healthbar will decrease. My suggestion is to list objects it touches and only decrease the healthbar when an object is added to the list (and not when the object
How would i go about making an upgrade that is continuous?
By Just_a_person847, with 1 reply.
Replied to by danpost, 2 months ago:
Just_a_person847 wrote...
Whenever the world changes, how do i make the upgrade *not* reset?
My suggestion is to use
static
fields for the upgrades. They must be initialized during your initial world constructor only. Static fields are "class fields" which do not reset when a new world is created, nor when the scenario is reset. This is why they need initialized in the initial world constructor. The keyword "static" is added to the field declaration line. For example:
HTML 5 translation error ??
By won0c, with 1 reply.
Replied to by tmhscs, 2 months ago:
Try deleting all of your import statements to awt and swing in your classes. Also try deleting lines of code like "frc = ((Graphics2D)getImage().getAwtImage().getGraphics()).getFontRenderContext();" in your Score class. I think many/all awt/swing methods and/or directly accessing AWT images have no TeaVM/HTML5 translation available which causes it to fail when uploaded to Greenfoot's website. Good luck!
How do i make a scenario
By Olivenmannen, with no replies.
I want to make a scenario but i dont know why sonce im very new here
java plugin dosent work
By tactilewaryellow, with no replies.
I have the java plugin but everytime I try to use the applet version it loads java then java gives me an error. Any ideas on how to solve this or its a permanent or server bug?
Greenfoot version without stride ??
By won0c, with no replies.
I want a Greenfoot version without stride. Please make a clean, Java-only Greenfoot!!
How to display run button ??
By won0c, with no replies.
How to display run button, reset button, and speed control slider in embedded webpage?
how to post on greenfoot??
By perfectangel, with 1 reply.
Replied to by CountyVelocity, 4 months ago:
You share from the greenfoot editor. Use either Ctrl-E or Scenario >> Share.
1
2
3
4
X