Re: LZ: Duck Hunt game HELP
[Prev][Next][Index][Thread]
>I am making a duck Hunt type game... (or at least trying) , but one thing i
>dont understand is do i need more than 1 x,y variables for each bullet the gun
>can shoot simultaneously...? The shoot em up game i already made could only
>shoot one bullet at a time... how do i change it
Yes, you need an 'array' type setup of all of the bullets that you want to
be on the screen. For 5 bullets, you'll need 5 peices of the array. Then,
lets say that you fired all five. When the first one his something, then
you would have to move the other four up in the array. This way, you can
keep a var of how many bullets are on the screen. When a bullet hits
something, you'd DEC this var, and when one is fired; you'd INC this var,
then you could store the points in 'bullets[fired]'. This way is also
conveinient because it allows you to know exactly how many times you should
loop through the bullet array in your bullet moving routine, and it avoids
un-neccissary comparing.
-C.J.-
********************************************************************
Unsolicited commercial e-mail to the poster of this message
will be proofread at $70/hr, minimum charge $150. Submission
of such e-mail to this address will suffice as contractual assent
to the said charging schedule.
********************************************************************
References: