How do I draw a slope ground wich I can reference

Get help using Construct 2

Post » Mon Dec 15, 2014 8:46 pm

Hey! I want to generate and draw a slope-ground, something like this: http://cdn.gsmarena.com/pics/12/07/tiny ... na_004.jpg What's more I want to use this generated grounds as a platform on which player avatar will move-on. I tried couple of approaches, but none of it works:
- I tried drawing slopes (bezier curves) using Canvas plugin and it's working fine, but I can't reference it in no way. I don't know how to make this generated line walkable for the player? Because it's just canvas object.
- I tried making filled-circle with three behaviours: sin vertical, sin horizontal and bullet. Then every X sec the last circle is spawning another one behind itself, but well... I don't think this will work like this.

Maybe someone did something like this?
Member of PLUS(S). Check out our games at: http://pluss.newgrounds.com/
B
8
S
1
G
1
Posts: 23
Reputation: 838

Post » Tue Dec 16, 2014 12:25 pm

I kind of implemented what I wanted. It was simpler than I thought. It's crude implentation and you probably have to add bezier curves drawn on top of those platforms, but it's working for the prototype :) You can download my solution here: http://samur.pl/prototypes/slopesdrawing_prototype.capx
Member of PLUS(S). Check out our games at: http://pluss.newgrounds.com/
B
8
S
1
G
1
Posts: 23
Reputation: 838

Post » Tue Dec 16, 2014 10:53 pm

Here's kind of a way to do that, but all collision is done manually.
viewtopic.php?f=148&t=91829&p=718897&hilit=experiments#p718897

The idea is to fill an array with random heights for the terrain, and have a number of sprites across thee screen. Then the height of those sprites can be set from interpolating between array values.

It's kind of complicated because everything is done manually but perhaps you can pull a few ideas from it.
B
94
S
33
G
118
Posts: 5,396
Reputation: 75,853

Post » Thu Dec 18, 2014 11:41 am

Thanks! I found this example in this topic: https://dl.dropboxusercontent.com/u/542 ... rrain.capx I think I have to study this :)
Member of PLUS(S). Check out our games at: http://pluss.newgrounds.com/
B
8
S
1
G
1
Posts: 23
Reputation: 838


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 23 guests