Making a Solitaire Game

Status
Not open for further replies.
B

Basic_Pete

Guest
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?
 
B

Basic_Pete

Guest
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.
 
B

Basic_Pete

Guest
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
 

Evanski

Raccoon Lord
Forum Staff
Moderator
Your solitaire project sounds really interesting! I'm not super well-versed in solitaire, but I'm currently mastering its basic rules and techniques. Using a ds_grid with 7 columns sounds like a solid approach for the layout. As for the rows, you could maybe make it dynamic based on the number of cards.
As good as it sounds, the OP has since had their account auto purged

If anyone is having issues with making their own solitaire game, please make your own topic
 
Status
Not open for further replies.
Top