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
No Compile button
By KHeroux, with 1 reply.
Replied to by danpost, over 3 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 3 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 3 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 3 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 3 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 3 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 3 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
Using getWorld() method to remove Actors from World
By Ronan444, with 3 replies.
Last reply by Ronan444, over 3 years ago:
Actually, never mind I managed to fix it, thanks alot for your help @danpost
My breakout scenario is not removing the first row of my bricks
By SportingLife7, with 1 reply.
Replied to by Super_Hippo, over 3 years ago:
Try to remove the brick from the ball class and remove all code inside the brick class. It’s never good to have intersection checks in the classes of both objects which intersect with each other.
I'm trying to add a "superbody", please help?
By SportingLife7, with 6 replies.
Last reply by SportingLife7, over 3 years ago:
thank you @danpost, that makes sense. Thank you for your help :)
trying to make a rythm game like fnf, how could I do that?
By marvin1, with 6 replies.
Last reply by marvin1, over 3 years ago:
ah alright I will try make some code with this example and then come back to say if it worked just to keep updated
I'm trying to make a random letter generator that displays until you press that letter.
By ROKONDA, with 1 reply.
Replied to by danpost, over 3 years ago:
ROKONDA wrote...
I'm trying to make a typing game where it gives you a random letter, you press it and it gives you another letter. If you press the wrong letter on your keyboard an actor(let's call it vaccuum) moves forward and the letter that you have to press dosen't change. I would like to make this letter counter show above your main actor( let's call it cat).
What have you tried? Show attempted codes (which should be in subclass of
World
)..
projectiles, collision and basic enemy code
By Dinklberg, with 2 replies.
Last reply by Dinklberg, over 3 years ago:
alright, i'll check it out. thanks for the help!
language of greenfoot
By ney, with 3 replies.
Last reply by Spock47, over 3 years ago:
I want to clarify that I posted my response above only minutes after the question was asked (some hours before Super_Hippo's response). However, the post got held back due to checking it for spam (seems that a link to the greenfoot website triggers the spam alarm). That's why there is now an additional answer shown despite Super_Hippo's answer already being completely sufficient. Live long and prosper, Spock47
java.lang.NullPointerException while trying to put objects in different locations
By TIM187, with 1 reply.
Replied to by Super_Hippo, over 3 years ago:
“getIntersectionObject” returns an intersection actor. If there is no Rightplayer actor intersecting the actor this code is in, it will return null. (Since the two paddles will probably never intersect each other, it will always be null.) The error occurs because you call “setLocation” on null.
47
48
49
50
51
52
53
X