Jump to content
  • Advertisement
Sign in to follow this  
jagguy2

many missiles?

This topic is 3734 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i am using silverlight 2 and I am shooting missiles at a spaceship on a game. Now how do i shoot and endless amount of missiles because I am unsure how to set this up. Would I use an array for the missiles or a collection tracked by a dispatch timer. AT most I couldnt see anymore than 10-20 missiles on screen at once. I couldnt understand how to use the threaded models in .net but with a timer and collection is it needed?

Share this post


Link to post
Share on other sites
Advertisement
You don't want to be constantly creating and destroying new objects, so I would use a fixed array of your missile type. What you could do is you could have a variable in this misslie type that keeps track of whether that missle is "alive" or not, and this would let you know if you have to draw it and update it. Then as missiles become inactive again (either from timing out or hitting something), you could reinitialize them again and use it as a new missile.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!