This site requires JavaScript, please enable it in your browser!
Greenfoot back

mjrb4's Comments

Back to mjrb4's profile

mjrb4mjrb4

2009/8/12

100% in 28 seconds... eventually! Good rendition of an old fairground game that looks a lot easier than it is! ;-)
mjrb4mjrb4

2009/8/11

Hi Herman, Issues like this are probably best talked about on Greenfoot discuss so they don't get muddled with other scenarios :-) If you're getting confused and this doesn't help, probably best to talk about it there instead! I've just tried out the scenario on the latest version of Greenfoot (1.5.4) though and it seems to run fine. I take it you are adding the relevant turtles to the scenario before clicking the run button?
Hiya, Have you tried putting the mask files in the images directory and then referencing them from in there? Just a thought, but might work. Michael
mjrb4mjrb4

2009/8/10

Hmm, the scenario says squares now but the description says rectangles - either would be correct (since squares are a special case of rectangles) but it's probably better to be consistent!
The following worksheet may give you some ideas: http://www.greenfoot.org/greenroom/index.php/Jumping it's not exactly your problem (the problem here is a bit more complicated because you've got two objects that may be moving instead of just one) but the principles are the same and you should be able to apply them here with a few tweaks :-)
You just need to download the source and put the wanderer class in your scenario so it's a superclass of whatever you want to "wander." So if you put it in your project and then do something like: public class Ball extends Wanderer and then edit wanderer to extend whatever Ball was previously extending, it should work. (Obviously replace ball with whatever actor it is you want to wander outside the world!)
Ah yus, it appears I was moving the paddle towards the ball when it hit it. If you do some calculations with the movement of the ball and the paddle you should still be able to make it hit it though - and why the holding down enter? Why not have it so the ball always bounces off the paddle? :-)
Nice!
Nice idea, but the ball seems to travel straight through the paddle at the moment!