Path: chuka.playstation.co.uk!news From: "Peter Wright" Newsgroups: scee.yaroze.beginners Subject: Re: Enemies in a Space Invaders Clone Date: Sun, 27 Dec 1998 13:32:06 +0000 Organization: Genesis Computer Software Ltd Lines: 41 Message-ID: <765cuv$22913@chuka.playstation.co.uk> References: <368512F2.4AC179EE@yahoo.com> NNTP-Posting-Host: 212.56.83.182 Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Newsreader: Microsoft Outlook Express for Macintosh - 4.01 (295) Sounds like you are on the right track to me. Good luck with your game. Peter Wright. --------- In article <368512F2.4AC179EE@yahoo.com>, Ed Fear wrote: >Hey, > >I woz just wondering what you guys would do when faced with the fact >that you need 20 enemies on the screen at a time? I was thinking of >doing something like this > >typedef struct { >GsSPRITE sprite; >int dead; >} enemy > >enemy Enemies[20]; // as a global > > >And then whenever I get to the main loop and I have to enter the sprites >into the OT, do this: > >for (i = 0; i < MAX_SPRITES, i++) >{ > if (Enemies[i].dead = 0) > GsSortFastSprite(&Enemies[i].sprite, WorldOT[activeBuff], 0); > } > >so that when the enemy is shot, dead is set to 1 and it is not drawn. > >Does this seem the most sensible idea? > >Cheers, > >Ed :) >