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
Two balls disappearing after collision
By BlueHand, with 1 reply.
Replied to by danpost, about 5 years ago:
The
canSee
and
hit
, which is equivalent to
eat
, methods are obsolete. They have been replaced by the Actor class methods,
isTouching
and
removeTouching
: <Code Omitted>
Collision detection
By Vitalka, with 1 reply.
Replied to by danpost, about 5 years ago:
I am not a fan of the approach you have chosen to code the behavior of
FigurEng
objects. The many different collision checks make it quite complicated. On top of that, having them actually touching a stone when "on" one (see line 62) actually complicates things even more. I prefer maintaining separation from all objects and, after moving, using the direction of movement to dictate where contact was made with a colliding object. That is, if
FallSpeed
is negative, then any object would be above it and if it is positive, then below ("on ground" state can be determined here, as
Background Sound
By ronald, with 2 replies.
Last reply by ronald, about 5 years ago:
thank you well seen, I did not watch out
How to make a door
By TheGalaxysWolf, with 3 replies.
Last reply by RcCookie, about 5 years ago:
So then you just need two images, one showing the closed door and the other one the opened one. Then to open the door you just have to set the other image.
How do I make an Actor follow?
By XApple15, with 1 reply.
Replied to by danpost, about 5 years ago:
XApple15 wrote...
Hello ! How do I make an Actor follow a Player controlled by a keyboard?
Once it gets a reference to the player (either by passing it to the follower or by a getObject... type method), just turn toward the player's location coordinates.
Saving the world moves my objects randomly
By theoo0308, with 5 replies.
Last reply by danpost, about 5 years ago:
theoo0308 wrote...
Thanks for your suggestion. The version that does not have this problem is greenfoot 3.1.0 ,for everyone interested in this topic.
That is the exact one I am using (USB version). Have not tried newer.
One specific actor will make game lag if added in the world
By Gbasire, with 2 replies.
Last reply by Gbasire, about 5 years ago:
Oh you're right I forgot about this, it works now ! Thanks !
why i cant make new levels with super()
By Vitalka, with 3 replies.
Last reply by danpost, about 5 years ago:
Vitalka wrote...
it worked but if I play my game and die, I get an error.
What (exactly) was the error? What is the coding around which the error occurred.
I seared on the internet for solutions and found this code , which worked for me even if I died: << Code Omitted >> unfortunately I don't understand what the code does xD. Could someone explain this please because I need to explain my code in school.
This class is intended to be a parent class of your game worlds. It contains 3 constructors (beginning on lines 3, 8 and 13) and a method (to be overridden in som
Code is freezing while an actor is doing its job
By XApple15, with 5 replies.
Last reply by XApple15, about 5 years ago:
RcCookie wrote...
Look at
this
Thanks ! That worked !
Setting multiple images for an Actor
By XApple15, with 10 replies.
Last reply by danpost, about 5 years ago:
XApple15 wrote...
Line 43 on Player class? There’s only “ } “ on line 43
Are you sure? Check again.
Enemy movement
By JustAnArchosaur, with 3 replies.
Last reply by danpost, about 5 years ago:
JustAnArchosaur wrote...
First, the actor is coded to move at a speed of three,
Alright: <Code Omitted>
I'm not quite sure how this code works (if (Greenfoot.getRandomNumber(100) < 10)) but I believe it's stating that between moving 10 and 100 units on the map, which then the actor will turn 45 degrees
I believe you mean: <Code Omitted>
Need help with delay
By XApple15, with 13 replies.
Last reply by danpost, about 5 years ago:
XApple15 wrote...
I have like 40 pictures showing one by one with a delay of 0,5 sec , so that’s 2 FPS which is a low framerate , this should not be the issue here
You should probably run your scenario at normal speed (60fps ~ 50speed) and just change the image every 30 frames. For most scenarios, using frames makes for more consistent behavior. Any lag could throw timing of interplay of actors off when using system time.
How to use a method of another class
By Mayokeks, with 2 replies.
Last reply by Mayokeks, about 5 years ago:
Thank you very much, finally I found the solution
our? errors in crab tutorial 3, any help appriciated
By Harryandharrysmom, with 2 replies.
Last reply by Harryandharrysmom, about 5 years ago:
oooh thanks appreciate your help!!
How to add touch mouse command?
By ShauryaThapan, with 2 replies.
Last reply by ShauryaThapan, about 5 years ago:
Thanks, works perfectly.
91
92
93
94
95
96
97
X