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.

2D All the way! / Help putting sprites over other sprites

Author
Message
Underworld 1020
22
Years of Service
User Offline
Joined: 2nd Mar 2004
Location: NY, USA
Posted: 20th May 2004 19:38
This is what I want my game to look, keep in mind Im not a artist, but a programer and the picture is reduced by alot originally 1024 by 768

Preview


The only problem is that the background goes fine, but the crosshair goes under everything but the background image. So when our trying to hit the target the crosshair goes under the target.

How do I fix this problem

Please Help!

Thanks
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 20th May 2004 20:06
Try making the crosshair sprite last. Sprites are drawn in the order that they are created.

fog
22
Years of Service
User Offline
Joined: 5th Oct 2003
Location: Newcastle, England
Posted: 20th May 2004 20:25
Quote: "
Sprites are drawn in the order that they are created.
"

I never knew that.


Anyway assuming this is DBPro then you can simply use:

SET SPRITE PRIORITY Spr_No, Priority

All sprites have a default priority of 0 (zero). Any sprites given a higher priority are drawn later so in your case just setting the priority for the target sprite to a number higher than 0 should solve it.

Underworld 1020
22
Years of Service
User Offline
Joined: 2nd Mar 2004
Location: NY, USA
Posted: 21st May 2004 06:05
Thanks!

I'll try putting them in a different order and Im using DB not DBPro

It sounds alot easier in DbPro

Another question is it worth it to upgrade from DB to DBPro?
Underworld 1020
22
Years of Service
User Offline
Joined: 2nd Mar 2004
Location: NY, USA
Posted: 21st May 2004 20:06
I tried rearranging the sprites order and it worked!

Thanks!
fog
22
Years of Service
User Offline
Joined: 5th Oct 2003
Location: Newcastle, England
Posted: 22nd May 2004 15:40
Quote: "
Another question is it worth it to upgrade from DB to DBPro?
"

Well based purely on using sprites from what I hear they were very very slow in DBc. With DBPro speed certainly isn't a problem......you should be able to have hundreds on screen at any time with no problems.

The only real drawback with DBPro's sprites, and it's a cosiderable one, is there is no decent built-in collision system.

Of course the 3D side is also vastly improved but this does mean your games may not run on older PC's and also require DX9.

Underworld 1020
22
Years of Service
User Offline
Joined: 2nd Mar 2004
Location: NY, USA
Posted: 27th May 2004 20:11
I mostly use 3d anyway, but this game there is not really a need for it

Login to post a reply

Server time is: 2026-06-09 15:43:41
Your offset time is: 2026-06-09 15:43:41