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
612
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,462
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.

      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