• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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 29
Joined
Oct 24, 2012
Messages
6,543
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.
 
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