Stop using handle vars

Status
Not open for further replies.

grim001

New Member
Reaction score
10
Handle vars and any other system which uses I2H are laggy and bug prone. Why are they still used so often then there are easier and better ways to do things?

If you still use handle vars, post here and you will be educated on better ways of doing things. I'm not posting some huge tutorial or informative post, because I have a hunch that if that was going to work, one of the 10,000 tutorials out there would already have converted the people I am speaking to.:banghead:

So just ask questions and receive answers directly in this thread.
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
Was that a rant I sensed in your tone? :p Yes people, use structs[but you don't have to].
 

martix

There is no spoon
Reaction score
49
So whats the big deal with structs? :p Explain them already, convince us to use 'em...
 

grim001

New Member
Reaction score
10
It's good not to get ahead of yourself. Only use more advanced systems as you find a need for them in your goals. If you get into more complex abilities or system designs you will find the necessity of something more.

So you don't know what structs are at all?
Well think of a location as being similar to a struct. It is a data structure that contains an X and a Y, 2 real values. There are native functions that take locations and do things with them.

Well imagine creating your own kind of data structure called "vector" that contains an X, Y, and Z. And you can create and destroy them at will, and create functions that use vectors just as there are functions that use locations.

However with structs you can contain anything you want inside of them, such as a struct that contains 5 real numbers, 2 integers, some units, or even putting structs inside of structs.

Now imagine making a spell that requires some set of data. You can create a struct that contains all of the data for that spell and attach it to a timer instead of attaching each individual piece of data. (Although there are even faster ways to do this, it is much better than handle vars)

Well that is really just scratching the surface of what you can do with structs and vJASS, but that already completely replaces the point of handle vars or CS Cache.
 

SFilip

Gone but not forgotten
Reaction score
634
People kind of got used to handle vars.
It was simple enough to learn and nobody sees the need in changing it since the system apparently does what they want.
Structs can be hard to understand and implement for someone who got used to I2H based systems, especially for those who have no experience with OOP.
Not to mention that most of them aren't aware of the whole newgen thing (a certain number of people thinks that maps with structs can only be single player and that you need a special war3.exe patch to use them).
 

grim001

New Member
Reaction score
10
I learned vJASS in about 2 days of fooling around with it with no OOP experience whatsoever and that was before there were a bunch of tutorials for it available. I don't think it's a good idea to make excuses for laziness or ignorance. Either way those people are just shooting themselves in the foot.
 

martix

There is no spoon
Reaction score
49
Nah, I don't even bother coming up with excuses, I just admit it...
 
Reaction score
456
>I learned vJASS in about 2 days of fooling around
Most likely that is impossible..

Also, is there any tutorials for these vJass thing things? It's kind hard to leave Handle Vars as they were one of the first things I learnt from jass..
 

grim001

New Member
Reaction score
10
It is not impossible to learn it that fast, it is easy. vJASS is not a new language, it is just an extension of a language you already know. It also has extensive documentation detailing every new feature. The tutorials were mostly on wc3campaigns so you'll have to wait until it comes back up I suppose.
 

substance

New Member
Reaction score
34
There was a perfect tutorial on wc3c called 'moving from handle vars to structs'. I've posted it on these forums a few times and some people actually took intrest.

Too bad wc3c is still down.

Oh and yeh structs arent too hard to learn. I was 'using' them after the first day and a few days later i truly understood how they worked... and i've only been working with WE for about 2 months.
 

Sooda

Diversity enchants
Reaction score
318
You all who learned it with 2 days want to say you just looked at it and understood instantly ? Good for you but many people aren' t with pre-knowledge of any PC language or/ and with logical thinking as good as you have.
With easy examples how to use basic things it turns out to be not so difficult. I got main point by reading 'moving from handle vars to structs' though I didn' t got it working :D . That tutorial also gives solid arguments why to start using structs.
The point behind structs is: "Use global variables !".
 

SFilip

Gone but not forgotten
Reaction score
634
All you need to do is read the JassHelper readme.
Seriously, how hard can it be? It explains everything, most of it made sense to me just by looking at the examples.
As heads up - there's much more to it than structs, waiting for you to find out... ;)
 

Sim

Forum Administrator
Staff member
Reaction score
534
I'm still using Handle Vars.

Mainly because I don't care of its cons, and I'm too lazy to download the GenPack. I do know how structs work, but I don't use them.

> I don't think it's a good idea to make excuses for laziness or ignorance.

Then I will simply state that I still use Handle Vars, without excuses :p

If some day I feel I need to use structs, I'll start using them.
 

Steel

Software Engineer
Reaction score
109
I believe that the Handle Vars is best to use still. When people go to take code that you have given to the public, they just have to copy it. They don't need to download anything else to make it all work. This is why I believe that Handle Vars will be more popular than the OOP.

Sooda said:
You all who learned it with 2 days want to say you just looked at it and understood instantly ? Good for you but many people aren' t with pre-knowledge of any PC language or/ and with logical thinking as good as you have.
With easy examples how to use basic things it turns out to be not so difficult. I got main point by reading 'moving from handle vars to structs' though I didn' t got it working . That tutorial also gives solid arguments why to start using structs.
The point behind structs is: "Use global variables !".
I looked at the examples and I understood it just fine. The only reason is because I've done tons of OOP in the past.
 

grim001

New Member
Reaction score
10
if the person you are giving code to is so lazy that they can't download a program that doubles the power of the programming language they are using, why is it even important to give them code?

they are just going to screw around and make subpar maps because of that lame mentality. leave them in the dust or force them to adapt, but don't cater to their mentality, it's a horrible idea.
 

Steel

Software Engineer
Reaction score
109
if the person you are giving code to is so lazy that they can't download a program that doubles the power of the programming language they are using, why is it even important to give them code?

they are just going to screw around and make subpar maps because of that lame mentality. leave them in the dust or force them to adapt, but don't cater to their mentality, it's a horrible idea.

You need to realize the amount of maps that receive enough coding to actually need OOP is VERY minimal. How many TD's do you think could REALLY use OOP triggers? I could see it being useful in a large AoS or RPG like my own, but for something so minimal, it really doesn't seem...needed.
 

grim001

New Member
Reaction score
10
OOP or any of vJASS's features are never needed, but they almost always make things easier and the code cleaner, even in small maps. Just free global declaration alone is enough to make it always useful. How many more excuses do you have?
 
T

thedude

Guest
The Jass 101 Classroom was dead the last time i checked. I'll try looking at the readme like SFilip said (I have no jass experience)... Since wc3campaigns is down, what good vJASS tutorials do you recommend? Also, should i try to learn JASS first or jump straight to vJASS? Taking into account i have extremely minimal programming experience.
 
Status
Not open for further replies.
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top