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 / Draw Order

Author
Message
archie456
16
Years of Service
User Offline
Joined: 13th Feb 2008
Location:
Posted: 28th May 2008 22:59
Hi,

I'm drawing some sprites to the screen, along with some 2D lines and circles, I'm also detecting colours from the screen with dbPoint.

Can anyone explain a bit about draw order? I originally assumed that things were drawn in the order in which they are programmed - but this is not the case.

I found the commands dbDrawSpritesFirst and dbDrawSpritesLast which seem to specify differences between drawn objects (circles lines etc) and sprites, but other than that are sprites drawn in the order they are programmed?

I would appriciate some pointers.

Cheers.
Silvester
18
Years of Service
User Offline
Joined: 7th Dec 2005
Location: Netherlands
Posted: 28th May 2008 23:07
The things coded latest will be ontop, unless specified else with the above commands you mentioned.
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 28th May 2008 23:33
Or you can set the order by setting the priority by using the dbSetSpritePriority function.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 29th May 2008 04:11
Yes, what Lilith said. I found that 0 is good for backgrounds. I think the help file said it was the other way around, but I guess I'm just stupid.

I AM THE ALL MIGHTY CORNHOLIO! Do you have TP for my bunghole?
archie456
16
Years of Service
User Offline
Joined: 13th Feb 2008
Location:
Posted: 1st Jun 2008 20:14
Cheers.

Login to post a reply

Server time is: 2024-09-29 21:29:13
Your offset time is: 2024-09-29 21:29:13