[Request] Slope detection for 8-direction behavior

Discussion and feedback on Construct 2

Post » Sun Oct 25, 2015 5:31 pm

@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.

Image
Last edited by Tokinsom on Sun Oct 25, 2015 6:03 pm, edited 3 times in total.
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Sun Oct 25, 2015 5:44 pm

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:
how-do-i-make-the-8-direction-behavior-span-class-posthilit-slide-s_p904925?#p904925

EDIT:
I posted before your edit. Yeah that would be useful if included in 8-dir.
B
94
S
33
G
118
Posts: 5,396
Reputation: 75,853

Post » Sun Oct 25, 2015 5:53 pm

@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!
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Sun Oct 25, 2015 5:56 pm

R0J0hound wrote: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:
how-do-i-make-the-8-direction-behavior-span-class-posthilit-slide-s_p904925?#p904925

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.
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
93
S
30
G
22
Posts: 1,987
Reputation: 20,203

Post » Sun Oct 25, 2015 6:05 pm

@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.
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Sun Oct 25, 2015 6:21 pm

Tokinsom wrote:@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?
Last edited by megatronx on Sun Oct 25, 2015 6:29 pm, edited 1 time in total.
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
93
S
30
G
22
Posts: 1,987
Reputation: 20,203

Post » Sun Oct 25, 2015 6:28 pm

You'll still need the "for each", but you can replace walls with any other sprite or family.
B
94
S
33
G
118
Posts: 5,396
Reputation: 75,853


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 10 guests