Tell me more ×
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 trying to develop an android app to handle character sheets in roleplay games like D&D and Pathfinder.

My target is to avoid calculations of bonuses by the player who only cares to set which talent is he using or by which magic he is afflicted.

The easiest way (imho) is to handle all talents and magic with classes, with methods that modify the attributes of the character class.

Another way is to store all talents and spells in a db and read from it when the user choose or use a talent or a spell.

Am i right saying that with 1st way i use more memory than the 2nd? (if not i'm choosing it)

If is better using db, I don't know how to save the data because is poorly structured:

Talent Improved Bluff: +2 to Bluff checks

Talent Speed: if the character wears no armor or light armor he moves 5 feet fast than his base speed

I can save the talent description as a meta-code string and parse it whithin the program but it seems too complicated. Do you have any better ideas for this db?

share|improve this question
The first question your asking is somewhat pointless since you've already decided against it. The remainder of your question is likely a possible duplicate: gamedev.stackexchange.com/questions/29982/… – Byte56 Aug 14 at 1:12
I'm not against first option, i'd like to use it. What i read in your link is how to implement this option but since the high number of talents and spells in a roleplay game i wonder if it's better handling them with objects or with databases storing someway the effect they have on the character. – user34157 Aug 14 at 14:01

1 Answer

I am not exactly sure what you are asking, but I would not use a database.

If anything use XML. You can store the XML in a database if you want, or you could access the file directly via:

InputStream is = res.openRawResource(R.raw.fileName);

Really, I would use basic object orientation and just set up character class to contain or handle properties that represent the objects of the spells or the attributes, etc, and have the players input build the character class properties at run time.

If you are executing in a game loop I would recommend trying everything else before parsing xml or calling a database, especially a remote database.

share|improve this answer
Since the OP was talking about using less memory, XML is a pretty poor choice for that goal. – Byte56 Aug 14 at 4:46
Others seem to disagree. – Justin Aug 14 at 5:18

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.