Game Development Community

Best way to do a card game?

by Paul Bruner · in Torque Game Builder · 04/13/2010 (6:13 pm) · 3 replies

I am coming from a programing background and I am having a bit of a time wrapping my head around using this 2D engine. I am a logic/database programer at heart so I tend to think of the basic logic before the interface.

On one hand it looks easy to use but on the other its hard to get out of habits I have. One thing I am doing to learn is making a "simple" poker game This way I can set up AI, some hand identification code and maybe some basic networking.

The problem I am running into is that I keep wanting to just write a big script that handles a majority of the game and relegate the card sprites as an interface to click on. That is use the sprites on the screen more as button events.

I am sure I am missing something here. Everyone says its so easy to make card games but I just don't see it.

PS - I have done both the Asteroid tutorial and the side scrolling one so I am familiar with the engine. I just don't understand how to use the info I learned in a card game environment.

#1
04/13/2010 (6:44 pm)
Quote:The problem I am running into is that I keep wanting to just write a big script that handles a majority of the game and relegate the card sprites as an interface to click on. That is use the sprites on the screen more as button events.

Not sure that this is a problem except for the fact that yu seem to think its a problem "argue your limitations and they shall be yours" an odd phrase i read 20+ years ago, re-itterated to myself at least once a week.

In a card game pretty much the cards, hands, decks are buttons, aside from a loop that checks hands for certain arrangements (using a poker hand as example, pairs, full house, straights, flushes etc etc) and which hand is a winning hand if its that kind of game.

btw you do know that TGB comes with a full card game as an example right?
C:\Program Files (x86)\GarageGames\TorqueGameBuilder-1.7.4\games\Blackjack
#2
04/13/2010 (10:01 pm)
Kind-of as an aside, I write my games exactly as you describe. My current game is a casual little game with solitaire, puzzles, cave exploration, and powerups. All of the game is handled through a set of "abstract" classes and the rest of the game (GUIs, sprites, etc.) either looks at those values or are told that new values are available. I guess my point is that your method is common and valid... just keep working on it and you'll eventually have it.
#3
04/14/2010 (3:49 am)
Er no I didn't know it came with the said example:P Thanks I will look into it, I just got started maybe a few days ago.