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.
  • 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 The Helper:
    Happy Thursday!
  • 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

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top