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

danpost's Comments

Back to danpost's profile

I remember something like this; except the rows were 3, 5, and 7 and the LOSER got the last match.
The ball also seems to penetrate the paddle a bit before bouncing.
I added a 'bigRefresh();' as the first statement in the scroll() method and it seemed to work OK.
I had the pong ball go directly up and down, and I could not change its direction to eliminate any more red dots.
And if you did upload it mistakenly, log on, go to your page (click on your name), select the scenario, and click on 'delete scenario'.
danpostdanpost

2012/5/13

As I played on, the number of food that remained decreased. When I got to 21, there was no more food to eat. I'm hungry, please!
You need to put the sound file in the 'sounds' folder within the scenarios folder. Make sure, when you add Orb objects into the world, that you use 'addObject(new Orb(int, int), int, int);', supplying both the x and y speeds and the x and y locations. For top and left bounce, you need to compare <= 0, not >= getWorld().getHeight() or >= getWorld().getWidth(). You will also need an offset value for the checks as the image of the object is smaller than the image itself (I thought 15 was about right). So the checks would be left: <= -15 right: >= getWorld().getWidth() + 15 top: <= -15 bottom: >= getWorld().getHeight() + 15 The only other thing I saw, was the need for an 'addedToWorld(World world)' method in the Orb class to initialize the exactX and exactY values to getX() and getY().
Is there a time limit on this game? If so, you should probably mention it in the description or instructions. If not, what causes the player to die after like 20 seconds?
danpostdanpost

2012/5/8

@chiefnoah, I love that ever increasing inaccurately named trilogy.