How to auto-round corners a la Monaco

Get help using Construct 2

Post » Wed Dec 17, 2014 1:19 pm

I have a top-down game where I want my character to easily maneuver around tight spaces. To make this as easy as possible I want to implement a system similar to what Monaco manages to do. If you hit a wall head-on it just stops you right there. But if you're close to an opening in that wall, it'll let you continue and will guide nudge into the gap. I'm not sure how that game handles it exactly, but it might be as simple as a diamond-shaped collision mesh. If that's the case, head-on collisions will produce results as if were a square bounding box. But if you hit an edge, the shape of the collision mesh will funnel it towards the open gap.

As far as I know it isn't that simple with Construct 2. At the moment I have a player sprite with 8 direction movement attached to it, walking around a level with tilemapped walls. When I try the diamond-shaped collision polygon it doesn't have the desired effect however. When the side of the polygon hits the wall, it brings the player to a halt.

So if anyone has a way to make the intended movement work, please share. I'm open to using mods.
B
10
S
2
G
1
Posts: 49
Reputation: 693

Post » Wed Dec 17, 2014 3:37 pm

If you are using a tilemap, I suggest that on collision, you check surrounding tiles for a place to "nudge" into. I'll see if I can come up with an example soon.
B
76
S
31
G
27
Posts: 1,015
Reputation: 20,790

Post » Wed Dec 17, 2014 9:32 pm

An example would be great.
B
10
S
2
G
1
Posts: 49
Reputation: 693


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 5 guests