I have a football simulation game I've been working on. I have just created a design to store players' career stats. I chose using List Of collections for every stat (there are over 60) with each index representing the year the player played. I needed to create a simple array for each stat as well to simulate preseason, regular season, and post season stats (3). So a sample stat storage line in a player's constructor looks like this:
Then I initialize the array like thisCode:Private m_intPassAttempts(3) as New List(Of int16)
This works great until I save a game file to disk and then reload it; it takes too damn long! It's not awful but I'm looking to speed it up the load time a bit.Code:for x = 0 to 2 m_intPassAttempts(x) = new List(of Int16) next
My question is simple: is there a better collection class than List (Of...) for disk performance? Something with less overhead? Is Arraylist or Hashtable less memory intensive? I've changed all the smaller number stats like Games Played and INTS to Byte instead of Int16 which helped a bit, but I'm looking for another option as well.
Thanks,
Eric





Reply With Quote