View more

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

### The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

# Where to start writing a card game?

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

2 replies to this topic

### #1Kostia  Members

Posted 27 August 2001 - 07:40 AM

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 kostia_greb@yahoo.com

### #2Drizzt DoUrden  Members

Posted 27 August 2001 - 07:43 AM

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

### #3Drakonite  Members

Posted 27 August 2001 - 10:59 AM

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.

2 - Ace of clubs
3 - ace of hearts
4 - ace of diamonds
.
.

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.

CardPip=int(cardnumber/4)+1

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
toswtchwth=int(rnd*52)+1
temp=deck(toswtchwth)
deck(toswtchwth)=deck(currentcard)
deck(currentcard)=temp
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.

Drakonite

[Insert Witty Signature Here]

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.