Smooth curves in ground, how?.

Discussion and feedback on Construct 2

Post » Wed Apr 06, 2016 9:24 am

Hi, does anyone know how this type of ground were created with smooth curves ?.

https://www.youtube.com/watch?v=lPMq8CJTv-4
B
29
S
12
G
20
Posts: 756
Reputation: 13,855

Post » Wed Apr 06, 2016 9:48 am

Just draw a smooth ground and then change the collision polligon of the sprite in construct 2
ImageImageImageImage
B
27
S
9
G
7
Posts: 229
Reputation: 5,493

Post » Wed Apr 06, 2016 9:53 am

I understand, Construct suggests that you do not put more than 8 points of collision due to consumption of CPU required.

But that game should have many set points and also, the game is quite old so I guess there's not a big problem in defining many points today.
B
29
S
12
G
20
Posts: 756
Reputation: 13,855

Post » Wed Apr 06, 2016 3:47 pm

well you probably have to set up a tile map... so each tile doubtfully need more than 8 points.. especially since you don't need to do the bottom parts. It doesn't have to be exact. Also shrink the collision box slightly so there's a little overlap on to the ground.
B
88
S
29
G
14
Posts: 1,154
Reputation: 15,003

Post » Mon Jul 04, 2016 4:00 pm

I have a couple of big sprites with more that 30 points working on mobile... You shouls be fine if you don't use many physics interactions...
(Sorry for the late reply)
ImageImageImageImage
B
27
S
9
G
7
Posts: 229
Reputation: 5,493

Post » Tue Jul 05, 2016 2:23 am

The terrain was probably done with an array of the y position of the terrain at every X, or maybe just a polyline. It's fast because only the points near the bike need to be checked. That is an optimization that works in that particular case. C2 is more general purpose, but the same idea could be used with manual collision detection and response.

The recommended C2 way is to make the terrain up of multiple objects that make up the curve. Tilemaps could be used but they may not give smooth enough curves depending on what you want.

More ideas here:
viewtopic.php?f=147&t=169999&p=1022602&hilit=Curved#p1022602
B
91
S
31
G
103
Posts: 5,234
Reputation: 67,754


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 10 guests