- Joined
- Dec 12, 2010
- Messages
- 2,074
It's 2016 already. WC3 as a game pretty much outdated, and the only reason it still exists is custom maps.
Every little thing matters. You are creating another hero arena? Cool. Another branch of a map, which been popular once, but forgotten now? Good for you. But time and efforts aren't infinite for anyone.
Using GUI is like building a scyscraper with a team of retarded builders. They are known for their cheap prices and principles "what you see is what you get", but any of their approaches can't stand any chance in real world. Some of floors are rotated by 90 degrees, and, to compensate it, they added a small rotation over the whole building. Some of floors missing windows or doors, or even locked completely. Instead of proper foundation before building they prefer to drop a plate and start it right now. And, of course, you barely able to control any of those processes - you aren't pro to do so, right?
Pure JASS, instead, is a tool which creates only those agents you'd like to see or use. You playing Black & White here, declaring how should work this or that thing. You can go and create a custom design for one of the floors at any time. You can make sure building won't fall off using solid foundation of some pre-made big systems. As well nobody limits your ideas with a menu of possible actions. Well, except the game itself, but anyway you cannot touch the sky yet.
I'd like to use a list of differences, provided by another scripters, but with slightly changed order:
Let's face them in appropriate manner.
Local variables
GUI doesn't allow to use local variables, there are nothing like that. Maybe Blizz were too lazy to collect them on the top, or too lazy to make wrappers for them and additional rules, but fact is - you cannot store anything temporarily, only permanently. Which means you have to recycle a few globals in order to avoid collisions or create personal global for everything. Flood of variables is the least thing you normally cares about, but handling them is very tricky job.
Faster writing
Remember how a hacker in a movie types stuff in command line and do his job better & faster than a person who uses normal Window's windows? That's kinda exaggeration, but still true in some cases, and WC3 - one of them. GUI is slow to type, you cannot really speak your mind with it. Anyone with typing skills, who used to argue on the net, can type about 80 symbols per minute. Adding autocomplete and syntax highligh there and you'll see drastical changes. When I started it took a day to implement simple changes into various GUI functions. Now I can create a complex skill within 5 mins.
GUI is harsh for CPU
Well, half true. Most of GUI functions are unneccessary wrappers, which adds 1 more action. But there are also totally unneeded overkills like CreateUnit, which uses the slowest approach ever when you need to only create a single unit. On the bright side, human cannot tell the difference in normal conditions. But if you gonna deploy 50 units with this approach you'll meet lags or something even worse. Every non-opimized line increases a chance of dropping weak PC-players or even reaching an operation limit.
So, basically, GUI causes a small overheat, which is getting bigger with everyline you write. And that could be avoided with JASS.
User functions
Copy & paste is very popular method in GUI, since you can't really make a custom functions to move some repeated part aside. This increases chance of errors, floods the code and simply uneffective. You have to do so, because GUI isn't supposed to be clean and shiny, right? But you aren't supposed to have infinite time to fix variable naming, passed to the loops, either.
Limited options
Not to speak of GUI's restricts, there are also no support for some natives, and sometimes it's really big deal. You could already met it. If you didn't, you did something wrong.
Moveability
Knowing JASS, you can take any piece of a code from another map to yours. You can research, learn and re-built anything having only a simple example. You don't need a guidence anymore - in case of similarities you can freely explore how it's done and repeat without any issues. JASS code is much simpler to move within a single map than GUI, as well.
Overall
So, as I said before, JASS is a language you'd like to use to built your own castle. GUI, instead, is a group of second class builders who supposed to do your job but mostly fails and kills the whole project at some moment. Now let's speak about how to move.
As it states, Just Another Script Syntax isn't a real programming language. You won't see any kind of tricky bit operations here. It have nothing to do with Object-oriented programming neither. And, of course, you don't have to be a high school educated to understand it. If you are native speaker or even just know English well, you'll read whole thing without problems.
It's a scripty thing, which allows you to iteract just with some things, which has been allowed by Blizzards. Wanna check unit's health? Ok. Wanna check which attack type he has? Nope, you aren't supposed to. Instead, you may create a vault with data to retrieve it later with your own functions. Of course, maintainnig it would be completely on you. You can't get out of sandbox you've been provided with.
.. but any experience matters
In childhood I was enchanted by Heroes 3.5 WoG. I loved Heroes 3 very much, and addon's possibilities were like god's blessing. Later I tried myself in programming, but didn't really successed with. But anyway, that allowed me to enter JASS like open door and explore it in the wild. Anyone who ever met and understood scripting (even HTML) should be able to easily get over pure JASS. I don't call programmers here becuase I'm sure they never ever used GUI.
Use proper tools
Plain World editor has been created back to 2003 and never received any goods since then. That means it's outdated, and you have to move onto JNGP as soon as possible, to get those hightlights, hints and tips. They will not only improve your code processes, but Editor's possibilities. Here's a guide and the JNGP . You can as well search for something fresher but that's enough for a start.
Read some basic JASS guides to understand principes of variables and
I had no idea about JASS at all. I made few efforts with GUI before, but no luck. And one day a guy called me and asked for help debuggin a map he found before. It turned out to be Diable Defense, not that small project, with ~3k lines of pure JASS. I started as a total newbie, who had really bad aknowledge of JASS, but was very used to see it's results in DotA. 2 months later I dissected whole thing into ~100 triggers, basing on it's dependancies and effects. Since then I only learned various tricks and special issues, but JASS itself wasn't a problem anymore at all.
Apply your knowledge
No matter how good you, rust is always coming. If you don't train yourself, you will forget simplest things. Gladly here are Google who knows pretty much all default user-cases of JASS usage. I'd recommend to use it like "wc3 jass query" style, so output would be maximum relevant. "wc3 jass create unit", "wc3 jass how to toss unit flying", etc.
Create small snippets of code for your project in custom triggers. Read common.j and blizzard.j for something new. Extract .j files from any non-melee Blizzard map and dive into simple examples of things around. Once those stages are done, you can read something actually worthy reading, like various complex maps you enjoyed to play before.
About vJASS and following
All those OOP stuff, classes, etc, provided with vJASS, cJass and other derivatives aren't obligatory. They aren't needed at all if you gonna work on your map onwards right now. Don't make it's more complex than it is, do your job and make your ideas live. Rest will come with time and experience.
Oh hello, here's global reason to get better - to help WC3 survive. There's dozen of clones around - DotA2's LUA, various open source and free-to-non-commercial-use engines, even SC2's editor, and more to come. Players actively migrate onto different games, creators can't handle the static community and leave as well. That means every creator is valuable, and the better you project will be - the better chance of living for WC3 as well.
I know no projects which has been written on GUI and turned out to be successful since 2010. There are examples before that date, but not since. Learning JASS isn't just a blant, useless idea - it will grants you ability to understand flow of any script in future.
Every little thing matters. You are creating another hero arena? Cool. Another branch of a map, which been popular once, but forgotten now? Good for you. But time and efforts aren't infinite for anyone.
Using GUI is like building a scyscraper with a team of retarded builders. They are known for their cheap prices and principles "what you see is what you get", but any of their approaches can't stand any chance in real world. Some of floors are rotated by 90 degrees, and, to compensate it, they added a small rotation over the whole building. Some of floors missing windows or doors, or even locked completely. Instead of proper foundation before building they prefer to drop a plate and start it right now. And, of course, you barely able to control any of those processes - you aren't pro to do so, right?
Pure JASS, instead, is a tool which creates only those agents you'd like to see or use. You playing Black & White here, declaring how should work this or that thing. You can go and create a custom design for one of the floors at any time. You can make sure building won't fall off using solid foundation of some pre-made big systems. As well nobody limits your ideas with a menu of possible actions. Well, except the game itself, but anyway you cannot touch the sky yet.
So, why you should move?
Let's start from obvious things which actually matters directly.I'd like to use a list of differences, provided by another scripters, but with slightly changed order:
- You can have local variables
- It's faster to write (once you get used to it)
- The way GUI converts into jass contains alot of useless function-chain calls and double negative conditions
- You can't write custom object-oriented code in GUI
- There are certain natives available in Jass that are not available in GUI (i.e. setting the z of lightning objects)
- You can easily transfer Jass code from one map to another (Just CnP) but you can't do this as easily with GUI
Let's face them in appropriate manner.
Local variables
GUI doesn't allow to use local variables, there are nothing like that. Maybe Blizz were too lazy to collect them on the top, or too lazy to make wrappers for them and additional rules, but fact is - you cannot store anything temporarily, only permanently. Which means you have to recycle a few globals in order to avoid collisions or create personal global for everything. Flood of variables is the least thing you normally cares about, but handling them is very tricky job.
Faster writing
Remember how a hacker in a movie types stuff in command line and do his job better & faster than a person who uses normal Window's windows? That's kinda exaggeration, but still true in some cases, and WC3 - one of them. GUI is slow to type, you cannot really speak your mind with it. Anyone with typing skills, who used to argue on the net, can type about 80 symbols per minute. Adding autocomplete and syntax highligh there and you'll see drastical changes. When I started it took a day to implement simple changes into various GUI functions. Now I can create a complex skill within 5 mins.
GUI is harsh for CPU
Well, half true. Most of GUI functions are unneccessary wrappers, which adds 1 more action. But there are also totally unneeded overkills like CreateUnit, which uses the slowest approach ever when you need to only create a single unit. On the bright side, human cannot tell the difference in normal conditions. But if you gonna deploy 50 units with this approach you'll meet lags or something even worse. Every non-opimized line increases a chance of dropping weak PC-players or even reaching an operation limit.
So, basically, GUI causes a small overheat, which is getting bigger with everyline you write. And that could be avoided with JASS.
User functions
Copy & paste is very popular method in GUI, since you can't really make a custom functions to move some repeated part aside. This increases chance of errors, floods the code and simply uneffective. You have to do so, because GUI isn't supposed to be clean and shiny, right? But you aren't supposed to have infinite time to fix variable naming, passed to the loops, either.
Limited options
Not to speak of GUI's restricts, there are also no support for some natives, and sometimes it's really big deal. You could already met it. If you didn't, you did something wrong.
Moveability
Knowing JASS, you can take any piece of a code from another map to yours. You can research, learn and re-built anything having only a simple example. You don't need a guidence anymore - in case of similarities you can freely explore how it's done and repeat without any issues. JASS code is much simpler to move within a single map than GUI, as well.
Overall
So, as I said before, JASS is a language you'd like to use to built your own castle. GUI, instead, is a group of second class builders who supposed to do your job but mostly fails and kills the whole project at some moment. Now let's speak about how to move.
Moving on
JASS isn't a real language..As it states, Just Another Script Syntax isn't a real programming language. You won't see any kind of tricky bit operations here. It have nothing to do with Object-oriented programming neither. And, of course, you don't have to be a high school educated to understand it. If you are native speaker or even just know English well, you'll read whole thing without problems.
It's a scripty thing, which allows you to iteract just with some things, which has been allowed by Blizzards. Wanna check unit's health? Ok. Wanna check which attack type he has? Nope, you aren't supposed to. Instead, you may create a vault with data to retrieve it later with your own functions. Of course, maintainnig it would be completely on you. You can't get out of sandbox you've been provided with.
.. but any experience matters
In childhood I was enchanted by Heroes 3.5 WoG. I loved Heroes 3 very much, and addon's possibilities were like god's blessing. Later I tried myself in programming, but didn't really successed with. But anyway, that allowed me to enter JASS like open door and explore it in the wild. Anyone who ever met and understood scripting (even HTML) should be able to easily get over pure JASS. I don't call programmers here becuase I'm sure they never ever used GUI.
Use proper tools
Plain World editor has been created back to 2003 and never received any goods since then. That means it's outdated, and you have to move onto JNGP as soon as possible, to get those hightlights, hints and tips. They will not only improve your code processes, but Editor's possibilities. Here's a guide and the JNGP . You can as well search for something fresher but that's enough for a start.
How to get smoother?
JASS could be read like a book. I had very little idea about English back then, but still successfully understood things there and here. Practice makes everything better, so you can go to:Read some basic JASS guides to understand principes of variables and
- function calls.
- Open your or somebody elses map using any MPQ editor, extract war3map.j file and read it.
I had no idea about JASS at all. I made few efforts with GUI before, but no luck. And one day a guy called me and asked for help debuggin a map he found before. It turned out to be Diable Defense, not that small project, with ~3k lines of pure JASS. I started as a total newbie, who had really bad aknowledge of JASS, but was very used to see it's results in DotA. 2 months later I dissected whole thing into ~100 triggers, basing on it's dependancies and effects. Since then I only learned various tricks and special issues, but JASS itself wasn't a problem anymore at all.
Apply your knowledge
No matter how good you, rust is always coming. If you don't train yourself, you will forget simplest things. Gladly here are Google who knows pretty much all default user-cases of JASS usage. I'd recommend to use it like "wc3 jass query" style, so output would be maximum relevant. "wc3 jass create unit", "wc3 jass how to toss unit flying", etc.
Create small snippets of code for your project in custom triggers. Read common.j and blizzard.j for something new. Extract .j files from any non-melee Blizzard map and dive into simple examples of things around. Once those stages are done, you can read something actually worthy reading, like various complex maps you enjoyed to play before.
About vJASS and following
All those OOP stuff, classes, etc, provided with vJASS, cJass and other derivatives aren't obligatory. They aren't needed at all if you gonna work on your map onwards right now. Don't make it's more complex than it is, do your job and make your ideas live. Rest will come with time and experience.
Sounds like hell
Well, probably. Learning isn't easiest thing, thats why people use schools - children have better learning abilities, thanks for natural selection. But there are few really good things you'll get in exchange:- Free to code anything you want.
- Able to reproduce anything what has been seen before in some other maps.
- Less questions like "why my trigger doesn't work" (not at the start though).
- Ability to use any code written by somebody else (JASSers known for awesome systems, GUI isn't that lovely, for obvious reasons).
- Possibility to improve Warcraft 3 community.
Oh hello, here's global reason to get better - to help WC3 survive. There's dozen of clones around - DotA2's LUA, various open source and free-to-non-commercial-use engines, even SC2's editor, and more to come. Players actively migrate onto different games, creators can't handle the static community and leave as well. That means every creator is valuable, and the better you project will be - the better chance of living for WC3 as well.
I know no projects which has been written on GUI and turned out to be successful since 2010. There are examples before that date, but not since. Learning JASS isn't just a blant, useless idea - it will grants you ability to understand flow of any script in future.
Few more benefits
- JASS is easier to debug (since it's easier to read as well)
- JASS strictly follows your order and you always know what every line does (nothing hidden behind "GUI")
- JASS much cleaner than GUI
Last edited: