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
Help with "shooting game"
By KHSquestions, with 3 replies.
Last reply by nccb, about 15 years ago:
I think your problem is: <Code Omitted> Because Domo is a BulletBill, when Player fires a Domo, the Domo still intersects the Player next round -- when the Player looks for an intersecting BulletBill. It finds the Domo and removes it from the world, so each Domo will only be in the world for one frame before it hits the Player who fired it! You want: <Code Omitted> In fact, I'd question whether you need four classes at all -- I think two will do, one player class and one bullet class. Rather than copy and paste you
How do you download a game?
By KalvinL7, with 1 reply.
Replied to by thomaswinget, about 15 years ago:
if the author has posted the source code, there will be a large "open in greenfoot" button near the top of the page. if they have not posted the source code or if they have not made it available, then I don't think you are able to download it. Hope this helps
Looking for Suggestions on Level Loading
By MrCohen, with 2 replies.
Last reply by MrCohen, about 15 years ago:
Thanks I'll check that out.
Dragging
By ClemeC, with 2 replies.
Last reply by Builderboy2005, about 15 years ago:
Whenever I make a scenario that has mouse based control, I always do something like this: <Code Omitted> That way I always have my mouse position value and button status in easy to access variables. I never understood why MouseInfo becomes null whenever the mouse does not move or do anything, wouldn
Sound loop delay
By SirFoxie, with 1 reply.
Replied to by SirFoxie, about 15 years ago:
I think the problem is that sounds in Greenfoot are streamed each time you play them, rather than loaded fully into memory and read from there on each play. So they have to buffer on every play, which causes a delay between the time you tell a sound to play, and the time you actually hear it. I dunno how to fix that, though.
Open Scenario In Greenfoot
By Builderboy2005, with 4 replies.
Last reply by Builderboy2005, about 15 years ago:
Yay ^^ I am so excited for the newest release :D Can't wait for it to come out!
Compiling Error
By musashisamurai, with 3 replies.
Last reply by davmac, about 15 years ago:
Can you post the code?
Health Bar
By roccoricciardi, with 6 replies.
Last reply by davmac, about 15 years ago:
question: if i have one actor as a subclass to its counterpart, would they be storing their health value in the same location?
No, unless you declare the field as "static", but it's best not to do that if you can avoid it (it's bad from a design point of view). However, you can solve the problem by setting the health level of one actor at the same time as you create it from the other one.
Removing Actor and Replacing it with another
By roccoricciardi, with 11 replies.
Last reply by roccoricciardi, about 15 years ago:
problem fixed, now on to debugging issues with firing cannons -___-
Jumping
By roccoricciardi, with 2 replies.
Last reply by roccoricciardi, about 15 years ago:
thanks! only issue with that is that jumpCounter remains at 20 even after the key is released, so a second keyDown check such as the following is needed to reset the count so that the actor could jump later if(!(Greenfoot.isKeyDown("w"))) jumpCount=0;
Kinect Programming
By SnowRider04, with 4 replies.
Last reply by SnowRider04, about 15 years ago:
Ok thanks.
Chess Game - Movement?
By Cubez, with 13 replies.
Last reply by Transpire, about 15 years ago:
Um, I'm not too sure about what you're trying to do, but wouldn't it be better to create an abstract class "Piece" with declared GreenfootImage blackImage and whiteImage, and then in the constructor have a blackImage and a whiteImage parameter, this way with superclass constructor chaining you can ensure every Piece will have pictures? Then, whenever the piece is moved, check the color of the square it is moving it to (again, with a superclass method somewhat like this...
getHeight method
By tamigr, with 4 replies.
Last reply by tamigr, about 15 years ago:
Thanks!
Actor Falls Through World; Cartesian Coordinates
By Transpire, with 23 replies.
Last reply by davmac, about 15 years ago:
When I say array-like, I mean that it starts with 0.
Ok - the proper name for that is "0-based indexing" (as Java arrays use), though in this case the x/y values aren't really meant to be so much indexes as they are distances from the top left cell. Regardless we could say that the co-ordinates are "0-based".
Um, you mean bounded, right?
Yes, I meant bounded, sorry.
Mouse Movement
By vittorena, with 1 reply.
Replied to by vittorena, about 15 years ago:
Oh my god. Of course nothing happens because i didnt set stepsizex and stepsizey stepsizex = xway/steps; stepsizey = yway/steps;
1054
1055
1056
1057
1058
1059
1060
X