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
If my actor is within this certain area display gameover
By kayuhnjayuhn, with 10 replies.
Last reply by kayuhnjayuhn, over 11 years ago:
Awesome! Worked great! Thanks!
App Store
By jmdreyer, with 3 replies.
Last reply by lordhershey, over 11 years ago:
iphones use Objective C and requires you to pay 99 dollars a year to develop and deploy to iphone. If you slip in the fee payment your app will disappear from itunes. You cannot deploy binaries to your own device unless you either pay the fee, or jail break the device. There may be thing out there to help did a goolge search for
Java to iphone
and got that there are also some kits that have their own proprietary schemes that will deploy to both iphone and android like
Stencyl
and
Splitting Asteroids Problem?
By Kamacuras, with 1 reply.
Replied to by davmac, over 11 years ago:
Your question is vague. Like any task, you need to break it down into small steps, and then express those steps using the programming language.
My thoughts for this mechanic is that when the
asteroid is intercepted by the asteroid
Is this what you really meant to say? How about you start by describing what you want to happen, in numbered steps? (And then explain which of these steps you are unable to write code for!)
Referencing a non-static variable in multiple world scenario
By redandblue, with 4 replies.
Last reply by davmac, over 11 years ago:
In the code you post, where is 'fruit' declared and initialised? Why do you call 'getType()' and ignore what it returns? Perhaps you meant to declare a local variable called 'fruit' and assign to it depending on the world type, something like:
Making objects move different directions, and different speeds
By kayuhnjayuhn, with 13 replies.
Last reply by kayuhnjayuhn, over 11 years ago:
Okay that first one worked, thanks!
Sound Not Working
By mandyg233, with 23 replies.
Last reply by lordhershey, over 11 years ago:
--
Changing text
By mandyg233, with 16 replies.
Last reply by danpost, over 11 years ago:
Usually, the heap space error will occur when you are creating an abundance of actors or objects. Check your logic in your act methods and your loops.
Objects getting stuck at walls and edges?
By Tommy99, with 4 replies.
Last reply by danpost, over 11 years ago:
You may get some weird facing actions with the way the movement is coded. You could end up moving one way while facing another if two direction keys are pressed simultaneously. Putting 'else's between the different direction checks may help; but then, if the first direction is not a valid one, the second one will not be checked..\ I would do the facing part first, before the moving part.
Oxygen Bar
By docinkc, with 1 reply.
Replied to by danpost, over 11 years ago:
A Bar is basically a Counter. A Counter changes its image to reflect a change in the value that it represents; a Bar is exactly the same. The only difference is what those changes in its images are. A Counter will always show a the current value in text form; a bar may also do this. But, the bar will update its image by adjusting the length of the bar itself; that is the only significant difference between the two. Although, in order to do this, it would need to know the maximum value allowed (and the minimum, if not assumed to be zero).
Platform problem
By VideoGame, with 6 replies.
Last reply by danpost, over 11 years ago:
danpost wrote...
If you code the horizontal movement first and keep the actor off the platform that way, it will not teleport anywhere (or go behind, of course).
What I meant by this was * move horizontally * check for left/right obstacles and move back if necessary * move vertically * check for above/below obstacles and move back if necessary Your 'move' method right now is doing both movements together before the checking.
Problems with a grid?
By Tommy99, with 5 replies.
Last reply by danpost, over 11 years ago:
For one thing, I am not sure if you intended this: but, your world cell-size is 20 and yet you are using 40 for a grid size. Maybe you meant to set CELL_SIZE to 20 (but I could be mistaken). Then, your wall would also need to be sized at 20.
Killing an enemy with multiple hits
By Svek, with 2 replies.
Last reply by lordhershey, over 11 years ago:
I would just put a member in each alien type, have the hit take one away, when it is less than 1 then do the removeObject call on the alien.
SmootheMover
By Master79, with 1 reply.
Replied to by danpost, over 11 years ago:
Looks like you cut part of the PepperJackCheese class code from the post. Also, the Cheese class might be important. It would be best to copy/paste the entire code of each class into individual 'code' embedding windows.
Connecting Pictures to Numbers
By Schoolboy123, with 1 reply.
Replied to by danpost, over 11 years ago:
Use an array of images. <Code Omitted>or <Code Omitted> The index (number) refers to each image. There is no need to work with the strings for the colors.
JDK 8
By bernmex, with 1 reply.
Replied to by davmac, over 11 years ago:
blocked the application because the java application has an old version
Are you sure it's not saying that the Java runtime is out-of-date? Do you have the latest update of JDK 8, or just the first release?
681
682
683
684
685
686
687
X