scjohnson243

Members
  • Content count

    1
  • Joined

  • Last visited

Community Reputation

101 Neutral

About scjohnson243

  • Rank
    Newbie
  1. Classes

    Good afternoon folks.    I apoligize in advance for the extremely basic question, but I keep having a hard time with classes (very basic, I know)   I am a database programmer by trade (PL/SQL, Oracle, etc) and have been learning quite a bit of PHP for my job - I started looking into C# to get and have developed a few very basic applications for my company - so I have the very basics down...   I have always been interested in game programming, so I figured startign a small game project will force me to broaden my knowledge.   Lets say I want to create a very basic, small "game" that has a icon randomly walking around the screen.  I would create a basic "NPC" or "CREATURE" class that contains all the very basic information that all characters in the game would have correct?   For instance lets say   HitPoints Armor damage   Then if I wanted to spawn say 5 of them, I would just invoke this class through a constructor 5x, correct?    Lets say I wanted to add a player character, I could use the same "Class" with creature and just add a few more details on it, that way I would not have to re-create the entire "class" from scratch, correct?  Isn't that the general idea?  I will expand on my question a bit but want to mkae sure I have the very basics down first before I move on.