• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] GUI vs JASS

Status
Not open for further replies.
Level 6
Joined
Jan 2, 2007
Messages
189
I know jass is 'better' than gui (speed, performance...blah) but cant gui be just as good or at least nearly as good? If one cleans up all (or like...95%) of the memory leaks, can't gui perform just as well? I know that you can do hundreds of more things in jass but can't regular gui triggers work just as well? I don't know, I guess I was just wondering if gui is "outdated" and if I should take learning jass seriously.
 
Level 3
Joined
Jan 31, 2008
Messages
66
i myself prefer gui.... muchly because i don't know much about jass.... and gui can do as much as jass.... only a bit less.. use world editor unlimited, it has more functions based on jass than the original world editor that comes with warcraft3.... :xxd:
 
Level 27
Joined
Feb 22, 2006
Messages
3,052
Locals and natives are the main reasons for JASS, amongst many. Especially locals. They allow for far superior multiplayer maps, as it is difficult and inefficient to use globals for multiinstanceability (the ability to run effects multiple times without overlap). Also, JASS is easier to use once you learn it, as you simply have to type as opposed to dealing with lots of clicking and windows and field changes.
--donut3.5--
 
Level 15
Joined
Jan 16, 2008
Messages
1,244
If you intend to make great spells, don't even think about using GUI. For example: You try to make a knockback spell. You set the triggers right, but you don't get smooth knockback, so you input wait thingy. While the trigger is on wait, another event occurs to start that trigger and changes it's variables. Why? Cause they're globals. So what happens? A unit ends up who knows where. And if you use special effects, there is no way to say what's gonna happen to them... I don't know JASS very well but i'm trying hard to learn it. I think you should do that too.
 
Level 6
Joined
Jan 2, 2007
Messages
189
lol ok it sounds like jass is the way to go. But, is using gui bad? I know I can't do half of what I can do in jass and jass is a LOT better mui, but will a map that runs with mainly gui (with a good mix of custom scripts) lag and not function as well? So I guess a better question is: will a map that runs on gui triggers function and work just as well as a map that runs on jass scripts?
 
Level 20
Joined
Apr 22, 2007
Messages
1,960
lala1990 said:
and gui can do as much as jass
Absolutely not. Jass allows you to declare your own functions, use locals, return bugs, and tons of native functions that aren't included in the GUI.

Here's something you need to know. Each GUI action (and condition, for that matter) is just a Jass function call. Now, in Jass, there are two function libraries : common.j and blizzard.j. common.j contains all native functions which are hardcoded and faster than their custom counterparts. blizzard.j contains custom functions written by blizzard which are supposed to be helpful and make things easier. Now these functions are referred to as BJ functions, and really, most of them aren't useful at all and are just slow wrapper functions.

The thing is, most (and really, most) of GUI actions/conditions point to BJ functions. So with GUI you can't achieve maximal speed because of the use of BJ's. You also can't exploit locals, so you have to make some sort of cheap MUI system with globals (which are also slower than locals). You can't use the return bug which allows you to typecast handles (very useful, believe me). And still, I'm probably forgetting tons.

So yeah, Jass mega-wins.

vJass wins even more.
 
Level 6
Joined
Jan 2, 2007
Messages
189
OK, so using gui triggers (with little to no leaks) can perform just as well as jass. However, jass is faster to use when you learn it and is muuuch better when using MUI. ...Makes sence, thanks to all. Eh...why not plus rep.

EDIT: And...If I do use mostly gui for the time being, can I remove all (or most) of the leaks created by gui? I know how to remove leaks I just was also wondering if some leaks required long nasty functions in jass.
 
Last edited:
Level 21
Joined
Aug 21, 2005
Messages
3,699
Most of the leaks created by gui can be removed with custom scripts yes. However, you should know what leaks and what doesn't. For instance: Create X units at point not only leaks a point but also a unit group. You have to use "set bj_wantdestroygroup = true" before using such an action. I myself didn't even know it leaked before I turned to the dark side of the scripting.
 
Level 6
Joined
Jan 2, 2007
Messages
189
ooooh ok. I guess I just have to read up on some forums to see what other things leak and how to clean them up. Thanks all :) (lol dark side of scripting)
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
Eleandor, that's a myth.

Reread the CreateNUnitsAtLoc function - it recycles the group.

JASS:
function CreateNUnitsAtLoc takes integer count, integer unitId, player whichPlayer, location loc, real face returns group
    call GroupClear(bj_lastCreatedGroup)
    loop
        set count = count - 1
        exitwhen count < 0
        call CreateUnitAtLocSaveLast(whichPlayer, unitId, loc, face)
        call GroupAddUnit(bj_lastCreatedGroup, bj_lastCreatedUnit)
    endloop
    return bj_lastCreatedGroup
endfunction

On-topic to the thread, though...


GUI is naturally about 1/2 as fast as Jass, due to nasty things called BJs, as well as a shitty converter. Also, the style GUI is coded in makes it even slower, to do with the fact that far more leaks are created which must be removed, etc.

To the people who say GUI can do almost as much as Jass:

While GUI has most of the functions that Jass has, the main disadvantage of GUI (excluding speed) is the way it is structured; not leaving access to functions makes much more 'personal' (meaning systems and such are much harder to create) as well as less flexible triggers (Tempted to say code, but we're talking about GUI here). Having access to the structure (functions, local variables, loops, etc) means you can code in such a way to have much more readable and flexible code... it's something you will never really understand until you learn Jass.

Also, Jass (well-written anyways) is far easier to read and write than GUI once you know it, since while the pictures and structure of GUI looks pretty at first, it requires much more text to convey much less information, and is much messier in general. Also, Jass is pure typing, so you don't have to click through countless sub-sub-sub-(etc)-menues.

Also, MUI has been raised - yes, it is much easier to achieve MUI in Jass.

As for the question of speed; as mentioned, GUI is much slower. However, that doesn't matter in much cases, so most of the time you won't notice the difference. It mainly matters when you have very fast periodic functions (.01-.04 timer) or long loops.

Also, if you still want more evidence, notice how everyone who is promoting GUI has not learned Jass, while everyone who knows both promotes Jass (except Need_O2, but it's more than likely he's joking, considering his usual attitude).
 

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,550
GUI can be as clean as JASS, that is true, and it's pretty fancy when you have a small trigger, but if you took a look at Blizzard's campaign triggers as I did... well, you wouldn't be so convinced of it's fanciness... in JASS you can use spaces, separating if/then/else, loops, etc.
And what PurplePoot said is right.
In locals, a separate variable is created everytime it is declared, so it doesn't overwrite, global variables are like objects, so everytime you set them, the last value they held is discarded. Which is crap if it held a location/group that needed to be deleted =P.
At least that's my theory ;p
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
ooooh ok. I guess I just have to read up on some forums to see what other things leak and how to clean them up. Thanks all :) (lol dark side of scripting)


In GUI I think you basicly only have access to group leaks and point (location) leaks.

Just read the "Things That Leak" sticky (atleast the first few comments of it).


except Need_O2, but it's more than likely he's joking, considering his usual attitude

Yea it is, I threatned him I would put that in my sig... he went and shot himself (joke) *evil laughter*
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,230
The only way for GUI to be as good as jass is where it is purly custom script actions. That is JASS anyway so why not just use JASS in the first place.

The answer is JASS is better than GUI, and that can not be argued appon.

Anyone who disagrees with this should wake up and learn about computers. The only possiable way GUI can be better than JASS is it is more like pusodocode so is easyer to use but many find JASS equaly as easy if not easier to program in.

This has been argued appon in the past a lot of times, and JASS has always won and will always win for WC3 TFT atleast.
 
Level 11
Joined
Feb 18, 2004
Messages
394
Ok people... I didn't want to... but damn, now I must...

* Earth-Fury inhales deeply

I've been in the WC3 community since right around the time of RoC's release. In that time, I've used both the GUI and the JASS programming language extensively. (Years for each.) In all of that time, and throgh learning things beyond the scope of WC3, but applicable to it, I have this to say on the whole "GUI VS JASS" debate:
  1. Anyone who claims the GUI is better suited to any task is wrong, unless they are too mentally deficient to learn to program well. (If that is the case, they shouldn't even be using the GUI. They should be playing with coloured blocks like all special people.)
  2. Anyone who claims the GUI is techincally equal or superior to JASS ("GUI can do everything JASS can" / "A clever GUI user can do everything a JASS user can") is wrong.
  3. Those who believe the main reason to use JASS is because of BJ functions (or the lack theirof) are missinformed. (It is a reason, and in the end, a rather small one.)
  4. Those who believe the main reason to use JASS is because of locals are also missinformed. (It is much more complex than that.)
  5. Those who believe the main reason to use JASS is basically any one specific thing are wrong.
  6. Those who believe the GUI is completely useless and unable to be used to create something of worth are wrong
  7. Most people who get in to WC3 modding and get really good at it eventually learn to use JASS, and eventually agree with all us "GUI haters".
  8. In the end, the language you use to script your map does not matter as much as creating a fun an unique map.
  9. And finally, 99.99% of the WC3 community is incapable of creating fun and unique maps, using either the GUI or JASS.

Why JASS is better
Note: This list is far from complete
  • The GUI is based around Triggers. While triggers also make up a large part of the logic behind JASS code, triggers in JASS are much more a feature than a design paradigm. Basing a language around event-based objects is not so bad, however it lacks the flexability of a function-based language. It should also be noted that the GUI is a horrible implimentation of an event-based language.
  • The GUI uses many functions which serve little purpose other than simplifying the interface by compressing a lot of logic in to a single "action". When coding in pure JASS, the responsability of compressing logic falls mostly on the coder, instead of the system designer. That adds additional flexability, at the cost of some ease of use.
  • The GUI uses many extra function calls which serve no purpose at all. (Namely, wraper functions which simply call a native with a few paramiters changed around, or with the exact same paramiters. Function calls in JASS are slow, and thus such useless functions do have a mesurable effect.)
  • The GUI, when writing code of its own for things such as conditionals (If-Then-Else) writes horrible code. Not simply from the perspective of editing the code it writes, but from the perspective of speed. It again uses many function calls which are not needed, as well as other stupid, stupid things. (If-Not Condition-Return False-Else-Return True, such a thing can be compacted down to Return Condition)
  • The GUI's abstractness from the underlying JASS language can cause confusion and unseeable errors. (An example of which is the lact of distinction between a Rect and a Region.)
  • Some functions from blizzard.j (The script file from where most of the functions the GUI uses come from.) are coded poorly and contain errors. (Destroying a boolexpr is, within JASS, an error. Condition() returns the same boolexpr for the same function input, thus it does not create a new handle object on every call with the same input. That means destroying a boolexpr can have unforeseen consiquences.)
  • When a user has a decent and equal level of experience in both the GUI and in JASS, most and eventually all things become easyer to do in raw JASS code.
  • The inflexability of the GUIs basic design means that some things which are often simple when coding in raw JASS, are insane to impliment or completely impossible to do in the GUI.

This goes outside of the list as it is so important: The main and biggest reason why JASS is better is because of the flexability it offers. You are able to effectively reuse code, create fast and efficient code that, in a few dozen lines, does what it could take 20 long GUI triggers to do. The general way in which you program when you begin to get good at programming changes, and things become much easyer, simpler, and generally better. You begin using more complex data structures as you understand them. You begin using systems which are more complex to write, but much simpler to use. You eventually far surpass the limits of the GUI, and do things you probobly didn't think possible before. (And yes, it takes time and effort, like all good things.) (Let it also be noted that no, GUI users can not evolve to that stage of programming simply because of the limits the GUI enviroment places on them. Period.)

Why People Who Say the GUI is Easyer to Learn are Wrong
The title of this section is a bit misleading. The GUI is easyer to learn to use. And using it effectively and easily requires no third party tools. However, most people who say that the GUI is easyer to learn also attempt to say that JASS is much harder to learn. A long time ago, that was true. Not anymore.

In the modern WC3 modding community, there is a massive amount of documentation on the JASS language. There are also tools such as the JASS NewGen pack which make coding in JASS easyer and faster. Such tools also often provide refrences, such as the function finder and auto-complete features found in NewGen.

However, back in the day there was much less documentation, fewer tutorials, and less powerful and verbose tools. The diffrence in the learning curve of the GUI and JASS was much wider a gap. However, it should also be noted that most users of the GUI at the time did not know about things like memory leaks, causing maps to be generally slower and less stable. (There was also no method of adding single lines of JASS script to a GUI trigger. It was one, or the other.)

In summation, GUI is easyer to learn than JASS. It will always be so by the very design of GUI: lists of possibilitys presented to you at every point along the line. However, JASS is rather easy to learn these days. There are also many tools such as the JASS NewGen pack which aid greatly in learning and using the JASS language.

Why People Who Say JASS is Not Worth Learning are Wrong
In this modern world, computers are becoming bigger and bigger parts of our lives. Learning to use common programs such as a web browser, a file manager (Windows Explorer), and a word processor are becoming necessities in this world. Learning to use the GUI does give some usable skills which can be applied elsewhere; however learning and using JASS gives you many more useful skills. Learning to program may seem like a useless effort to some of you, but it is not. It is an awesome way to "break in" to learning a lot more about not just how to use computers, but also how to simplify or change the basic way they act.

Learning JASS gives you a much clearer understaning of how most modern programming languages work. Learning JASS also gives you much better actual experience in programming than the GUI does. JASS is also a relitively simple language to learn, while still being based around the same constructs and concepts most modern languages are. That makes JASS a wonderful language to get started with.

The End

If I think of anything else to say, I will edit this post.

Edit History:
  1. Minor changes and new section, "Why People Who Say JASS is Not Worth Learning are Wrong"
 
Last edited:
Level 6
Joined
Jan 2, 2007
Messages
189
Ok. I didnt intend on this thread to be a battle between jass vs gui (...despite the title). I was just wondering if a map created with gui and custom scripts was "inferior" to a map that uses 100% jass. I already know jass is better and yes, I probaly should learn it. But anyways, is sounds like a map that is triggered with gui is not "inferoir" to a map with jass. Thats all I needed to know...but nice post earth-fury.
 
Last edited:
Level 29
Joined
Jul 29, 2007
Messages
5,174
Ok. I didnt intend on this thread to be a battle between jass vs gui (...despite the title). I was just wondering if a map created with gui and custom scripts was "inferior" to a map that uses 100% jass. I already know jass is better and yes, I probaly should learn it. But anyways, is sounds like a map that is triggered with gui is not "inferoir" to a map with jass. Thats all I needed to know...but nice post earth-fury.


GodsHand, a map that is made from GUI and from JASS (for MUI and such things) is inferior... by so little it doesn't really matter.

Unless you leak really a lot or something, it shouldn't really matter a lot in game-play-ability matters.
So people thta know JASS would tell you "Ah ! this could have been better !" but all it will do is increasing the speed by such a little value in human eyes it really won't matter.

A map made ONLY from GUI however, if you want your stuff to be MUI you will need to use tons of variable arrayes and really long triggers that could be about 1/10 the size in JASS. Most of the spells can't be MUI even when using arrayes, and can be at max PUI (one unit per player) and that... sucks.

If you want to move to JASS i'd suggest you to use JassCraft (no don't scream about vJass vJassers, its my own suggest and you can go to hell :gg:).
Its really easy to learn there and if you know basic programming stuff (like locals and how functions work) it will be extreamly easy for you to make things with it :)
 
Level 14
Joined
Nov 20, 2005
Messages
1,156
With a minimum amount of custom scripting (to clean up leaks), you can do most things with GUI, just considerably less efficiently (probably amounts to an order of magnitude, actually), if you know exactly what you are doing.

And if you know exactly what you're doing, you could learn JASS pretty easily. Actually, I'd say that if you don't know JASS, you don't know what GUI does, and hence don't know exactly what you're doing.

So, yes, GUI can do most things JASS can, but it's harder to do complex things, harder to maintain, MUCH slower (I'd estimate 10+ times slower for really complex things), you end up with much more code, you don't really know what you're doing (making troubleshooting harder), and it takes longer to do (aftet you learn JASS).
 
Level 6
Joined
Jan 2, 2007
Messages
189
Ok well it sounds like Jass is the way to go. Looks like I am perminatly moving to "the dark side of scripting". And yea PurplePoot, I'm going to need a lot of help...in future posts...
 
Level 6
Joined
Jun 30, 2006
Messages
230
Would any of you be surprised to know that the majority of DotA is done in GUI..? I know some of the coders who have been around a while know this, but I thought that surely a map like DotA (the game is great, its the people who play it publicly or if you are 'pro' I'm not fond of) would have good coding behind it. It doesn't. In some cases it is downright awful.

Good coding does not mean its a good map, neither does a good map necessarily have good coding!
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
Would any of you be surprised to know that the majority of DotA is done in GUI..? I know some of the coders who have been around a while know this, but I thought that surely a map like DotA (the game is great, its the people who play it publicly or if you are 'pro' I'm not fond of) would have good coding behind it. It doesn't. In some cases it is downright awful.
I would say that that's proof that GUI sucks :) (That DotA has plenty of it)

Good coding does not mean its a good map, neither does a good map necessarily have good coding!
We never said it does o_O. However, Jass is much nicer to use on the coder side, and also, as stated, GUI has much worse lag problems.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Would any of you be surprised to know that the majority of DotA is done in GUI..? I know some of the coders who have been around a while know this, but I thought that surely a map like DotA (the game is great, its the people who play it publicly or if you are 'pro' I'm not fond of) would have good coding behind it. It doesn't. In some cases it is downright awful.

Warning! All DotA lovers do not read this!

As if DotA is such a great game, so what if it is played by 8 aged kids for 6 years or so (I guess they are 14 now?), that can't simply get out of their dream that DotA is the best thing in this world.

All DotA lovers can start reading from here

The (don't read this) only (ok continue reading) things I find good in DotA are the spells, by the means of orginality, you can say "no way, it was copied from diablo/{anyOtherGame}" but hey, about 99.999999% of the games that are lunched today to public gaming are atleast half copies of previous games.

Stop reading here!

In conclusion (my own conclusion, I don't care what you think): DotA sucks...
 
Level 1
Joined
Jan 19, 2008
Messages
6
i want say . before i write some jass functions, i'll wirte it by gui.
if fact, gui and jass as same as improtant with us to edit warcraft maps.
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
Play DotA and use GUI forever

(I like dota's AI versions for real... smashing bots can make me feel good with Chaccaron background music)
 
Status
Not open for further replies.
Top