Hi John, Its generally good practice to create a player class for the player character. That way you can keep all your variables and player methods stored in one location plus you can use that class for serialization and deserialization etc when it comes to saving and restoring games.
However, in more complex games you may even find it useful to have more than one class for your player character. For instance, in my game Mysteries of the Ancients I actually have two different classes. One is for Angela Carter, and the other is a special inventory class that keeps track of her weapons, gold coins, scrolls, and other inventory data. Its very modular, and I can add to or build upon those classes and reuse them in other games. P.S. I'll subscribe you to the developers list. Not sure what the problem is but I can add you manually from here. Cheers! On 8/4/13, john <[email protected]> wrote: > I'm just wondering if it's generally considered good practice in game > programming to create a separate class for the player, as it is for enemies, > or just to store information about the player globally. Also, if somebody > could help me figure out how to subscribe to the developers mailing list (I > tried a while ago and didn't get anywhere), I would really appreciate it. > --- > Gamers mailing list __ [email protected] > If you want to leave the list, send E-mail to > [email protected]. > You can make changes or update your subscription via the web, at > http://audyssey.org/mailman/listinfo/gamers_audyssey.org. > All messages are archived and can be searched and read at > http://www.mail-archive.com/[email protected]. > If you have any questions or concerns regarding the management of the list, > please send E-mail to [email protected]. > --- Gamers mailing list __ [email protected] If you want to leave the list, send E-mail to [email protected]. You can make changes or update your subscription via the web, at http://audyssey.org/mailman/listinfo/gamers_audyssey.org. All messages are archived and can be searched and read at http://www.mail-archive.com/[email protected]. If you have any questions or concerns regarding the management of the list, please send E-mail to [email protected].
