Page 1 of 1

breakout-0.3.3

Posted: Fri Nov 09, 2012 8:31 pm
by Saegor
hello !

i actually try to make a breakout clone with love 0.8
note : i write very badly english but i understand easily (i can't explain why)
please comment the way i code (with a lot of functions) because i'm a supreme noob at coding and any suggestion will be welcome
cassebriques-0.2.love
(494.92 KiB) Downloaded 173 times
i know the bricks are missing, i will try to implement it in next version
thanks for watching !
i STOLED the background somewhere but i don't remember where... hum, it's just for test :oops:

EDIT : 0.(0...0).3.1 is out ! i added an effect to the ball ! try it now !
cassebriques-0.3.1.love
(494.73 KiB) Downloaded 129 times
EDIT : 0.(0...0).3.3 is out ! i added the bricks, but no collisions with them in this release
the background come from opengameart and is in public domain
cassebriques-0.3.3.love
(71.44 KiB) Downloaded 154 times

Re: breakout

Posted: Fri Nov 09, 2012 9:10 pm
by Larsii30
Hey. That's nice.

I can't really say something about your code but there is one other thing.
It seems like the player can't change the ball direction or the angle at the moment.
Maybe you check were on the paddle the ball collide and change the angle and / or the direction with this value.
Hope you understand what I mean. :)

Re: breakout

Posted: Fri Nov 09, 2012 9:55 pm
by Saegor
yes, i understand, thanks for the advice !

i must add the effect of the paddle position in the ball direction,
it's what i'm working on now. after that i wil add bricks !

i hesitate between two possibilities for the pad effect

1) relative to the last ball inclination : a) a ball who bounce on the center of the pad will make the same x-displacement with a simple y inversion b) balls from left who bounce the left of the pad will slow x displacement and accelerate y displacement for example

2) absolute effect : a ball who bounce on the center of the pad will go purely vertical, a ball who bounce to the left of the pad will go left and up, etc..

i will try the two schemes and select the better/funiest one !
it's not very lisible i know, i promise i make an effort when writing but i definitively suck, sorry :(

Re: breakout

Posted: Sun Nov 11, 2012 4:58 pm
by spir
Saegor wrote:yes, i understand, thanks for the advice !

i must add the effect of the paddle position in the ball direction,
it's what i'm working on now. after that i wil add bricks !

i hesitate between two possibilities for the pad effect

1) relative to the last ball inclination : a) a ball who bounce on the center of the pad will make the same x-displacement with a simple y inversion b) balls from left who bounce the left of the pad will slow x displacement and accelerate y displacement for example

2) absolute effect : a ball who bounce on the center of the pad will go purely vertical, a ball who bounce to the left of the pad will go left and up, etc..

i will try the two schemes and select the better/funiest one !
it's not very lisible i know, i promise i make an effort when writing but i definitively suck, sorry :(
(Haven't tried, but...) It must be the relative effect. Absolute would be too frustrating. Anyway, try and...
Bonne chance!

Denis