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! / need help with sprite priority

Author
Message
chris wood
11
Years of Service
User Offline
Joined: 1st Mar 2013
Location:
Posted: 1st Mar 2013 12:39
I have been making a solitaire card game and how found that when i try and put a card on top of another it goes behind and the top card stays the same.
any help would be thankful
Daniel TGC
Retired Moderator
17
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 1st Mar 2013 15:11
DarkBASIC Professional and App Game Kit both have commands for this, but the easiest way is simply to load the sprite you wish to show on top of ever thing else last.

If you let us know which language you are using, or even which art program you are using then we can be more helpful.
chris wood
11
Years of Service
User Offline
Joined: 1st Mar 2013
Location:
Posted: 1st Mar 2013 15:51
I am using darkBASIC professional
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 3rd Mar 2013 02:18
If you are using SPRITE to create sprites, you should be able to use the SET SPRITE PRIORITY command to change the draw order of the cards however you like. Sprites with greater priority numbers are drawn later, which means they will be drawn on top of sprites with lower priority numbers.

If you are using PASTE SPRITE or any kind of image-drawing commands, you need to make sure that you are drawing the top-most cards last, like this:


Login to post a reply

Server time is: 2024-03-02 06:26:04
Your offset time is: 2024-03-02 06:26:04