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
I need help with ememy Ai
By -nic-, with 8 replies.
Last reply by -nic-, over 12 years ago:
cant bye oh well just gotta work it out myself!
Move around an actor?
By nooby123, with 2 replies.
Last reply by nooby123, over 12 years ago:
Thank you very much!
Greenfoot bug
By Michionlion, with 4 replies.
Last reply by Michionlion, over 12 years ago:
danpost - that does work, although sometimes its just easier to close and reopen.
Switching between worlds.
By jam0037, with 5 replies.
Last reply by davmac, over 12 years ago:
There are some extra parentheses in danpost's suggestion that you need to remove for it to compile: <Code Omitted>
Player Chat Possible!
By DonaldDuck, with 2 replies.
Last reply by DonaldDuck, over 12 years ago:
The score updating for recency was actually bourne's idea that I implemented recently. The store() method seemed to be not storing properly during my initial testing, but it must have been a different problem in the code. Thanks for the clarification!
Crab tutorial - turn Greenfoot.isKeyDown() act/run
By rdlatimer, with 5 replies.
Last reply by SPower, over 12 years ago:
@rdlatimer I don't think you are right. When you press act, every object will run the action act(). When you press the run button, Greenfoot simply runs the act() action for every object in the world, the whole time. So actually, the run button in Greenfoot just runs a loop where every object will run the act() method. I hope this lets you understand Greenfoot al little better. (If you're wondering where I got this information: from the Greenfoot book)
Side Scroller
By woodkami, with 4 replies.
Last reply by davmac, over 12 years ago:
Well, I just need to know the concept on how a side scrolling map works.
Ok; you implement "scrolling" by moving everything to the left (or right). In Greenfoot this could be as simple as getting all the objects (World's getObjects() method) and then looping through them and adjusting their position. You should use an unbounded world so that objects can move out of the world bounds. It's a bit more complicated if you need the background to scroll as well, but to start with you could use a plain background to avoid that problem. This technique isn't particularly efficient, but
Moment of great amnesia
By darkmist255, with 5 replies.
Last reply by darkmist255, over 12 years ago:
Math.hypot(x, y), thanks for sharing that! Yeah the abs() is redundant now that you mention it. And yeah I changed it to Actor instead of Object once I realized I need to call some methods within them. Thanks :D!
Getting some basic user information
By Spilli, with 2 replies.
Last reply by Spilli, over 12 years ago:
Great, thanks for the help, much appreciated.
Side Scroller
By woodkami, with 4 replies.
Last reply by danpost, over 12 years ago:
Download and check out this
side scroll demo
. That should get you going.
Help! Error message
By e_e13, with 5 replies.
Last reply by e_e13, over 12 years ago:
No worries, I've finally figured it out :)
Crab file not working
By Siffor, with 1 reply.
Replied to by delmar, over 12 years ago:
Hit the 'Compile' button. (Hint: whenever the classes have this stripey look, they need to be compiled.)
greenfoot piano (from the book)
By wahaj, with 2 replies.
Last reply by wahaj, over 12 years ago:
well i cant take credit for this. i did get these ideas from the book. but i understand now what to do. i think the major mistake that i was that i put the increment of a inside the if statement. my mind kind of went towards that but for some reason i didnt try it. thanks for the reply.
H
By poila., with 4 replies.
Last reply by poila., over 12 years ago:
Michionlion wrote...
it is pretty self explanatory... public void lookForFly() { declares a method, and in the method... if (canSee(Fly.class)) { tests if the method canSee() returns true when you pass in Class Fly.class. if it does return true... eat(Fly.class) it calls the method eat(), passing in Fly.class, then... increments the FlysEaten variable by 1. In this example, you would need the methods canSee(Class) and eat(Class), neither of which are included in Greenfoot.
Thank you very much I know how it works now.
Detect scenario exit?
By DonaldDuck, with 6 replies.
Last reply by kiarocks, over 12 years ago:
Looks like you could try to catch the ThreadDeath Error that happens when you refresh/close, not sure how hard it would be.
989
990
991
992
993
994
995
X