• 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.

What is dynamic indexing? Any tutorial?

Status
Not open for further replies.
Level 11
Joined
Oct 11, 2012
Messages
711
Level 33
Joined
Mar 27, 2008
Messages
8,035
Long story short: The indexes will be de-index once it has served its purpose (no longer used in the triggers). For example, you have 5 instances currently running, when each of the instances has finished running, the index would be decreased by 1. Compared to the non-dynamic indexing, the programmer didn't care about the increasing value of index - this means that the value would never be de-indexed and it increases as time goes on. This is where Dynamic Indexing takes its advantage, to 'recycle' the used index to assign to the previous index in the triggers involved.
 
Level 11
Joined
Oct 11, 2012
Messages
711
Long story short: The indexes will be de-index once it has served its purpose (no longer used in the triggers). For example, you have 5 instances currently running, when each of the instances has finished running, the index would be decreased by 1. Compared to the non-dynamic indexing, the programmer didn't care about the increasing value of index - this means that the value would never be de-indexed and it increases as time goes on. This is where Dynamic Indexing takes its advantage, to 'recycle' the used index to assign to the previous index in the triggers involved.

Thanks for the reply, but I still don't quite get the idea.... Why is recycling a used index better than just increasing the value of index?
 
Level 11
Joined
Oct 11, 2012
Messages
711
To clarify the size of 8192 are from indexes 0 to 8191 but there is a problem with index 8191 and it should not be used. Also as said above the main problem is not that the indexes will hit the array limit but rather that the indexes will hit the op-limit. Both are a huge problem tho. You should look at my tutorial things a GUIer should know.

Yeah, I have read your tutorial and its really useful.
BTW: do you know any good vJass tutorial?
 
Status
Not open for further replies.
Top