How do I make a "launch meter" for a breakout-style game

Get help using Construct 2

Post » Sat Feb 06, 2016 8:13 am

So, I'm trying to make an radial/circular Breakout/Arkanoid/Blockbreaker-style game using "Modern Pong" as a starting point (that project is on the Scirra store since I can't post links yet) that uses a sort of launch meter like the game Wizorb that is basically an arrow that goes from right to left (floating just above your paddle) before your first ball launch to help set the initial angel of the launch (you can still move your paddle beforehand as well) but I can't seem to get anywhere. It either keeps flopping around or won't move and I can't seem to get anywhere beyond that step. I'm pretty sure it's because I have to be able to do this at all angles since I'm moving around in this big circle. Anyone have any ideas on how I could implement such a feature?
B
15
S
3
G
2
Posts: 12
Reputation: 1,110

Post » Mon Feb 08, 2016 6:43 pm

What does "flopping around" mean?
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,370
Reputation: 4,734

Post » Wed Feb 10, 2016 7:34 am

Quite literally just that. It would flop and jitter around like it was having a seizure or something. I've (mostly) fixed that issue (not entirely sure how), but am still having problems:

Right now I have it where I have an arrow object with multiple frames of animation hovering just above the paddle before my ball launches. Instead of just playing its animation normally I have it calling individual frames and when it calls these frames I have it setting the angel of the ball (that has still yet to launch) to the angel of a bar that's connected to the center of the circle (to move the paddle in the first place) adding or subtracting between 0 and 190 degrees from the bar's angel in 5 degree intervals . IE. if one of the arrow's frames are pointing left, then it may set the ball's angel to "bar.angel+85", for instance.

The animation looks great and nothing is wigging out, but when the ball launches, it always launches the same way, regardless of the bar's position (which would seem like the perfect frame of reference, I thought). Thinking that it was just rotating the ball, I've also tried it with angel of motion both by itself and with the normal angel command. No dice :(
B
15
S
3
G
2
Posts: 12
Reputation: 1,110

Post » Wed Feb 10, 2016 3:57 pm

Make sure you don't have overlapping angular commands directing the ball in a specific direction. Keeping close track of globally executing events is very important in C2.
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,370
Reputation: 4,734

Post » Fri Feb 12, 2016 6:52 am

Nice! That (mostly) does it! The ball now launches based on the possession of the arrow, now! Apparently I was using the angel of the paddle earlier in the code to keep the ball on it rather than the pin behavior. Thanks for cluing me in to that!

For some reason now, though, if the paddle/ball are on the upper half of the circle, the ball just doesn't launch! It's so weird.
B
15
S
3
G
2
Posts: 12
Reputation: 1,110

Post » Sun Feb 21, 2016 7:46 am

Sorry to need to follow up on this, but like I said, now f the paddle/ball are on the upper half of the circle, the ball doesn't launch. If seems that the closer the ball is to the bottom of the circle, the more accurate the angel of the launch is and while at the top, it doesn't launch at all. So even if the paddle is at one of the sides, then the arrow animation doesn't align with the actual angel of the ball launch. Any idea on why this is?
B
15
S
3
G
2
Posts: 12
Reputation: 1,110


Return to How do I....?

Who is online

Users browsing this forum: ColombageEnPLS, RohitIslam, Sealz and 3 guests