Just a question : Where can I find information on using spritesheets ?
It would have to pick all 52 cards as spots on the sheet, then randomize them.
Deal a hand to the players.
Somebody just posted a spritesheet for a card deck. Try doing a forum search for spritesheet to see what shows up.
The sprites sheets look like their best used for animations. I have downloaded a deck of cards in .png file format…It would be best to create a helper class and use self to id each card, and then re-use the class for each new card game…
i like to store playing cards as a number. Get the rank by doing card%13, suit by card%4. To find the texCoord for a rect for example, you need to know the left bottom edge, the bottom edge, the height and the width of the card.
If you have 14 columns but 13 ranks (say last column is some extra stuff), then your left edge is card%13 * (1/columns), with the width of the card being 1/columns…
if you have five rows and four suits. bottom edge is card%4 * (1/rows
hope that help still
I see a good sprite sheet example by se24vad… But it doesent seem to work. It was posted in 2014 ; https://codea.io/talk/discussion/4803/spritesheets-animation-in-codea.....Is it only me ? This would be a good idea for the card shuffle function…And would raise the quality of the card game…
actually looks interesting. hmm