0 Favourites

[Request] Slope detection for 8-direction behavior

  • Ashley can you please add slope detection/movements to the 8-direction behavior? This is a common feature in top-down games such as Zelda, Illusion of Gaia, Terranigma, Secret of Mana, Chrono Trigger, and many others.

    I have a purely event-based behavior that includes this feature (see below) but it's very difficult to work with overall...especially with AI and interaction with other objects, so ideally this would just be built into the 8-direction behavior.

  • You mean like wall sliding? If you're interested in an event based solution, here is one which is basically an improved "push out" that treats the player as a circle:

    EDIT:

    I posted before your edit. Yeah that would be useful if included in 8-dir.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • R0J0hound Actually that works very well. Ideally, yes, it'd be built-in, but I can make this work if Ashley doesn't want to add it. Thanks for sharing!

  • You mean like wall sliding? If you're interested in an event based solution, here is one which is basically an improved "push out" that treats the player as a circle:

    EDIT:

    I posted before your edit. Yeah that would be useful if included in 8-dir.

    Yes, your help was helpful to me too. Unfortunately I realized that to have game working a intended I need to create several types of collisions for several different families and scenarios. And t's working all okeish, but lacks precision ( which is something I'm hoping to work out later).

    @Tokinsom Yes, it should be included. Just like push out of solids should be included in all movement behaviors. And as should be many other standard features, as I described in the topic moth ago. I don't buy the answer "it can be done with events", because it makes plugins obsolete.

  • megatronx Ah, bummer. Fortunately I only need it for the overworld (the game itself is a sidescroller) but if I were making a full top-down game I'd be wary of using a workaround...it's a very important feature if projectiles and enemies and such also use it.

  • megatronx Ah, bummer. Fortunately I only need it for the overworld (the game itself is a sidescroller) but if I were making a full top-down game I'd be wary of using a workaround...it's a very important feature if projectiles and enemies and such also use it.

    I actually manage to pull it off pretty well, just need to tighten it up when I get to early beta. Here's a list of collision checks in order:

    Player overlapping enemies

    Enemy overlapping Enemy

    Player overlapping pushable

    Enemy overlapping pushable

    Pushable overlapping walls

    Actors overlapping walls

    This way they rather don't clash with each other, and there is space to include projectiles and other collisions. Thought you can see collisions jagging a bit, but again, I hope that it is fixable. I also hope that later down the line I'll find a way to unify all under one event : Family A overlapping Family B. I went with that first, but couldn't find a way to diversify types of collisions; game is pseudo isometric, with angular walls, so pushing out has to be based on the rectangle and not on circle as R0j0 proposes.

    @R0j0hound You use 'for each wall' in your event's. If I use families, do I also need to use for the loop, or family is threaten as all objects?

  • You'll still need the "for each", but you can replace walls with any other sprite or family.

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