TileBlit with color and sprite occlusion in MSX1

Por geijoenr

Champion (352)

imagem de geijoenr

30-09-2022, 09:57

I have been working in reproducing the isometric blit and sprite occlusion you can see in Westen House for some time and now the algorithm is almost ready I want to share a sneak preview:

https://youtu.be/_1JG8Rw5hBA

The implementation is in C I have to say and is surprisingly performant, but it comes with a frame rate drop and for smother gameplay and multiple occluded sprites on screen needs to be in ASM.

Note that z-indexing is quite rudimentary as well as collision detection with the isometric tiles, but I am working on it.

Once is ready, this will be part of https://github.com/retrodeluxe/rlengine-msx, it has been in the roadmap for a while.

Entrar ou registrar-se para comentar

Por ToriHino

Paladin (805)

imagem de ToriHino

30-09-2022, 10:49

Great result and indeed performance looks very good already Smile.

Por aoineko

Paladin (695)

imagem de aoineko

30-09-2022, 13:56

Nice library. You should add it to the wiki: https://www.msx.org/wiki/SDCC.

Por geijoenr

Champion (352)

imagem de geijoenr

01-10-2022, 09:58

Thanks, I added it to the list.

Por thegeps

Paragon (1124)

imagem de thegeps

01-10-2022, 11:08

It should be interesting also an article that describes the technique. Well, I'm interested for sure...

Por geijoenr

Champion (352)

imagem de geijoenr

02-10-2022, 18:37

Well, it isn't rocket science, the algorithm is quite simple. It just takes some effort to get it working for all the cases.
I think you'll understand when you see the code.

I am pretty sure if you try you will get it working as well.

Por aoineko

Paladin (695)

imagem de aoineko

02-10-2022, 19:32

Personally, I didn't completely understood what you were doing.
It looks good so I would be happy to have some explanations. ^^
You are masking the sprite according to the tiles?

Por geijoenr

Champion (352)

imagem de geijoenr

02-10-2022, 19:47

yeah sure, I write a blog post.

Quote:

You are masking the sprite according to the tiles?

Exactly, but is a bit more nuanced; because tiles are in an isometric space, so there is depth to be taken into account. A tile may be in front of the sprite or not depending on the depth. Also you need to define a mask for each object that causes occlusion.

Por thegeps

Paragon (1124)

imagem de thegeps

03-10-2022, 01:40

Well, I code in assembly and don't understand C code. I'll start from your blog post when you'll write it.
Don't forget to paste here the link to the article

Por ARTRAG

Enlighted (6889)

imagem de ARTRAG

03-10-2022, 14:06

Very good results! Having it as a C library would be very useful for new projects