10 years ago by drhayes
Y'know that trope where as you enter a room in a MetroidVania a pile of rocks falls behind you? Maybe four identical sections fall on top of each other, and the player can do nothing to move them.
My first attempt was to make the rock fall entity
Essentially, the two
So, okay, I get it I get it,
My next thought was to simulate the whole thing and modify the
I haven't done that yet because that means the rock fall must align on the tile boundaries of my map, which is kinda stinky. I could modify the collision tile definitions to make "half tiles" and "quarter tiles" that work vertically, I guess? But I'd miss the entity-vs-entity accuracy; I'd still be aligning on tile boundaries, just smaller ones.
So before I do all this: anyone got this working using entities?
EDIT: I no speak English good.
My first attempt was to make the rock fall entity
COLLIDES.FIXED
. That worked for one stack on the map but (weirdly) not another. After a second or two, the second stack of rocks starting to shimmy through the floor. It&039;s <1>. I can't set their #gravityFactor
to 0 &039;cuz I want them to fall and bounce when first appearing. I could set it to 0 after they collide but that doesn't stop them from having a teensy bit of #vel.y
after a fall/bounce that keeps them intersecting.Essentially, the two
FIXED
entities trade on who the weak entity is. The weak entity keeps getting shoved around. Occasionally, that weak entity is the lower rock fall in which case it might get shoved through the floor and voila! But a terrible kind of voila.So, okay, I get it I get it,
FIXED
vs. FIXED
entity collisions are no worky, it says so right in the code.My next thought was to simulate the whole thing and modify the
CollisionMap
manually. Instead of entities, it just starts drawing images where the rock falls should be, watches their positions, makes them look bouncy, and sets collision tile 1 in the tile positions where the rock fall is happening.I haven't done that yet because that means the rock fall must align on the tile boundaries of my map, which is kinda stinky. I could modify the collision tile definitions to make "half tiles" and "quarter tiles" that work vertically, I guess? But I'd miss the entity-vs-entity accuracy; I'd still be aligning on tile boundaries, just smaller ones.
So before I do all this: anyone got this working using entities?
EDIT: I no speak English good.