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
Copyrights for youtube
By QWERTYMAN, with 3 replies.
Last reply by QWERTYMAN, about 11 years ago:
ok thx
IsKeyDown doesnt work!?
By Hutanoi, with 1 reply.
Replied to by danpost, about 11 years ago:
Please show the code for your Welt class.
getOneIntersectingObject with the World
By Hutanoi, with 10 replies.
Last reply by Hutanoi, about 11 years ago:
okay, it works now, dont know why it didnt before nevertheless thanks :D
Are there directions for building greenfoot from source?
By vtn2@calvin.edu, with 10 replies.
Last reply by vtn2@calvin.edu, about 11 years ago:
I have successfully built BlueJ and Greenfoot now. Here is a much more detailed "log" of how I built it, which may be useful to others in the future. This way built on Mac OS. 1. mkdir ~/build_gf 2. cd ~/build_gf 3. unzip ../Greenfoot-source-2.3.0 4. Mac21495:build_gf vtn2$ ll total 0 drwxr-xr-x 4 vtn2 staff 136 Jun 19 20:47 ./ drwx--x--x 92 vtn2 staff 3128 Jun 19 20:46 ../ drwxr-xr-x 13 vtn2 staff 442 Apr 25 2013 bluej/ drwxr-xr-x 14 vtn2 staff 476 Apr 25 2013 greenfoot/ 5. Start up Eclipse Classic 4.2.2.app 6. Switched workspace to /Users/vtn2/build_gf. Ec
A new way to determine if one actor can "see" another
By jimboweb, with 10 replies.
Last reply by danpost, about 11 years ago:
I think I see where lordhershey is coming from; though, his original post does not seem to have much of anything to do with this issue (a LineOfSight object is only being created once in a blue moon and the pixel-sized image is used once at that time). However, you are creating a new GreenfootImage object each act cycle for the LineOfSight actor at line 41. You could change that line to the following: <Code Omitted>to avoid overhead on the GC.
cant get picture to change
By TotalBOSS01, with 5 replies.
Last reply by NikZ, about 11 years ago:
Your code is perfect for timing act cycles. You just need to add 1 (or more) to curTime every act, instead of getting currentTimeMillis()
I am following a tutorial to do a TicTacToe-game but I aint able to get it running.
By Maecky, with 3 replies.
Last reply by danpost, about 11 years ago:
Please refer to the page on
Classes and Objects
of the Java tutorials.
Way to check time (as in how many seconds since start)
By TotalBOSS01, with 4 replies.
Last reply by TotalBOSS01, about 11 years ago:
All right, thanks alot for all the answers!!
Access to Actor
By Hutanoi, with 2 replies.
Last reply by Hutanoi, about 11 years ago:
thanks :)
NullPointerException when calling a method from another class
By Phiesel, with 4 replies.
Last reply by Phiesel, about 11 years ago:
Ah, I understand. Thanks again!
Ending the game at zero lives
By Svek, with 1 reply.
Replied to by danpost, about 11 years ago:
In the 'if(isTouching(Player.class))' block, after line 7, you need to ask 'if the "new" current value of the life counter is zero, set a new end game world as the active world'.
Collision response
By Kartoffelbrot, with 4 replies.
Last reply by Kartoffelbrot, about 11 years ago:
I sent you an invitation for the demo project via Dropbox. Thanks for help!
I don't know why this doesn't work....
By Meinersjee, with 12 replies.
Last reply by danpost, about 11 years ago:
It should work as good as your original. Line 1: sets 'x' to 0 for 'q', 1 for 'w', 2 for 'e' and 3 for 'r'. If none of these keys are detected, then it sets x to -1. Line 2: exits the method if none of the four keys were detected. Line 4: same as lines 15, 36, 53, and 70 of your code above. The rest: same as your blocks for the different keys. I just used the value of 'x' instead of hard-coding '0', '1', '2' and '3' where needed. This should not alter the way the code works in any way and probably will not fix your problem (which I presume resides elsewhere in your code). Maybe yo
add object if it doesnt exist
By davemib123, with 6 replies.
Last reply by davemib123, about 11 years ago:
Thanks guys. I did it like this: <Code Omitted>
How do i make a random number generator for the pipes in flappy bird
By Curly, with 1 reply.
Replied to by danpost, about 11 years ago:
The Greenfoot class API contains a 'getRandomNumber(int)' method that you can use to get a number from 0 to 'int n'-1. Please refer to the API for more info.
668
669
670
671
672
673
674
X