Ladders...Ladders....Ladders

Por Chilly Willy

Expert (103)

imagem de Chilly Willy

19-10-2022, 03:58

Has anyone ever figured out how to tell if you are at the bottom, top or even middle of a ladder in Donkey Kong or similar?

If I have Joe Bob running up a girder does a call to VRAM (MSX 1) to determine a pattern at sprite Y/X plus offsets?
Or is there some type of track? Or just some elaborate type of database if you reach Y/X that you allow a North South direction?

I would love to try out my hand at some type of platformer that uses ladders but I never found any examples in Z80 that I can study that will teach me how to do it.

I can't learn this in college in 2022.

Any thoughts?

Entrar ou registrar-se para comentar

Por SjaaQ

Champion (371)

imagem de SjaaQ

19-10-2022, 07:40

For tile based games, I'd calculate the tile X/Y based on the sprite X/Y and then probe what is beneath the tile the sprite is currently in. If it is floor, you are (almost) at the bottom. If it is more ladder, you are in the middle. The same goes for above ("air" tile).

Por theNestruo

Champion (398)

imagem de theNestruo

19-10-2022, 08:30

Please triple check my latest answer on your previous question: https://msx.org/forum/msx-talk/development/run-and-jump-routine

Chilly Willy wrote:

I never found any examples in Z80 that I can study that will teach me how to do it.

It is hard to believe, because you have been pointed (and more than once) to example source code. And you keep coming back with more questions and "can't find any examples" every few days... even when the source code already had the answers you were looking for.
I like to help people struggling with assembly (as I was a newbie too and had to ask for help), but your attitude is getting annoying.

Por Chilly Willy

Expert (103)

imagem de Chilly Willy

19-10-2022, 18:32

theNestruo wrote:

Please triple check my latest answer on your previous question: https://msx.org/forum/msx-talk/development/run-and-jump-routine

Chilly Willy wrote:

I never found any examples in Z80 that I can study that will teach me how to do it.

It is hard to believe, because you have been pointed (and more than once) to example source code. And you keep coming back with more questions and "can't find any examples" every few days... even when the source code already had the answers you were looking for.
I like to help people struggling with assembly (as I was a newbie too and had to ask for help), but your attitude is getting annoying.

Actually the way this game handles ladders is inadequate for what I was originally going to do so I ended up writing a routine that would work with random ladders.

Now if this program also has a routine for mirroring sprites then I am all in but I have yet to find it.