How to auto-round corners a la Monaco

0 favourites
  • 3 posts
From the Asset Store
game inspired by auto chess , with soulslike combat
  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • An example would be great.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)