• 🏆 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!

[Trigger] ( Hashtables ) Help Required

Status
Not open for further replies.
Level 3
Joined
Jul 8, 2008
Messages
28
Who can Help me ? I Need Some Help To Learn:
:vw_wtf: - Hashtables - :vw_wtf:
1*How to Use
2*For what to Use
3*Whats there Use
4*What They Use
5*What they dont Use
6*How they work
7*For what they work
8*What can i put in them to Use
9*Everything From A to Z ( From Basic to Power Controll :goblin_boom: )
*10* :grin: Any Help will be Greatfull :grin: or say Go over there :fp: and Learn it *10*
 
I will tell you a couple of things.
First of all, Hashtables are used to ensure that multiple instances of the same object-type can be used simultaneously, without colliding with each other. So, I will speak of the MUI case (Multiple Unit Instanceability). If you have a spell cast once and it runs for 10 seconds, unless you use Hashtable or an indexing system, the same spell cast by another unit will interrupt the first cast.

So, there are two ways of storing data: indexing systems and hashtables.
Most coders prefer indexing systems, because they load stuff back faster than hashtables.
On the other hand, Warcraft 3 is not enhanced with multi-dimensional arrays, which means that each variable (with array) can hold a maximum of 8192 instances. Hashtables can hold a data amount of 408000 instances. Although these are numbers that you can see in posts around the forums, I really doubt someone has ever tested 408000 instances at the same time, simply because the game would crash for using such a high amount of memory, not to mention that having 408000 units on the map is nearly impossible (lag-wise).

So, we focus on these conventional numbers and we seperate indexing systems from hashtables.

• Arrays are faster to load than hashtables (the timing issue is almost negligible to be honest, it's a matter of 0.076 extra seconds).
• Arrays can hold less data than hashtables.

I prefer using hashtables, as I find them easier to use, whereas Indexing systems can become a bit messy and it is easier to make mistakes.

Finally, for someone that begins their course into actual triggering, I recommend hashtables, because they are more newbie-friendly. :]
 
Level 3
Joined
Jul 8, 2008
Messages
28
:vw_death:

Sry Pharaoh_ but i know the difference after all, ive seen enough maps with Jass -> Gui / Mui -> maps with Indexes -> and 2 Different Type of Codes for one thing like Mui + Jass so my idea wasnt to learn the differents or Equiualent of parts of it. i Only need help with Learning EXACTLY Hashtables :thumbs_up: thx anyway
 
Level 9
Joined
Oct 11, 2009
Messages
477
Yeah..... The question your asking about can be explained through many ways.... Like bribe said, you are asking not for a specific question but a bigger question.
 
Status
Not open for further replies.
Top