How do you run smoothly over different level ground-(stairs)

Get help using Construct 2

Post » Thu Mar 05, 2015 6:31 pm

Hard to title this question in a limited amount of characters- :D what I am trying to do is make it so my character moves seamlessly over ground that is slightly different heights- for example, stairs - or running across a physics bridge etc. Currently he just gets stuck if the ground ahead is a few pixels higher and needs to jump to move ahead, and it makes for some crummy game play.

Id love to have a value that I could set that if the ground I am currently on is within X pixels of the ground in front of me than I continue running and seamlessly go over the step. Any ideas? I looked around and didnt see any answers for this but maybe I was searching the wrong keywords... Thanks in advance!

Edit: Might help to mention that I am working on a basic platformer game with the platform preset behaviors on my character.
Last edited by haddy22 on Fri Mar 06, 2015 6:26 am, edited 1 time in total.
B
14
S
5
G
6
Posts: 64
Reputation: 4,243

Post » Thu Mar 05, 2015 10:45 pm

I just threw together a real quick example to show what I am talking about a little clearer-

in this example the player actually does go across all of the elevations seamlessly if he has his speed up fast enough... sometimes. Doesn't seam to be a for sure fail-safe thing. Try stopping in the middle and then moving through again. You will get stuck quite a bit- id love to figure it out to where you never get stuck regardless of your speed.

In my actual game project I have physics enabled on my player and I am using the spriter plugin and spriter animations on him- but I don't think that matters. If I can get it working and get a value set that I can later adjust to fit the environment then I think I will be set. I hope one of you construct wizards is able to lend a hand! thanks!
You do not have the required permissions to view the files attached to this post.
B
14
S
5
G
6
Posts: 64
Reputation: 4,243

Post » Fri Mar 06, 2015 9:51 pm

There has got to be a simple solution to this... still stuck :x
B
14
S
5
G
6
Posts: 64
Reputation: 4,243

Post » Sat Mar 07, 2015 10:41 am

Hope someone can provide some enlightenment on this, it's a question a lot of us newbies face :) I know it's been solved in various C2 games I've seen, wondering how...
B
6
S
1
G
1
Posts: 91
Reputation: 900

Post » Sat Mar 07, 2015 7:55 pm

One idea is to change the collision polygons to have a bevel to round them out.
So instead of the corners being this:
Code: Select all
----*
    |
    |
    |

They'd be this:
Code: Select all
---*    *
    |
    |


Another idea is to use the "overlapping at offset" condition to see if a wall is just a step and then move the player up.

right key down
player: wall to right
player: [NOT] overlapping SolidTile at offset (32, -1)
--- player: set y to self.y-1

Instead of -1 you could use a lower value to go up larger steps. The approach will need some tweaking.
B
85
S
27
G
85
Posts: 5,070
Reputation: 57,874

Post » Mon Mar 09, 2015 3:42 am

So you suggest changing the collision polygon from something like this (Default)
Image

and try something similar to this?
Image

This did not seam to make any difference.

@R0J0hound

Good suggestions tho-

the second part of your comment is a little advanced for me- I will try to figure it out
B
14
S
5
G
6
Posts: 64
Reputation: 4,243

Post » Mon Mar 09, 2015 3:50 am

Yeah that's what I meant. My ascii art failed. Also if you can make the ground out of slopes it would work better.

Outside of that you could make your own platform movement with events. The most useful way would be moving the player completely with physics and not using the platform movement at all.
B
85
S
27
G
85
Posts: 5,070
Reputation: 57,874

Post » Mon Mar 09, 2015 5:22 am

@R0j0hound here is my prototype ive been playing with where I am trying to get it working:
https://dl.dropboxusercontent.com/u/247 ... index.html

I do use slopes but even still there are a few places where he still gets stuck - on this bridge for instance movement is not very fluid at all.
B
14
S
5
G
6
Posts: 64
Reputation: 4,243


Return to How do I....?

Who is online

Users browsing this forum: Magistross, oosyrag, TRMG, zenox98 and 1 guest