Jump to content
SubSpace Forum Network

Recommended Posts

Posted (edited)

Here's something i thought i had lost a couple years ago. i want to share it with you.

 

Here ya go:

Breakout.jar

 

INSTRUCTIONS:

Use the arrow keys to move <- and ->

Ball will move momentarily after opening the window, so be prepared!

 

oh, and it is a little buggy

 

EDIT: added it with the source files included. change to .zip and extract if you want to play with it. It is coded in java.

Edited by rootbear75
Posted

one problem i know of is that the "paddle" is above the point where the ball bounces back up.

This was a partnered activity, and neither me nor my partner could fix it. We figured it was best just to leave it alone.

 

If you want to play with it, just change the file extension to .zip, and extract the files.

Let me know if you fix anything or make it better smile.gif

Posted

well... the bounce kept bouncing on some blocks without destroying them... and some blocks were destroyed even if the ball just passed near them... and the ball kept bouncing vertically and I couldn't make it bounce sideways... blum.gif

And you rely on KeyDown events, which are triggered depending on the repeat wait and repeat rate set in Keyboard settings... I don't know how to do this in java, but there is a way to get the Asynchroneous state of a key

 

anyways... I was gonna say I won't change stuff in it... but now that I think of it, I'll maybe do when I need to learn some java blum.gif

Posted

i think a better thing to do would to make it a MouseFollow event or w/e it is, and we added zones in the paddle.

like this:

 

[----|---|---|---|----]

.<<...<...X...>...>>

 

basically thats how the zones are... the more right you hit, the faster right it will go, etc.

Posted

hm I thought that's what it was supposed to be doing already

and you don't really need 'zones' , you can just calculate an angle from the pixel where it hits

Posted
hm I thought that's what it was supposed to be doing already

and you don't really need 'zones' , you can just calculate an angle from the pixel where it hits

shutup.gif

 

hey, if you want to fix it be my guest...

it was a final for my AP Comp Sci class, and i think i got an A or a B+ on it.

Posted
hm I thought that's what it was supposed to be doing already

and you don't really need 'zones' , you can just calculate an angle from the pixel where it hits

shutup.gif

 

hey, if you want to fix it be my guest...

it was a final for my AP Comp Sci class, and i think i got an A or a B+ on it.

I didn't mean to be rude or anything there blum.gif And I didn't mean to say like 'you should have done this or that', I was just suggesting alternatives, in case you (or maybe I) ever modifies it

  • 2 weeks later...
Posted

I thought this said "supermarket breakout" :(

 

Anyway, I would have done the same thing with the zones on the paddle, except maybe taken the paddle speed into account too, so if the paddle was moving to the right when the ball hit, then it would add some more "rightwards" speed to it.

  • 4 weeks later...
  • 1 month later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...