Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm not a dev noob, but definitely never done anything in game dev. There is a trump based card game we play in town that I plan on coding. I'll be either using python/ajax/pyqt or c++/qt.

My question is as follow, what kind of advice would you give to writing card based games?

share|improve this question

3 Answers 3

up vote 11 down vote accepted

I'm not really sure what card game you're trying to create, but here are the general steps I would go through:

  1. Write the rules down on paper - Write the rules down in bullet format. This will get your brain thinking about the logic, and will provide you with a handy reference to use later on.
  2. Rewrite the rules to follow the programmatic flow - Keep the rules in bullet format, but reorder and indent them, so they form an outline of the programmatic flow.
  3. Write the pseudo-code - Using your outline as reference, write out the pseudo code.
  4. Create the classes - Make a list of classes you'll need, based on your pseudo code, and implement them.
  5. Replace your pseudo-code with code

The process is a little slow, but it has a number of benefits to someone in your situation:

  • Each step creates documentation that can be referenced in future steps
  • You have multiple opportunities to catch mistakes in your logic before you ever touch code
  • It's very easy to see how logic should breakdown into code

Best of luck on your programming adventure! If you have any questions or something seems unclear, let me know. :)

share|improve this answer

The good news about card games is, they are some of the simplest to program, so this is a great first project for getting into game dev. Why? Because you don't have to deal with a great deal of graphics (simple sprites for the cards, no scrolling, no 3d, not even necessarily any animation) nor do you require realtime input (when you say "trump based" I assume this is a turn-based game where you select cards one at a time to take tricks), so the event-driven programming that you're used to in more general software development can apply here just fine.

If you're an experienced programmer, there are likely only two things you'll need to learn here. One is how to draw sprites to the screen, which is not terribly hard -- there are tons of libraries that will let you do this, PyGame has the functionality built in if you go with Python. The other is, assuming this is a multiplayer game to be played over the internet, you'll need to figure out how to establish a connection and send messages over a network. But that's really it... aside from that, treat it like any other software project.

share|improve this answer

AJAX/PyQT? Not sure how that would work out. Card games aren't especially complicated unless you are trying to make some kind of generic card game engine (don't do that). Just don't focus too much on the tech, pick something you are comfortable with and make it fun first. Once it is fun, worry about making it snazzy.

share|improve this answer
    
the game will be coded primarily for myself as i'm going on a 1 month trip in a few months –  dassouki Oct 18 '10 at 23:02
1  
Q:"How do I do X" A:"X is not complicated, unless you are trying to make a generic X engine" - This is not a helpful answer at all. –  AttackingHobo Oct 22 '10 at 1:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.