Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your feedback on a survey! Each completed response supports our community and gives you a chance to win a $25 Amazon gift card!


aardvarkpoker

Member Since 10 Feb 2012
Offline Last Active Feb 18 2012 01:25 AM

Topics I've Started

Code Design Suggestion

10 February 2012 - 07:19 PM

I'm working on the very start (design doc) of a game coded in java. It is a management-type game where the player controls characters (think The Sims). Each character will have stats relating to all sorts of things. I have never looked at the code for a game like this, so I don't know what the typical way of coding this is. Right now I have a Character Object which all characters will be based on, and Character members have members of that Stat object (Stat dagger, Stat sword) etc. etc. Is this how they is typically done? The Stat object will have members such as int level, int xp, int[] stat_modifiers, etc. I'm thinking they will also have Stat strength, Stat speed, etc. As the player has the character perform certain actions xp will be gained and every so often xp will reach a certain level and the character goes up a level in each Stat.

So my summarized question: Do characters usually have a series of Stat objects which keep track of level, xp, and modifiers or is there another way this information is stored?

PARTNERS