YSort

Previous topic - Next topic

CptnRoughnight

Hi all,

I've recently pickup up my OpenPandora again and yeah, everytime I have this device in my hands I want to code for it.

I had some ideas what to do... for now I can load Csv-Tilemaps, my character is animated, scrolling through the map and,
and this was a hard part, Ysort of sprites does work.

I don't know how you this or if there's a better way.

Basically I have 2 arrays, 1 of the sprite type and 1 to store the indizes of the sprite array.... because I can't have a pointer to the sprite object in the array (correct my if I'm wrong)

So yeah, here is a small video:

https://streamable.com/mplvgu

SnooPI

It's a good start.

The best way for tilemaps is to use a layer system.
You draw the first layer, then your sprites, then the 2nd layer, the 3rd layer, ...

You have examples with source in the showroom that can help you  ;)