Anyone know of a good Card Games Library for B3D?
RZ
You remind me of me. :P
What do you mean by "Card Games Library?"
You know... something that would make it easier to write casino or card games... VB had a CARDS.DLL that used the windows decks and could tell the value of the card and the name of the card and the suite of a card etc. All good for creating a card game. I have tried to use it in Blitz but it refuses to work.
RZ
I'll put you on the right track...
There's 52 cards in the deck and let's suppose the following
1-13 = SPADES A,2,3...J,Q,K
14-26 = CLUBS A,2,3...J,Q,K
27-39 = HEARTS A,2,3...J,Q,K
40-52 = DIAM. A,2,3...J,Q,K
You find the suit by comparison: card 32 = HEART, card 5 = SPADE. You find the value by subtracting 13 from it until it's value is 13 or less:
So, CARD 48 (- 13 - 13 - 13 = 9) is the 9 of Diamonds.
Now run with it!
You know Dustin that a lot of good info... I never even thought about the subtract 13 thingee... Now does anyone have any ideas about how to create a card deck that won't hog system resources? Sprites? Mesh?
RZ
And the MOD 13 command does it for you...
Rook -- you still need this? I'm working on a cards.dll (the dll that comes standard for windows and is used by Solitaire, etc. ) userlib... works great so far with Blitz+ but kinda wonky on B3d unless someone knows how to draw from an API call directly to the DX backbuffer()
Here's a sample of a quick BlackJack I'm making with it:

added to code archives:
http://www.blitzbasic.com/codearcs/codearcs.php?code=1381
yes, I do still need it... did you finish it?
Yup, the cardlib works well, check the archive entry.
http://www.blitzbasic.com/codearcs/codearcs.php?code=1381Still, however, it is way easier to use with b+ than with b3d. Check my blackjack game source if you want to see how I use it.
http://www.codersworkshop.com/viewshowcase.php?id=177