Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I started developing tcg for android, using ADT bundle.

What is the right approach/way for making/storing cards/game info, local sqlite, some kind of data file? some service? or something else?

share|improve this question

closed as not a real question by msell, Josh Petrie, John McDonald, Anko, Maik Semder May 23 '13 at 20:18

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Your questions are very broad and all combined in one stackexchange question. Maybe splitting them up in multiple questions and specify what you want to know and what you already know will help getting better answers. – thalador May 23 '13 at 12:20
I suggest you read the faq. 'How to start' and 'which technology to use' are off topic on this site. Also, you should avoid more than one question per post. – petervaz May 23 '13 at 12:23
I edited my question, to be more specific and clear, I apologize. – Alex Fleshler May 23 '13 at 12:30

You could probably benefit of a data driven approach. I'm assuming the premisse that every card might have one or more associated effects, or it can just have some stats and no special effect, something like M:tG.

You can create the effects each on it own class and probably use a factory to generate them as the cards are instantiated. The more generic the effect, the easier to reuse.

Then you create the cards as data, if they are saved on xml, sqlite, or whatever is up to you. With this approach you only need to change the code if implementing new effects, any new card using existing effects will just be added to the data files.


<card name="Fireball" type="INSTANT" cost="2">
    <effect value="3">DAMAGE_OPPONENT<effect>

<card name="Leech" type="SORCERY" cost="4">
    <effect value="3">DAMAGE_OPPONENT<effect>
    <effect value="3">HEAL_PLAYER<effect>

<card name="Healing Monk" type="Creature" cost="3" attack="1" defense="1">
    <effect when="COME_IN_PLAY" value="1">HEAL_PLAYER<effect>
    <effect when="LEAVE_PLAY" value="1">HEAL_PLAYER<effect>

Of course those are only illustrative, you need to design the TGC first and only then you can design a good data model.

share|improve this answer
This might also gives some clue where to start: – nosferat May 24 '13 at 12:34

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