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

danpost's Comments

Back to danpost's profile

Nice! I would love to see them bounce off each other and the walls (real like)!
Could go on forever, holding down 'up' and 'right' keys, as the balloons pose no threat!
The last method listed should be 'setShowUnitOfMeasureText(boolean show)'. It was missing the 'Show' part.
238: and the sensitive finter-pad got me with four numbers remaining!
Please post comments, suggestions, or questions (especially, if you find something amiss).
You are right, it would be a simple matter of changing the paint order, so the menu object is under to notations object. But you really do not want to be able to call the menu at all when the notations object is up. Therefore, I probably should have used 'rightClick' to initiate the menu object (that would avoid the calling of the menu object when the notations object is up). Unfortunately, the laptop I created it on crashed, and I do not have the files to correct anything. There are a few other gliches that I have come across, also.
One more thing: you are adding the rocks into the world at random locations (which is fine), but it would be good the make sure that one does not start at (or intersecting) the marble (or even close and moving toward -- which would be harder to check for). The best way is probably to start the rocks near the edges of the world. Maybe something like [code]int rockX = (Greenfoot.getRandomNumber(getWidth() - 200) + getWidth() / 2 + 100) % getWidth(); int rockY = (Greenfoot.getRandomNumber(getHeight() - 200) + getHeight() / 2 + 100) % getHeight(); addObject(new Rock(), rockX, rockY);[/code]
You could add a scoring scheme to it (maybe a point for each 10 act cycles survived, or something like that). You might want to slow the rocks down a bit to start and as the score increases, slowly increment the speed of the rocks to make it harder.
How is this one coming along?