Page 1 of 1
Making a top-down shooter

Posted:
Dec 6, 2005 @ 5:44pm
by thrashmetal15
I'm working on a simple top-down shooter for PPC, and I'm having trouble working out how to make the ship fire many bullets in quick succession. I could make about 5 identical bullet sprites and just cycle through them as the fires a burst, but it seems that there should be a more efficient way. My code is a real mess right now, so it wouldn't really mean much to post it, lol. Any ideas, would be really appreciated.
Thanks,
thrashmetal15

Posted:
Dec 7, 2005 @ 6:58am
by sponge
Er, what do you mean? Just make a new sprite for every bullet, and once it's off-screen, delete it. There's no other way to do it.

Posted:
Dec 8, 2005 @ 2:05am
by mmtbb

Posted:
Dec 11, 2005 @ 10:27pm
by thrashmetal15
Ok, just checking. What I ended up doing was making a couple bullet sprites and just fire them in succession depending on the whereabouts of the other bullets. Thanks.
bullets

Posted:
Dec 12, 2005 @ 7:23am
by Conan
what you want is a particle system. All this is is a large set of simple sprites all of which get processed each time throught the game loop. This allows for lots & lots of bullets flying all over the place. Give each one a lifetime which you decrement plus update the position. Only draw if active and on screen.

Posted:
Dec 12, 2005 @ 4:38pm
by kornalius
PPL has the particle you need!

It's all there.

Posted:
Dec 12, 2005 @ 8:52pm
by Conan

Posted:
Dec 13, 2005 @ 6:20am
by bmanske

Posted:
Dec 13, 2005 @ 8:33am
by Conan

Posted:
Dec 15, 2005 @ 6:42pm
by thrashmetal15
Never thought about using particles.......hmm...........

Posted:
Dec 15, 2005 @ 9:36pm
by thrashmetal15

Posted:
Dec 16, 2005 @ 4:06pm
by thrashmetal15