Jump to content
  • Advertisement
Sign in to follow this  

what data structure do i use in vb.net?

This topic is 3746 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 unsure of the best data structure to use in vb.net for this game I have made 'without classes' but I am going to change this. I have an array of objects 'called enemies' which each enemy has an Array property that is 'missile' . Missile has properties and methods. Each enemy and missile has a boolean value. I want to create a list of enemies and missiles of that enemy which have Boolean values set to false.That way i can just check the list for relevant values instead of scrolling through the all objects and testing the property for true false. So what i want to do is have 3 classes. class1 -will create a new enemy with a call to class2 and contain a list of enemies with a property set to false. class2 - will contain properties and methods to for a enemy. One property will be a missile which will contain an array of objects and contain a list of missiles with a property set to false. class3 - will contain proerties and methods to for a missile i thought about extending a collection class but this is getting too confusing for me. THis way i have 3 classes and create 2 lists of objects where a property is set to false. also collections are said to be 10 times slower than arrays which complicates matters [Edited by - jagguy2 on July 19, 2008 8:17:04 PM]

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!