Page 1 of 1

Manipulating sprite overlap?

Posted: Mon Apr 23, 2012 4:42 pm
by djcouchycouch
Hi,

Are there ways to change the way sprites overlap each other? I know sprite priorities affect how they've drawn relative to the backgrounds, but what do I do if I want certain sprites to be under or over other ones? Are sprites with higher index (set with VDP_setSprite(index, etc) for example) simply drawn over the lower ones?

Thanks!
DJCC

Posted: Mon Apr 23, 2012 5:24 pm
by oofwill
I think the order is set by the first parameter of VDP_setSprite function.

On screen, Sprite 0 is above 1 to 79, 1 is above 2 to 79, etc
sprites with higher index (set with VDP_setSprite(index, etc) for example) simply drawn over the lower ones?
sprites with LOWER index will be drawned over the HIGHER ones

Posted: Mon Apr 23, 2012 7:38 pm
by Stef
Exactly, sprites are draw in the order they appear in the sprite list...
First sprite in the list is the first draw sprite.