This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Making a top-down shooter


Making a top-down shooter

Postby thrashmetal15 » Dec 6, 2005 @ 5:44pm

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
They that wait upon the LORD shall renew their strength, they shall mount up with wings as eagles, they shall run and not be weary, they shall walk and not faint.

-Isaiah 40:31
thrashmetal15
pm Member
 
Posts: 34
Joined: Nov 7, 2005 @ 9:42pm


Postby sponge » Dec 7, 2005 @ 6:58am

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.
holy internets batman.
User avatar
sponge
Not sponge
 
Posts: 12779
Joined: Jan 13, 2002 @ 8:04am
Location: New Hampshire


Postby mmtbb » Dec 8, 2005 @ 2:05am

mmtbb
pm Member
 
Posts: 277
Joined: Mar 18, 2004 @ 6:56am


Postby thrashmetal15 » Dec 11, 2005 @ 10:27pm

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.
They that wait upon the LORD shall renew their strength, they shall mount up with wings as eagles, they shall run and not be weary, they shall walk and not faint.

-Isaiah 40:31
thrashmetal15
pm Member
 
Posts: 34
Joined: Nov 7, 2005 @ 9:42pm


bullets

Postby Conan » Dec 12, 2005 @ 7:23am

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.
What is Best in Life ?
User avatar
Conan
pm Member
 
Posts: 1309
Joined: Dec 24, 2001 @ 5:16am
Location: the Shades, Ankh-Morpock


Postby kornalius » Dec 12, 2005 @ 4:38pm

PPL has the particle you need! :) It's all there.
Regards,
Kornalius
President
ArianeSoft Inc.
http://www.arianesoft.ca
User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby Conan » Dec 12, 2005 @ 8:52pm

What is Best in Life ?
User avatar
Conan
pm Member
 
Posts: 1309
Joined: Dec 24, 2001 @ 5:16am
Location: the Shades, Ankh-Morpock


Postby bmanske » Dec 13, 2005 @ 6:20am

bmanske
pm Member
 
Posts: 117
Joined: Aug 26, 2004 @ 9:51pm


Postby Conan » Dec 13, 2005 @ 8:33am

What is Best in Life ?
User avatar
Conan
pm Member
 
Posts: 1309
Joined: Dec 24, 2001 @ 5:16am
Location: the Shades, Ankh-Morpock


Postby thrashmetal15 » Dec 15, 2005 @ 6:42pm

Never thought about using particles.......hmm...........
They that wait upon the LORD shall renew their strength, they shall mount up with wings as eagles, they shall run and not be weary, they shall walk and not faint.

-Isaiah 40:31
thrashmetal15
pm Member
 
Posts: 34
Joined: Nov 7, 2005 @ 9:42pm


Postby thrashmetal15 » Dec 15, 2005 @ 9:36pm

They that wait upon the LORD shall renew their strength, they shall mount up with wings as eagles, they shall run and not be weary, they shall walk and not faint.

-Isaiah 40:31
thrashmetal15
pm Member
 
Posts: 34
Joined: Nov 7, 2005 @ 9:42pm


Postby thrashmetal15 » Dec 16, 2005 @ 4:06pm

They that wait upon the LORD shall renew their strength, they shall mount up with wings as eagles, they shall run and not be weary, they shall walk and not faint.

-Isaiah 40:31
thrashmetal15
pm Member
 
Posts: 34
Joined: Nov 7, 2005 @ 9:42pm


Return to Pocket Programming Language (PPL)


Sort


Forum Description

Discuss this new development tool.

Moderator:

kornalius

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum