Player and PlayerData realtionships qutsion
by J. Donavan Stanley · in Torque Game Engine · 11/27/2002 (3:26 am) · 1 replies
I've started to work on implementing some of the basic elements of the D20 ruleset for GORPE by implmenting a D20Entity class. The D20Entity will be our base class for player, NPCs and mosters as they all share some common attributes (stats, HP, AC, etc.).
My first inclination was to subclass Player for this class. But on further inspection I noticed the PlayerData class as well. As I understand it PlayerData is a datablock that is common to all players and that the Player class references a PlayerData object for it's information. Is this correct?
If the above is correct would it make sense to place all of the statistical information in a D20EntityData class or continue with making the stats part of the D20Entity itself?
I guess I'm looking for a detail description of PlayerData and Player interaction....
My first inclination was to subclass Player for this class. But on further inspection I noticed the PlayerData class as well. As I understand it PlayerData is a datablock that is common to all players and that the Player class references a PlayerData object for it's information. Is this correct?
If the above is correct would it make sense to place all of the statistical information in a D20EntityData class or continue with making the stats part of the D20Entity itself?
I guess I'm looking for a detail description of PlayerData and Player interaction....
Torque Owner Dylan Sale
And if I know my D20 system (and I think I do) then all the PC's and NPC's have different HP, AC, etc and therefore it is probably better to put those in the datablock.
Hope this helps.
Dylan