GUI vs Jass in spell making

xtian07

Member
Reaction score
2
I am wondering why are there a lot of people who prefer jass than GUI in spell making. For me, I think what can be done in jass can also be done in GUI because jass simply turn GUI into a custom script form. But others say that GUI has a lot more limitations than jass. So, my questions are:
1.) Is it true that jass is better to be used rather than GUI in spell making?
2.) Do jass make working with triggers easier?
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
It all depends on what you need. For simple things, there's no point using JASS, as it can be a lot more complicated than just making one GUI trigger. But if you want to make a huge, entirely customisable system, JASS is the way to go, as GUI is full of limitations.

JASS allows for enormous amounts of customisation; also, there are "invisible" functions that don't appear in the GUI interface but still can be used.

Performance-wise, JASS is usually more efficient, as converted GUI code shows plenty of redundant, unnecessary actions. Clearing up memory leaks also involves a lot of "invisible" functions.

If you have no need to optimise performance, or can survive within the limitations of GUI, don't use JASS. It can take some time to learn. Negligible amounts, but still time.

Accname should be able to give you better reasons.
 

Accname

2D-Graphics enthusiast
Reaction score
1,463
On the contrary: what can be done in GUI can also be done in jass because GUI is just a simple wrapper around lines of jass code.

When saving your map your GUI scripts will be translated into jass, there is no magic around this. And since this is done by a stupid machine it is usually so incredibly bad that you lose alot of performance in this process.

If you know your stuff and code in jass you can make your scripts much faster, shorter, and easier to configure then you would ever be able to in GUI.
On the other hand, you can do much more stupidity in jass if you dont know well enough how to script and thus making your map more fragile to desyncs, bugs, or critical errors. The GUI functions are "safe" they try to filter bad input out and dont allow you (most of the time) to do stupid things.

If you have the time to learn jass, and you really want it, go for it. It will make your maps run smoother, and probably better. There are many things you can do in jass which you absolutely cant in GUI.
If you dont have the time or dont think you can do it, stick with GUI. It isnt too bad nowadays. I have always worked solely with GUI to make my maps (although i study computer science and know how to script) and they worked very well. I was never disappointed with the possibilities it offered.
 

Xan_Kriegor

I can change this now in User CP.
Reaction score
12
I use GUI personally, because I've used it for a long time screwing around in the editor and so I'm incredibly comfortable with it and how it functions. I do know that JASS is, as previously mentioned, a superior way to do mapmaking because of systems and optimization and things but to be honest I'm only seriously making two maps, one of which is small enough that optimization is not an issue and the other I'm working on slow enough that I can almost guarantee WarCraft IV will come out before that map does. I'm also busy with schoolwork so I don't have the time to learn JASS, but that's not the biggest reason why I don't learn it.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
learning jass is actually easy if you know GUI functions (triggering unit, etc) its all about putting it into context that a GUI user can understand... I mean, i can do anything i want to in GUI, theres nothing i couldnt do in GUI that i can do in Jass, but its easier to code in jass and more efficient, and it is a stepping stone to learning bigger and better languages, C++, C#, Java, Python, and ActionScript are all examples of more advanced languages. Learning vJass/Jass before learning these languages will make it all the more easy
 

xtian07

Member
Reaction score
2
Thanks for the replies, now I think I understand the differences between GUI and JASS :D
 

Imp Midna

Active Member
Reaction score
52
And since this is done by a stupid machine it is usually so incredibly bad that you lose alot of performance in this process.

I somehow think that this sentence makes people recieve a false impression. Jass may be faster, thats true, but thats because of the "freedom" you have with it allowing you to solve the same problem on a different way (cant think of an easy example right now, especially since GUI is extremly powerful, but i guess i'd find if i wanted to... anyways). That the GUI creates, for example, a function for every condition instead of connecting them together or reuse an old one will make the actual jass code look quite huge, but it totally has no effective influence of the actual performance of that trigger.
E.g, those 2 triggers:
JASS:
function Trig_Unbezeichneter_Ausl__ser_001_Kopieren_Actions takes nothing returns nothing
    set udg_deb = ( udg_deb + 1 )
    call DisplayTextToForce( GetPlayersAll(), I2S(udg_deb) )
    set udg_deb = udg_deb + 1
endfunction

JASS:
function funcj takes nothing returns nothing
    call DisplayTextToForce(GetPlayersAll(), "VOLUNTEER FOR PROJECT ORION!!!! (smart soldier is smart)")
endfunction
function funci takes nothing returns nothing
    if(not(true == false)) then
        call funcj()
    endif
endfunction
function funch takes nothing returns nothing
call funci()
endfunction
[...]
function func5 takes nothing returns nothing
call func4()
endfunction
function Trig_Unbezeichneter_Ausl__ser_001_Kopieren_2_Actions takes nothing returns nothing
    set udg_deb = ( udg_deb + 1 )
    call func5()
    set udg_deb = ( udg_deb + 1 )
endfunction

(in total, a chain of 16 calls)
Measuring something like the clock cycles using rdtsc where the udg_deb is set and subtracting it by the new time step when its increased the second time, you'll see that the some-kind-of-cycles from the first trigger is about 125000 while the one of the second one is about 135000, while both are jumping up and down in a range of about 10000, sometimes even more. Do it yourself if you dont belive me, but what the GUI-"precompiler" does is nothing that would affect the performance on any significant way.
Erhm, year, so the performance difference affects it if you actually do something entirely differently, e.g. by calling different functions. It has nothing nothing nothing to do with the precompiler.

And as for the limitations of GUI, you can fix most of them by your own. You can, for example, at least create void functions without parameters using pick-every-unit where it cant be reached (after a skip remaining actions eg) or create condition functions using an if. You can use local variables by abusing their namespace (simply put a local integer udg_yourVarName in a custom script in front of the trigger and there you have you locals - be warned that GUI doesnt tell you where you leave the main function though) and you can add almost any function, including the RemoveLocation-Functions etc. into the GUI by changing a few config files.
The only real use i see for jass are systems. Global Systems which are supposed to be used on many different spots, and which would be kinda uncomfortable to use with run trigger - ignore conditions, sutch as hibyte-functions. But really, Jass is totally not that important that many people claim it to be...
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • 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 Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top