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
Actor going through objects from underneath (Help pls)
By Axcess_Ha, with 8 replies.
Last reply by Axcess_Ha, over 4 years ago:
Thanks Danpost! I ended up changing it up while I was waiting for a response but I have a new question now, for which I'll post as a new discussion. Please check it out whenever you can! :)
Making double break bricks
By SportingLife7, with 2 replies.
Last reply by danpost, over 4 years ago:
Another way is to place multiple bricks at the same location (to act as "one brick" with multiple hit capability) -- one actual brick for each time the "one brick" is to be hit. Then, simply (in
Ball
class): <Code Omitted>The first line is to "reduce the health"; the second line is to rebound off a still existing brick (though, just not the same one). The code for bouncing off a brick is to be put in the new method,
bounceOffBrick
. This will actually require nothing but
how to make a jump last longer
By cake_9098, with 4 replies.
Last reply by danpost, over 4 years ago:
cake_9098 wrote...
if i lower it to a negitve, gravity then works in the opposite direction.
There are two ways to make your actor stay in the air longer. One is just to make it jump higher. The other is to lower the effect of gravity while maintaining it as a positive value. Here, you will have to decrease the jump force to compensate for the change in height achieved. Since you cannot keep gravity positive by decreasing the
int
eger value of one, you will need to start using partial pixel values. This is done by tracking and using the location coordinates of the actor as ei
How to add a random object while the game is running
By Nufaralbu, with 3 replies.
Last reply by danpost, over 4 years ago:
Nufaralbu wrote...
And how do I move the leaf to a new location? Is there a function?
Get a reference to the eaten leaf. Next, get a random
x
and a random
y
. Then, set a new location (x, y) for the referenced leaf.
When it reaches zero
By SportingLife7, with 4 replies.
Last reply by SportingLife7, over 4 years ago:
Thank you for the guidance, i figured it out, sorry I forgot to say thank you before.
Is it possiple to build a Flipper / Pinball game with Greenfoot?
By Flipper3000, with 1 reply.
Replied to by danpost, over 4 years ago:
Flipper3000 wrote...
is it possible to build a flipper Arcade Game in Greenfoot?
There is no reason why it cannot be done in greenfoot.
Help Turning My Race Car
By Horizon, with 7 replies.
Last reply by Horizon, over 4 years ago:
thanks again so much dude
Needing greenfoot package for use of GreenfootImage in BlueJ
By dcs15, with 1 reply.
Replied to by RcCookie, over 4 years ago:
It doesn' just work like that - there's a lot more to Greenfoot than the "greenfoot" package. I have made
a tutorial
how to run Greenfoot scenarios in IntelliJ, a widely used Java editor. Maybe that helps you, it will at least give you an idea about how much there is to do. If you are still interested, there are probably ways to run Greenfoot in BlueJ, but it would be quite complicated for sure. Also, Greenfoot actually IS BlueJ under the hood and has the exact same editor, so I don't know what you are trying to achieve here. I
No Compile button
By KHeroux, with 1 reply.
Replied to by danpost, over 4 years ago:
KHeroux wrote...
I dont see a compile button on my Greenfoot.
Newer versions of greenfoot auto-compile. At the bottom of your class editor, you should see a message. "No syntax errors" will should if the class appears fine to the compiler; otherwise, "Errors found." will display and the location of each will be flagged with a red line number and a squiggle line under problem text (or near it). Hovering the mouse of the squiggle line will pop up a message on the particular error found there. Also, any classes with errors with be diagonally striped in the classes window frame. If a
Help with platform game!
By cake_9098, with 1 reply.
Replied to by danpost, over 4 years ago:
Make sure your platform images do not have any excess transparencies in them. The player is considered "on" a platform if it touches any part of the image of the platform, including any transparent part of the image. Neither should the image of the player have any excess transparencies.
File opening not working
By tomzz, with 1 reply.
Replied to by RcCookie, over 4 years ago:
Copy the folder onto your local disk and extract it if it is a zip.
Hi i am programming a game for school project
By pascal2233, with 2 replies.
Last reply by danpost, over 4 years ago:
pascal2233 wrote...
java.lang.ArrayIndexOutOfBoundsException
Your
for
loops are set to iterate twice the length of the array. Meaning, you are creating more
Track
objects than the array can hold. That is, your array length is 68880 and you try to place 137760 Track objects in that array. It can't be done. Hence the error once your loop counter reaches 68880, since the last element is indexed at 68879.
How can i generate each brick in a sequence when the run button pressed?
By SportingLife7, with 7 replies.
Last reply by SportingLife7, over 4 years ago:
Thank you @danpost, its working better now. :)
(Shield Recharging) Been stuck on this one problem for 4 hours
By SilverCS, with 2 replies.
Last reply by SilverCS, over 4 years ago:
Thanks man, you carry this site
Act Cycle Keeps Adding Object Over And Over
By SilverCS, with 2 replies.
Last reply by SilverCS, over 4 years ago:
Thanks so much, I used 1 health for each player and used a switch and it cleaned up my code (and performance) by sooo much
48
49
50
51
52
53
54
X