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 create a scrolling world
By HarrisonCate, with 1 reply.
Replied to by Game/maniac, over 4 years ago:
Danpost has made a really good tutorial for scrolling worlds here: https://www.greenfoot.org/scenarios/18226
isKeyDown workaround?
By ShadowJL, with 5 replies.
Last reply by ShadowJL, over 4 years ago:
Thanks, jumping works fine now.
Not landing correctly (platformer)
By CreatorMoon, with 14 replies.
Last reply by CreatorMoon, over 4 years ago:
After adjusting a few things (and removing the "+2" after myHeight in line 11) your method worked perfectly! Thanks danpost and RcCookie :D I'm having an issue with another part of the game, but I'll make a separate discussion for it.
How to reference a variable define in world to other class
By Jemy2, with 2 replies.
Last reply by Jemy2, over 4 years ago:
Super_Hippo wrote...
It is private and static. Private means that you can’t directly access if from outside the class. Static means that it is a variable for the class and there is not an individual variable for each object of the class. The name of the variable suggests that it would be a final variable which is only defined once and never changed, but it doesn’t have the keyword. To access the variable from somewhere else in its current form, you need a public method in the same class – often called a “getter”-method. <Code Omitted>
How to Make Object Blink When It Collides With Another Object?
By 27WhiteLighters, with 4 replies.
Last reply by 27WhiteLighters, over 4 years ago:
Risen wrote...
27WhiteLighters wrote...
@Risen The code you posted does not work, because under line 27, Greenfoot gets an error saying "cannot have 'else' without 'if' or something like that. Sorry I could not reply, my power went out, but thanks for trying! You actually gave me a few ideas, but I'm still open to suggestions.
Sorry, my fault. Swap lines 25 and 26
Yes, It works now! Thanks! Again, my power turned off again hence the late response..
Error Message on Published Game
By ItzLukeStorm, with 4 replies.
Last reply by ItzLukeStorm, over 4 years ago:
Ok, thanks
Getting random choice without repetition
By Roshan123, with 2 replies.
Last reply by Roshan123, over 4 years ago:
danpost wrote...
Basically: <Code Omitted>
Got it!!! Thanks for
Java Professional
By adnanatif, with no replies.
Is anyone willing to be commissioned to create a digger game similar to pacman? Karas world. If anyone is actually serious message me
Setting up Greenfoot in IntelliJ
By Game/maniac, with 2 replies.
Last reply by Game/maniac, over 4 years ago:
WE'VE FINALLY FIGURED IT OUT! Documentation coming soon...
Remove Object atWorldEdge()
By Gallier, with 4 replies.
Last reply by Gallier, over 4 years ago:
I got it. I dont write it in the act() command :(
improvements for movement code; how to fix if you keep hold space you dont fall down
By PetrusderEchte, with 1 reply.
Replied to by RcCookie, over 4 years ago:
You may want to specify
how
you want your code to be improved. Here are some semantic and naming convetion like improvements:
In
Spielwelt
, both zellenGroesse and backgroundMusic and in
Jumper2
GRAVITY are never changed and not instance-dependent. Therefore, Both of them may take the modifiers <Code Omitted>As they are static and final, you should name them in upper case only, so
zellenGroesse
->
ZELLEN_GROESSE
.
In
Jumper2
, all variable names and classs names are in english. In
Spielwelt
ho
how to make an infinite world / endless runner
By PetrusderEchte, with 1 reply.
Replied to by RcCookie, over 4 years ago:
Basically the idea behind a moving background is to to have an actor with the background image that moves constantly to one side and if it reaches the edge it moves back to the other side. You can refer to this code I once wrote and tested for this
discussion
.
Remove Class from Actor, when isTouching an Object
By Gallier, with 1 reply.
Replied to by RcCookie, over 4 years ago:
You need to specify an instance to remove, not the whole class. You have two options: Replace the statement inside the if block with <Code Omitted>This method does exactly what the if statement with the code above does.
Delay/Wait/Sleep Command - I want 5 sec pause between 2 commands
By Gallier, with 2 replies.
Last reply by Gallier, over 4 years ago:
Yeah it works. Thanks
UserInfo not working
By Ned, with 3 replies.
Last reply by Ned, over 4 years ago:
Thanks!
73
74
75
76
77
78
79
X