| 02-13-2004, 03:13 PM | #1 |
i was thinking cause i don really feel like learning JASS so i was thinking if its worth learning. i also wanted to know evrything u can do with jass than with normal trigger. PLZ explain in detail. :WD: |
| 02-13-2004, 07:56 PM | #2 |
Yes, deffinetely, you should learn Jass Why? Well, on the surface, except "local variables" (which one can actually use in GUI by exploiting a bug), there isn't anything in jass that you can't do with UMSWE (umswe has "most" of the actions that the normal GUI is missing from the API). But... What one does with GUI, one can do MUCH better with Jass. With jass, you can do complex trigger spells that support many instances of the spell (f.ex. if many players are casting a mass-sleep spell) "without" creating variables/triggers for each player. You can also manage handle memory leaks much easier, So you won't leak as much and slow down people quitting. You can also most often create big triggers using much less code. It is also generally easier to create big complex algorithms by writing them instead of clicking the incredible number of button you need to in GUI (you won't believe this for now, but if you learn JASS, write some, then turn back to GUI, you'll be annoyed by the time it takes you to go through all those windows). The trigger also becomes much more optimized (if you know what you're doing). And you can also do smarter Iteration statements. However, it's not easy to learn Jass unless you have someone guiding you. Well, sure you can convert triggers to jass and go from there, but there are alot of things to know (as the GUI-converted triggers are just plain ugly), and also the lot of good programming-practices it's good to learn. But for now, there aren't a whole lot of really good Jass Tutorials for beginners, i learned jass using a OLD OLD Tutorial that some good guy made here, that is likely now on the bottom of the Forum-archive. But beside that one, and the other ones sunk down there, there isn't a whole lot of stuff. There is ofcourse the jass.sourceforge.net - and some Tutorials in the tutorial-section. But the sourceforge one f.ex. is a better "reference" and stuff for advanced readers (ones who have experience in other languages f.ex.) and the tutorials in the tutorial section are kinda focused. So...eh, i am trying to pull myself together and write some quality tutorials for different people. Anyways, you should deffinetely go and learn jass. Cubasis |
| 02-13-2004, 09:34 PM | #3 |
Jass is procedural programming. If you ever have used Pascal or Fortran (where you are at the advantage as the syntax is NEARLY identical) then you will be very easily accomadated with Jass. I have to unfortuantly extend that statement, Jass is procedural programming with objects. Therefore if you have some C++/Java knowledge then this is for your benefit as well. Get any programming language tutorial. I would suggest a visit to the jass manual as it explains nearly all the constructors and blocks of the jass programming language. namely: Loops,If statements, and functions. I say you don't really need a tutorial as you can ussually use a tutorial in any langauge and with enough time can "translate" easily. F.ex: You'd like to assign the ascii values for characters A to Z in an array called letters. In Java you can just do this: Code:
int[] myletters =new int[26];
for(char c='A';c>'Z';c++){
myletters[c-'A']=c;Code:
local integer array myletters local integer i='A' loop set myletters[i-'A']=i set i=i+1 exitwhen i>'Z' endloop I'd suggest downloading that ultaedit build that cubasis suggested and keeping Common.j open at all times. It just makes the learning process easier. Really the only thing I use the GUI for now is to get events as they are mostly forgettable. |
| 02-13-2004, 09:37 PM | #4 |
It is probably just me but I love loop, exitwhen and endloop, and hate for, while, and until (although until is somehow like exitwhen) You don't actually need to learn JASS, but if you are able to it will open a lot of doors to you and make your map take less space and run better. |
| 02-13-2004, 09:43 PM | #5 |
I like the for loop myself. I guess I'm just a fan of having my code as short as possible. I'm also know to do the try catch and and select case. |
| 02-13-2004, 10:28 PM | #6 |
Love select case... |
| 02-13-2004, 11:45 PM | #7 |
I personally prefer an Object Oriented Language. Also I like garbage collectors. Currently I'm considering changing all my crappy GUI triggers into JASS code and write a small java program that parses it and fixes the many memory leaks the code has. :bgrun: Why, oh why, did I postpone learning JASS for so long. Bah. |
| 02-13-2004, 11:50 PM | #8 |
Jass can be object oriented see coolers thread on how to make classes. Its a nice addendeum. But its still for the most part procedural. |
| 02-13-2004, 11:51 PM | #9 |
Unless the objects have a state I'm not interested. :bgrun: |
| 02-13-2004, 11:54 PM | #10 |
what do you mean state? |
| 02-14-2004, 12:25 AM | #11 |
Well, you know, like it can remember stuff. ;) For example when I do myObj.myInt = 1 , I expect it to have that value when I later on use myObj.myInt . |
| 02-14-2004, 12:44 AM | #12 |
Thats exactly what we do is emulate that. Only you call it like ObjGetInt(MyObject). See my backpack system if you have doubts on object oriented jass. |
| 02-14-2004, 12:51 AM | #13 |
Note to self: Must stop being so lazy. It looks good, but I did notice somebody stating that it took 4-5 times as much times as normal array lookup. But I guess it has its uses, for example I've often wanted to associate each unit with an object (not all but some). |
| 02-14-2004, 12:53 AM | #14 |
3-4 times is generally concieved as being completely unnoticable on anything above the bare minimum reqs. Trust me it makes life much easier to have it object oriented. |
| 02-14-2004, 12:57 AM | #15 |
My map already is a bit on the slow side. :) But where I can see a reasonable advantage to using it, I'll of course use it in the future. So far I haven't had anything I couldn't easily do without making objects. I'm after all well versed in most programming styles. * pats himself on the shoulders * |
