Message-ID: <004901be69c9$072598c0$ed9d2bd1@puter> From: "Juff" To: "djgpp" Subject: need some help on game dev. Date: Mon, 8 Mar 1999 17:06:13 -0800 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0046_01BE6985.F87470A0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3110.1 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Reply-To: djgpp AT delorie DOT com This is a multi-part message in MIME format. ------=_NextPart_000_0046_01BE6985.F87470A0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable hey-- im developing (er, trying?) a strategy game...annnnnnnndd, im having trouble with one little thing, since im new to this whole *game* dev thing i was wondering how the heck i=20 would store shipz, here's an example-- say ive got my scout ship-- class scout_ship { private: int shields; /* shield state */ int hull; /* hull state */ =20 public: int damage_scout(int scout_damage_modf); /*this would check to see if = shields failed, if so, damage hull */ /************ well the list could go on, but basically ive got my ship class... **************/ }; so, say player x has 300 scouts, how the heck do i keep track of all = those? i thought of a double array, but jeez, there'z GOT to be a better way = than having a multilayered array, it would also be inefficiant since the # of ships = a person could have would be limited to how many layers of an array i had say, i wanted = them to be able to have 1,000 ships, well, from what i know, if i used an array, i would = have to say-- arrray_O_ships[10][100]; but that gets confusing... so do i have to hurt my brain and just boggle through this strange = array, or is there a much much much better way of keeping track of all these??? thanks! ------=_NextPart_000_0046_01BE6985.F87470A0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
hey--
im developing (er, trying?) a = strategy=20 game...annnnnnnndd,
im having trouble with one little = thing, since=20 im new to this
whole *game* dev thing i was = wondering how the=20 heck i
would store shipz, here's an=20 example--
 
say ive got my scout = ship--
 
class scout_ship {
private:
int shields; /* shield state = */
int = hull;      /* hull=20 state */
 
public:
 
int damage_scout(int = scout_damage_modf); /*this=20 would check to see if shields failed, if so, damage hull */
 
/************
well the list = could go on,=20 but basically ive got my ship class...
**************/
};
 
so, say player x has 300 scouts, how = the heck do=20 i keep track of all those?
i thought of a = double array,=20 but jeez, there'z GOT to be a better way than having
a multilayered array, it would also be inefficiant = since the #=20 of ships a person could
have would be limited to how many layers of an array = i had=20 say, i wanted them to be able to
have 1,000 ships, well, from what i know, if i used = an array,=20 i would have to say--
 
arrray_O_ships[10][100];
 
but that gets confusing...
 
so do i have to hurt my brain and just boggle = through this=20 strange array, or is there
a much much much better way of keeping track of all=20 these???
 
thanks!
 
 
 
 
 
------=_NextPart_000_0046_01BE6985.F87470A0--