Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / How exactly does darkGDK determine sprite layering?

Years of Service
User Offline
Joined: 15th Apr 2013
Posted: 25th Apr 2013 05:19 Edited at: 27th Apr 2013 05:07
I was under the impression that if you called, for example,

dbSprite(spriteID1, 0, 0, imgID1);
dbSprite(spriteID2, 0, 0, imgID2);

that the second sprite (spriteID2) would be drawn "on top" of the first sprite (spriteID1).

EDIT - I'm a dummy, read over the documentation again and found the priority control function. Still would be interested in how exactly darkGDK assigns its own priorities when the user doesn't explicitly, out of curiosity.
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 27th Apr 2013 08:50
By default, a sprite is layered by the image number, lowest to highest. A sprite using image number 2 will obscure a sprite using image number 1.

Login to post a reply

Server time is: 2023-06-08 13:15:38
Your offset time is: 2023-06-08 13:15:38