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.

Newcomers DBPro Corner / overlapping sprites question?

Author
Message
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 15th Jul 2005 13:49 Edited at: 15th Jul 2005 13:49
which sprite number is positioned "below" all the others? for example, when sprite 2 overlaps sprite 1, is sprite 1 seen or sprite 2?
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 16th Jul 2005 00:29
If you are using DBC: the first sprite u make, will be allways on bottom, the last one u create, will always be on top.

If you are using DBP: the same as DBC, but you can change it priority with the command set sprite priority sprite_nr,priority

Immunity and Annihalation makes Immunihalation...
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 16th Jul 2005 02:43
i am using dbc. thats what i thought at first. but then sprite one overlapped sprite 5 and was still on top! any ideas without me having to post my code?
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 16th Jul 2005 05:30
k fine. here is my code:
Leeorg
19
Years of Service
User Offline
Joined: 5th Jul 2005
Location:
Posted: 16th Jul 2005 05:48
I had exactly the same problem a couple of years ago! I eventually discovered the Sprite order depended on what got printed first, the sprite number does not matter. So work out what you need to be printed, sprites on top get printed last, sprites below get printed first etc etc, then just hide all the unnecessary ones and hey presto! Hope this works for you - I'm just off to see if what I told you is correct! But its the way i remember it.

Oh and if you want to keep your sprite order, don't delete any Sprites, because when they eventually get re-done, they'll appear on top of everything.

Ok just quickly checked my very old program, and it does appear that I printed all my background stuff first and the foreground stuff last. So please try and see, and let me know if it works!
Cheers!
Leeorg
19
Years of Service
User Offline
Joined: 5th Jul 2005
Location:
Posted: 16th Jul 2005 05:53
P.S If the above doesn't work try re-positioning your SYNC command to the top of the your DO/LOOP it may help a little, it did with my current game when the Options box wasn't being displayed after a Mode Change but the options sprites were. I changed the position of the Sync and it sorted it all out. To this day I have no idea why

Login to post a reply

Server time is: 2024-11-27 22:54:53
Your offset time is: 2024-11-27 22:54:53