Dirt cheap "walk behind" hack

FrankenGraphics

New member
yor mileage may vary: you may replace your "behind" collision tile with the following in some new file:
Code:
LDA Object_y_hi,x
AND #8 
BEQ +
	LDA Object_state_flags,x
	ORA #%00100000
	STA Object_state_flags,x
	+

It filters out collision actions on odd rows by checking for a modulo of /8 for the "walk behind" tiles, which helps with the player not being drawn underneath other stuff unintentionally just a little bit better.

section.png


If you stack "walk behind" tiles vertically, your player hit box should still trigger the next tile collision before the first is left unless it is really small. That makes movement between behind tiles smooth despite the odd rows being negated.

The one thing you need to watch out for is ending a stack of "walk behinds" with a 2x2 tile where the upper two tiles are filled in with too much non-transparent content. I'm attaching a picture to show potential problem areas. What happens in one such area is that the player/monster will "shine through" prematurely when transitioning across it vertically. You want to keep such instances to a minimum.
I think there may be some similar effect if turning direction, not sure. Either way, it works good enough for my purposes for now.
Boxed the types of patterns to be wary of in yellow. Noet how they protude a bit much into an odd row.

watchout.png



It's not a complete solution. You're still either/or:ing on behalf of the whole object. It's just a dirt cheap hack that felt worth a minute. If it were combined with a more nuanced per-tile priority modifying thingy instead of the native per object approach, you'd have something more solid.
 
Top Bottom