[Tutorial] Before Jass

Rheias

New Helper (I got over 2000 posts)
Reaction score
232
Before Jass

Introduction

Ever wondered what is Jass that everyone talks about? Do you think you should learn it, but have no idea how, or even why? Well then, this tutorial (more of a mini-tutorial) is for you! Here I will discuss what Jass is, why you would possibly want to learn it, and finally how you can learn it efficiently. The tutorial is made to everyone; there are no requirements to understand this.

I hope you enjoy your read, comments are always appreciated.

What is Jass

Like any other software, World Editor needs to read script to know what to do, everything else but the script is simply to ease the script writing. So for example when you are making “regular” trigger you use Graphical User Interface (known as GUI). What World Editor does is converting your triggers (and everything else, but that’s something else) into script and then reads it. Do you want a proof? Fine, create a new trigger and do with it something. Say create a trigger that will create a footman in the middle of the map for player red every second. Now select the trigger, go to Edit > Convert to text and see what you get, that’s Jass. This is the true scripting language of World Editor, whenever you work with GUI it is converted to the text you see here, and then when playing your map, Warcraft’s engine can read it.

So you know already what technically Jass is, let’s talk a little on how it is built, just to give you some background in your learning process. GUI is made out of events, conditions and actions, and those three are stored inside a whole trigger which stores them all. That’s why GUI is so easy to edit and work with, but it makes it very limited. Jass is made out of functions, each function can serve as event, condition, action, part of one of those three, or something else completely. This makes the working process faster, easier and more flexible. However this article is not to teach you Jass, but an introduction to it, so with that, let’s move on.

Why learn Jass

So we have an understanding of what Jass is, it is the source of World Editor, and everything in it is converted to Jass, the rest of the software is simply to ease our working. Here is a list of the reason why you would want to learn Jass.

  • Typing is faster than clicking - It was tested and proven that it is faster to write in the computer then to use your mouse and clicking it. So technically Jass is faster to use, because you write scripts. In GUI however, you use charts and click on your picked values.

  • Jass can do more things - In Jass there are functions (events / conditions / actions) which you can’t find in GUI. Blizzard didn’t convert all of it’s functions into GUI from Jass because few were unsafe, or simply Blizzard thought they weren’t needed.

  • Jass’ functions are faster - Not only that Jass has more functions, but usually when working with Jass you use natives functions (certain types of functions) which are fast, while in GUI usually you work with BJs (other type of functions) which are slower then natives.

  • Jass does things faster - Not only that Jass’ functions are faster but Jass can do things faster. Because of the clumsy way GUI is organized everything is limited, however in Jass because of the flexible system you can do things with much less lines and functions calls. Also because of that it is faster to write Jass (well at least after you are familiar with it).

  • Jass takes less memory - Well this is hardly noticeable, but yes, Jass takes less memory space, especially because it uses locals and not globals. Also with Jass you can remove all leaks, while in GUI you can remove none (well you can remove some by using Custom Script, but not all even with that).

  • Jass is MUI - Because Jass uses local variables (a special kind of variables) you can easily create with it MUI spells and triggers.

  • Better Loops - Jass’ loops are much more flexible like most things in Jass and allow us completely control them and use them in the best way possible.

  • Systems with Jass - Most of the systems now days (or at least the more advanced ones) use Jass, not only because it is easier to work with Jass but because systems can be used the best with Jass only (we can call with Jass new user defined functions).

  • Jass is easier to read - Once you know Jass well enough it is easier to read, and to edit then GUI, it makes sharing of triggers, spells and systems easier and better.

  • People use Jass - People move to Jass. Lately many tutorials were written what eases the learning by much, so many people decide they can spend the time on learning Jass and work with it, you wouldn’t want to stay with GUI while the rest of the mappers make products for Jass.

  • Jass is powerful - Finally, most of the interesting finds about World Editor are about Jass, GUI is too simply to work on, however some amazing stuff were discovered about Jass what completely changes the programming experience. For example the return bug (well now few problems were found with it but oh well), using conditions as actions and many more things that relate to Jass but completely not to GUI.

So in conclusion there is no doubt that Jass is better then GUI, just re-read the list if you have doubts. If you are interested in World Editor and spend time on it, sooner or later you’ll need to move to Jass because of those reasons, if not you’ll frustrated by your ignorance, believe me, before I knew Jass I remember how frustrated I was whenever I saw a Jass system I couldn’t understand, and now every time I understand what it makes me feel good that I have the knowledge to do that.

The problem that few people think it’s not worth it, that Jass is not better by much, and they are too lazy to spend time on learning it. Well that’s your call, but looking at this list, it certainly seems that it’s worth spending some time on learning Jass for all of these benefits. Anyway ”Knowledge is power”.

How to learn Jass

This is usually the place were people are stuck at. Well, for a start, allow me to give you few links to good tutorials / forums / other lists that try to teach Jass.

Threads & Lists

The index by Amfidamant -- A list with lots of tutorials, search for Jass: Triggering.

A list by IKilledKenny -- To be honest he got pretty much everything here.

Great post by SFilip -- Short explanation about Jass and links to six tutorials.

Those are more or less the best lists, those got almost all links I wanted to give, but I’ll post them anyway so you could access them easily.

Sites & Forums

TH -- thehelper.net of course, where you are probably reading this tutorial.

world-editor-tuts -- Part of thehelper.net contains many tutorials, few of them are about Jass, worth taking a pick. Pretty much the same as:

Offical TH tuts -- Got tutorials, some are about Jass. Most of the tutorials are old in here.
TH's unoffical tuts -- Tutorials submitted which are not official, usually newer ones.

TH's Jass forum -- A whole forum in the TH dedicated to Jass.

wc3c -- Great site that is all about World Editor.

wc3c's Jass Tuts -- Best Jass tutorials in wc3c are all in here.

wc3j -- A website made by KaTTaNa which is all about Jass.

wc3j's tuts -- All tutorials that can be found in wc3j.

Jass Source -- Huge site that explains many things about Jass and it's functions.

And those are more or less the sites, and the forums in them those all contain great tutorials, and you can ask in those sites questions regarding to Jass.


How to learn

Here I will explain how I think is the best way of learning Jass. Allow me to start by saying the process will be hard, it could take you a week to a month to get basic knowledge of Jass and another month to get moderate knowledge.

I would suggest opening with those tutorials:

emjlr3's -- The start is great, it could tell few general things about Jass, the rest is ok in my opinion.

Vexorian's -- Considered to be the best out there, I like it, it manages to teach you many things in short.

Daelin's -- A great tutorial for all of you GUIers.

Im_on_56k's -- A lot of people love this tutorial, I find it decent, worth a read definitely.

a_thing's -- Ok tutorial that can explain few things; make sure you read the other ones first though.

That should get you starting, I suggest you re-read them, especially the big tutorials (Daelin’s and Vexorian’s especially), understanding all of those tutorial would make you have basic Jass knowledge, I suggest you take the time to read all of those. It might take you few days, but if you are serious about learning Jass I wouldn’t suggest skipping on any tutorial, especially not on the big ones.

Now comes the tough part where you’ll need to learn alone. You have a basic Jass knowledge, but you need to continue learning more. Well here are 2 tutorials that might help you.

Classroom -- A few short tutorials that can help you maybe learn alone Jass.

Functions -- This mini-tutorial is made by me, it explains functions in more detail.

Allow me to explain why each one of those links is important. The first one has few tutorials that can get you start working alone, there is especially a nice lesson about JassCraft which can help you a lot understanding how to learn alone. The second tutorial, the one made by me will simply clarify few things about functions, which are bad and which are good and how to create good functions, you probably learned most in Daelin’s / Vexorian’s tutorials, but repeating it wouldn’t hurt.

Basically after reading those you’ll need to learn functions alone. There are two basic ways of doing this:

A) Try converting GUI - Create trigger in GUI and then convert it into Jass, this way you can see how function look like in Jass, it will help you getting started and making simple triggers and spells with those functions. You could learn a lot from doing this, like how to get triggering unit in Jass (GetTriggerUnit()) how to get the target location of a spell (GetSpellTargetLoc()) and so on, you should try that.

B) The second, and better way to do, is to use Jass program (I use Jass Pro Shop and JassCraft) and search in there functions, see why they do, what the take and try to work with those, getting good could really help you avoiding BJs and maximizing your Jass control.

Jass Functions -- A great list by Darthfett that includes many Jass functions, take a peak!!

After you got the some experience with Jass and you learned few more functions, it’s time to get with the slightly more advanced tutorials.

Daelin's second tutorial -- Another tutorial by Daelin, he explains five important things in Jass.

phyrex1an's -- Few nice tips by phyrex1an on how to write effective clean code in Jass.

Second by Vexorian -- Another tutorial by Vexorian which explains triggers in detail.

After understanding those you are on your own. There are still many tutorial on exact aspects of Jass which you might want to read in the links I gave previously. After that you’ll have almost moderate knowledge of Jass and the rest of things that you’ll need to learn will be usually user made rather then Blizzard made (systems such as CSCache and so on).

I hope you enjoyed, comments are always welcomed.

P.S. Please let me know if I posted this in the wrong section, I’m not sure where this should go. ;)
 

Arkan

Nobody rides for free
Reaction score
92
Well written. The reason I converted to JASS was because of the ability to create MUI spells, that was a pain in GUI. Then I discovered how shitty GUI is when translated into JASS...

Now I use JASS for all triggering, it's great once you've gotten the hang of it.
 

Hero

─║╣ero─
Reaction score
250
Nice...

+rep

found an error just to tell you

Jass takes less memory - Well this I hardly noticeable, but yes, Jass takes less memory space, especially because it uses locals and not globals. Also with Jass you can remove all leaks, while in GUI you can remove none (well you can remove some by using Custom Script, but not all even with that).
Well this I hardly noticeable

Should be

Well this is hardly noticeable
 

Rheias

New Helper (I got over 2000 posts)
Reaction score
232
Thanks all for your kind comments.

> Then I discovered how shitty GUI is when translated into JASS...

WastedSavior: "Want to learn jass? take the red pill.. Wanna stay in your comfortable GUI world? take the blue one" :p

> found an error just to tell you

Thanks Hero12341234, doesn't matter how many times I read it I missed somthing. ;)
 

elmstfreddie

The Finglonger
Reaction score
203
> WastedSavior: "Want to learn jass? take the red pill.. Wanna stay in your comfortable GUI world? take the blue one"

I STILL DON'T GET THAT!!!

Anyways, this should be in tutorial submission :eek:

Useful, because when I wanted to learn JASS for the first time, the tutorial I was lead to was a great piece of slow crap :p
This has everything.
Including Kenny's classes which I found the best.
 

ArmedCitizen

Kisses Cats
Reaction score
198
> WastedSavior: "Want to learn jass? take the red pill.. Wanna stay in your comfortable GUI world? take the blue one"

I STILL DON'T GET THAT!!!.

Its from the Matrix. In the Matrix the Red pill showed you the real world where machines controlled the world and humans are just their energy source. If you take the Blue pill then you stayed in the program that is the world as you know it and stay happy and ignorant.

I believe he is trying to say that if you take the Red pill you can see what you can actually do with World Editor and if you take the Blue pill then you can stay only seeing a minor portion of it and never reaching its potential.

Just a guess though. :)
 

Rheias

New Helper (I got over 2000 posts)
Reaction score
232
> elmstfreddie

ArmedCitizen explained it well enough. ;)

Edit: Added 3 more links and fixed few grammar mistakes.
 

Kenoriga

Ultra Cool Member
Reaction score
34
Typing is faster then clicking
Glad I know that too.
Jass can do more things
I didn't know that...
Jass’ functions are faster
Jass does things faster
Jass takes less memory
I guess so... Locals are used only in that particular trigger, am I right to say that?
Better Loops
Systems with Jass
:confused:

"Jass can do more things" makes me think it is powerful!
Great, you make me feel like moving on to JASS now...
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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