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 / Dealing Cards

Author
Message
evan
21
Years of Service
User Offline
Joined: 11th Jun 2003
Location: United Kingdom
Posted: 14th Jun 2003 05:16
I,m making a card game.If the cards are dealt face up on top of
each other one at a time,some of the cards go to the top,others
go underneath.I want each card to go on top untill another one
covers it.I'm using sprites as the cards,not bmp's.
Any ideas anyone ?
Thanx
Ev.
Blanka
21
Years of Service
User Offline
Joined: 26th Feb 2003
Location: United Kingdom
Posted: 14th Jun 2003 14:06
yeah i have an idea, have the cards so each card has two sprites, one is the whole card, the other is just a section of it.

when you have place a card on top of the other, only a bit of the card under it needs to be seen, so the sprite could be just the bit which you see, the other sprite is the whole card

so its a whole card sprite, then when another card is above it the card under it turns into just a bit of a card. this way no cards would ever overlap.

Flashing Blade
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 14th Jun 2003 18:21
SET SPRITE PRIORITY would do what you want.
evan
21
Years of Service
User Offline
Joined: 11th Jun 2003
Location: United Kingdom
Posted: 14th Jun 2003 19:11
Thanxs Blanka,i'll try it.
I tried that Flasingblade (SET SPRITE PRIORITY topcard,1)
but it still would'nt work right.Ta anyway.
Flashing Blade
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 14th Jun 2003 20:12
do like this:

1st card dealt priority=1
2nd card dealt priority=2
3rd card =3
etc etc etc
52nd card priority=52
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 15th Jun 2003 00:53
I guess you've created 52 cards in some kind of logical order...

A - K Spades
A - K Clubs
A - K Hearts
A - K Diamonds

Then you've dealt them in a random order. So, in your random deal, Spades will appear above Clubs, Clubs above hearts etc... If you deal a Club followed by a spade, it will disappear underneath.

My solution would be to have empty sprites, and assign the image as they are dealt. Either that or reassign the priority as they are dealt.

Thanks in advance.
All the Best,
StevieVee
ToXic
22
Years of Service
User Offline
Joined: 8th Sep 2002
Location: Australia
Posted: 15th Jun 2003 12:00
could you use hide sprite when the new card is dealt ?

what I do in my card games is use a sprite for the deal so it
moves across the screen, then i just use paste image then delete
the sprite

ToXic.

Login to post a reply

Server time is: 2024-09-20 12:31:16
Your offset time is: 2024-09-20 12:31:16