
-----------------------------------
Aange10
Sun Dec 04, 2011 2:57 pm

Simple Brick Breaker
-----------------------------------
I got bored and decided to make a Brick Breaker. Here's what I came up with in about two/three hours.


The code is commented, as it is a habit.

Enjoy.

-----------------------------------
mirhagk
Sun Dec 04, 2011 4:36 pm

RE:Simple Brick Breaker
-----------------------------------
The collision off of the blocks is glitchy (sometimes bounces in the wrong direction) but other than that, it is pretty good. This is one of the things I like about Turing, it only takes a tiny amount of time to get something like this working.

-----------------------------------
Aange10
Sun Dec 04, 2011 9:36 pm

RE:Simple Brick Breaker
-----------------------------------
Off the blocks? I don't see why, it simply inverses the x velocity.

If you mean when it bounces off the paddle, that is intended - its suppose to be a way of aiming; if you move to the right, right before the ball hits you it will go in that direction no matter what. And same for if you go to the left when it hits your paddle.

-----------------------------------
Aange10
Mon Dec 05, 2011 12:37 am

Re: Simple Brick Breaker
-----------------------------------
After about another hour and a half:



Note: Bottom of code is what I'll be adding.

-----------------------------------
Velocity
Mon Dec 05, 2011 9:38 am

RE:Simple Brick Breaker
-----------------------------------
Good job man + bits

-----------------------------------
2goto1
Mon Dec 05, 2011 10:29 am

RE:Simple Brick Breaker
-----------------------------------
Looks good. What would be nice would be to proportionally invert the x velocity depending on the location that the ball hits the paddle. That would make the movement feel less grid-like. And perhaps gradually increasing ball velocity in a given level if there has not been any brick contact for a given period of time.

-----------------------------------
Aange10
Mon Dec 05, 2011 5:27 pm

Re: RE:Simple Brick Breaker
-----------------------------------
Looks good. What would be nice would be to proportionally invert the x velocity depending on the location that the ball hits the paddle. That would make the movement feel less grid-like.


And what would these porportions be? As in, what change is there in reflection if the ball hits at the right or the left front of the paddle?


And perhaps gradually increasing ball velocity in a given level if there has not been any brick contact for a given period of time.


I'm going to implement that, along with some better upgrades, music. I'm going to post how long I work on each version. I'm going to try and make it *fun* to get to level 10, and win (I currently am bored after level 2). I'm going to up the graphics a bit, and even add some graphic 'upgrades' to 'buy'.


Thanks for the feedback.

-----------------------------------
Tony
Mon Dec 05, 2011 5:46 pm

Re: RE:Simple Brick Breaker
-----------------------------------
And what would these porportions be? As in, what change is there in reflection if the ball hits at the right or the left front of the paddle?
Linear, log, etc. Pick a function that approximates the "real" shape (as in one responsible for calculating the angles of bounces, not the image on screen) of the paddle, and play with the constants to have it match up. A neat powerup would be one that swaps that function (e.g. convex -> concave shape)

-----------------------------------
Aange10
Mon Dec 05, 2011 6:23 pm

RE:Simple Brick Breaker
-----------------------------------
Not quite sure how to do that >.