ID:1993622
 
Code:


Problem description:
Hi, i have no idea how to set multi bounds for tile like this.



(I try do something like this) (red color is bounds)

Couse i use a pixel movement.

I can create new objs in New() and hange locate for them... but i'm not sure is it good idea.
This is probably the most problematic part of the bounds system. Really, I would just do 4 object with varying bounds.. Such a horrible way :L
This is how I achieved stairs in a few sidescrollers :) it can work great.
In response to Kozuma3
Kozuma3 wrote:
This is how I achieved stairs in a few sidescrollers :) it can work great.

mhm But if i wanna made hmmm ~50 maps... to much tiles... :/
In response to Marekssj3
Marekssj3 wrote:
Kozuma3 wrote:
This is how I achieved stairs in a few sidescrollers :) it can work great.

mhm But if i wanna made hmmm ~50 maps... to much tiles... :/

I think it would be fine ^^
I've always asked myself how other developers approached this. I hope it's not some seriously hacky way like changing the object's bounds every time the player takes a step and increasing/decreasing their pixel_y depending on whether they are going up or down the stairs...
Honestly there isn't really a single "good" way. What you can do is define a list of bounds which are considered dense, and dynamically build objs ontop of it.

If you're going to do this, make sure that you try to block fill as much as you can. I.e, don't use 4 4x4s to make a 16x16, instead use a single 16x16. The obj limit creeps up REALLY fast when doing this, especially the viewport obj limit.
Forum_account's Sidescroller library (as well as most non-BYOND sidescrollers with ramps) uses custom collision handling for ramps. Essentially, you use the equation for a line (y = mx + b) to get the height of the ramp at any x-coordinate covered by the ramp, do some comparisons with the player's bounding box, and move the player up out of the ramp if necessary.
For sidescrollers I'd personally roll my own collision system. That way you can include ramps and such.