• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Hashtables vs variables

Status
Not open for further replies.
Level 4
Joined
Jan 3, 2012
Messages
60
Hey guys

I just learned about hashtables and im still wondering if i should use them in my map or not, so i wanted to hear your opinions.

My map has 8 players and each player have a range of "attributes" i need to save. For example, each player have 13 units, 13 unit upgrades, 2 researches and level of them, some specific regions and so on.

Up until now i've used variables and arrays to save these for each player, but it will be a lot variables by the time i'm done. Would it be better to make a hashtable for each player and then save all of these values? Or is big 8 hashtables in one map too much?
 
Use them but make sure not to hit the limit.

Limit is 256 (i think) so 8 hashtables is nothing.
 
Well sounds like it would be easy enough with player number and index variables. Don't think you need hashtables here :)
 
Status
Not open for further replies.
Back
Top