This topic is now archived and is closed to further replies.


Where to start writing a card game?

Recommended Posts

Kostia    122
Hi, I would like to write a multiplayer card game. As far as I understand it is going to be fairly simple compared to all the other things that have been done before. However, I have never written a game and do not even know where to start. I am thinking of having a field, playing cards, mixing cards, limiting number of cards, dividing cards among players with particular count and then players playing. Where do I start? Where can I get a free starter kit for this? Is there anything like that? I would think that there is because I do not believe for one that everyone makes their own pics of cards. I appreciate any and all help! Thanks, Kostia

Share this post

Link to post
Share on other sites
Drizzt DoUrden    100
Your probably better off writing it in something simple like Flash, java-script, CGI, or PHP because it takes more effort to learn how to do something like that in C++ than it does to make it ^^

"I''''ve sparred with creatures from the nine hells themselves... I barely plan on breaking a sweat here, today."~Drizzt Do''''Urden

Share this post

Link to post
Share on other sites
Drakonite    215
Go here

Here is some information on using the standard cards32.dll I believe it is what most card games use. It''s purpose is to draw the cards where you tell it too.

The rest of the stuff are just problems for you to figure out your own logical solution to. There are multiple ways to solve each.

For example, many (most?) card games store the deck as an array of integers from one to 52, each number representing a card.

1 - Ace of spades
2 - Ace of clubs
3 - ace of hearts
4 - ace of diamonds
5 - two of spades

i think you get the point. By using that particular method, the pip value (number) of the card is found by seeing how many times 4 goes into the number evenly, plus one.


and the suit is found by checking the remainder of the number divided by 4.

Shuffling then comes down to randomly switching the cards. In VB it is simply done by:

For currentcard=1 to 52
Next currentcard

if you''ve done much programming, then figuring the rest out shouldn''t be too hard. If you havn''t done programming before, then I suggest forgetting about a card game, and go out and buy a programming book, read it (doing all the examples), read it again, read it again, read it again... And then coming back to write the card game.

Hope that helps you some.


[Insert Witty Signature Here]

Share this post

Link to post
Share on other sites