Hi John,
You will usually want to have a player class. You could, for instance, make
a base class called character or something similar which both the player and
the enemy class derive from. That would allow you to reuse that code for
both the player and the enemies, and would save you the trouble of writing
things like movement for both the player and the enemies. I tend to
structure my code in as modular a fashion as possible for this exact reason.
It is a good rule of thumb that the shorter your code is while accomplishing
its task, the better it is.
Kind regards,
Philip Bennefall
----- Original Message -----
From: "john" <[email protected]>
To: <[email protected]>
Sent: Sunday, August 04, 2013 9:57 PM
Subject: [Audyssey] looking for some advice and a reference:
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].