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.

DarkBASIC Professional Discussion / The order that sprites are drawn

Author
Message
Hamish McHaggis
23
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 23rd Oct 2003 19:44
I have the current code, which basically sets all the sprites priorities to 0 and then sets the sprite I want on top to 1. This makes the sprite I want on top, but any sprites underneath are still drawn in the order they were made. I want it so that the sprites stay in their order and the one I specify comes to the top.



Brains are for idiots.

Athelon XP 1400 Plus - Nvidia Geforce MX400 - 256mb RAM
zircher
23
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 24th Oct 2003 02:10
Then you'll probably need a deeper queue than 0 and 1. I guessing that when all the other sprites are at 0, their creation order is the 'tie breaker'.
--
TAZ
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 24th Oct 2003 02:38
I think that's right. What you could do is use a continually incrementing priority



of course, you may need extra code to reset all priorities back down to their lowest values when you reach 2 billion-ish ...
Hamish McHaggis
23
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 24th Oct 2003 19:13
Ah ha! I didn't know that, thanks guys.

Brains are for idiots.

Athelon XP 1400 Plus - Nvidia Geforce MX400 - 256mb RAM

Login to post a reply

Server time is: 2026-07-26 17:34:32
Your offset time is: 2026-07-26 17:34:32