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.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +1
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top