[4.5.9] String path by asset name reference or tile position [MazeModule]

BroTheRetro

New member
The main goal is to create path were the player can only walk on that path. If the line is horizontal, he can't go up or down.
What I have done so far (a lot of research but almost no coding xD ). I created a new tile script like the solid or prize tile. In this script I check the y of the tile then force the player y to be the y tile (half of it, to be in the center of the tile). It works fine for horizontal path. I need to check witch asset is the player touching (not sure if the asset name is available in the code) or check witch tile (in tile set) is the player touching.

[
LDA temp
CMP #$11
BEQ +
JMP doNothing
+
LDA tileY
AND #$f0
STA yHold_hi

doNothing
]

this is what I have and the first LDA temp, is to check the tile reference in the tile set. So I need to change the temp to a variable that has the position of the tile in tile set. And I will have to check more, to see if the player is in a T or + tile to change direction or stop.

1684653587641.png

This is where the player has to "walk", in the blue path. He should walk until he finds a T or +, so the player should make a decision (that's the next step, to stop and walk to the possible ways). It has to be "fixed" path. I didn't find anything in the forum, I tried my best. Not very good at assembly (yet! ;p) thanks!
 

SciNEStist

Well-known member
my grid-based walking script might be of interest to you HERE , with a few modifications, it might be what you are looking for. are you hoping to make pacman style walking, where it continues along the path until reaching a wall/intersection?
 

BroTheRetro

New member
my grid-based walking script might be of interest to you HERE , with a few modifications, it might be what you are looking for. are you hoping to make pacman style walking, where it continues along the path until reaching a wall/intersection?
Thanks! That might be an interesting approach. I will check it better later
 

BroTheRetro

New member
I don't think this may help, because I will have different tiles, different decisions to make when I hit one. I'm not sure if I can know the tile I am touching (in the tileset). Or if I can have more tiles collisions, right now I only have one for all the path, but if I can have more collision types, I can have a horizontal tile (-), vertical tile (|), horizontal/up, horizontal/down (T), vertical/left, vertical right, horizontal/vertical (+)... and there will be more
 

BroTheRetro

New member
i thought about that but I need the player to stop when he gets to a + or a T, so it can change the direction. The player can't be that precise, we will past through the "split".
 
Top Bottom