Making a Solitaire Game

Hi, I've been working on a solitaire game and I'm looking for advice on what the best approach might be. I want to have the cards laid out like solitaire and the ability to move multiple cards in a column at once. If anyone has any ideas on what might be the way to do this, that would be great.

My only idea at the moment is to use a ds_grid with 7 columns and I wouldn't be sure on how many rows.
 

Alexx

Member
Personally, I would use ds lists, 2 for each column (one for visible, one for hidden).
You could then "pick up" cards where selecting a card would also select any cards below it in that column. I would then add these to a tempory ds list while they're being dragged. Then add to a new ds_list column if applicable, or move back to original column if dropped in an invalid place.

How are you storing, shuffling and dealing the deck?
 
Personally, I would use ds lists, 2 for each column (one for visible, one for hidden).
You could then "pick up" cards where selecting a card would also select any cards below it in that column. I would then add these to a tempory ds list while they're being dragged. Then add to a new ds_list column if applicable, or move back to original column if dropped in an invalid place.

How are you storing, shuffling and dealing the deck?
Thanks, this seems like it would work better than a grid. I have scripts that create a list for the cards another that shuffles them, the cards in the list are added to a ds_stack and a final script maps the cards assigning a sprite and values. I have a deck object that when clicked creates three card objects which at the moment can just be moved.
 

Alexx

Member
So I guess the next steps would be to deal the cards for the start of the game.

Next I would figure out how you would need to show cards (by this I mean they are drawn in the correct order on screen).
Then figure out how to click and select a card or stack of cards, and then move them.

If you need any help, let me know.
 
So I guess the next steps would be to deal the cards for the start of the game.

Next I would figure out how you would need to show cards (by this I mean they are drawn in the correct order on screen).
Then figure out how to click and select a card or stack of cards, and then move them.

If you need any help, let me know.
Thanks, really appreciate it
 
Top