An "extreme slide" type of move and making brick cruve

Get help using Construct 2

Post » Sat Apr 18, 2015 9:22 pm

https://www.youtube.com/watch?v=ekBdXuHdWww

I would like to know if it's possible to do something like this as well as have the bricks curve like as they are in the video. Each brick is straight but my guess is PopCap did some type of line Bézier curve path that the prick follow. I tried slightly adjusting the angel of each prick but my ball keeps bouncing instead of rolling along the 'curve'. I suspect that each brick use 'PerPolyCollision' or Alpha Mask-based collision as well.

http://www.filedropper.com/stuffsingle
B
11
S
3
G
8
Posts: 473
Reputation: 4,569

Post » Sat Apr 18, 2015 9:41 pm

To me it seems the bricks are Isosceles trapezoids..

http://en.wikipedia.org/wiki/Isosceles_trapezoid

By using 8 points for the collision-polygon making an almost perfect circular form should be possible..
I'm guessing though a lot of the effects are done by extra coding..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sun Apr 19, 2015 3:18 am

Maybe, though not sure if C2 can handle change collision and stuff. My guess if it's possible, there's possibly a curve trigger mask that decides if the ball is in a slide, though I would have no idea on how to do that.
B
11
S
3
G
8
Posts: 473
Reputation: 4,569

Post » Sun Apr 19, 2015 7:17 pm

It would be hard to manually position the blocks. It's a bit better if you use qarp() to do a bezier to position them, but it's still a polyline instead of a curve. You could increase the number of blocks to make it smoother so the ball wouldn't jump.
https://dl.dropboxusercontent.com/u/542 ... slope.capx

I suppose you could change the collision polygon to be curved but it would be very hard to get it perfect.
A better solution would require rolling your own collision detection and collision response with events so you can use beziers for collisions.
B
92
S
32
G
109
Posts: 5,291
Reputation: 70,993

Post » Sun Apr 19, 2015 8:49 pm

Oh, this seems to work pretty good, actually, Thanks ever so much. Though having multiple of the markers seems to place the curves in odd positions. I assume it works on which is added first the layout?
B
11
S
3
G
8
Posts: 473
Reputation: 4,569

Post » Mon Apr 20, 2015 12:23 am

Yeah it's based on what was added first. The first three points for the first curve, next three for the second and so on.

Here's it tweaked to use instance variables for the p sprites instead of using the iid. "group" is used to specify the bezier number, 0 for the first, 1 for the second, and so on. To use more than two you need to change the "repeat 2" condition in events. The other instance variable is "handle" which specifies what control handle the point is.
https://dl.dropboxusercontent.com/u/542 ... lope2.capx
B
92
S
32
G
109
Posts: 5,291
Reputation: 70,993


Return to How do I....?

Who is online

Users browsing this forum: beohs, Walessio and 16 guests