Can someone explain to me the benefits of writing up pure galaxy code for your map, instead of just using the trigger system?
It seems like the trigger system is a much easier, quicker, more noob friendly way to do things in galaxy.
So what is the point of writing pure code of galaxy? Such as, whats the point of the milky way editor that is being made.
Dont take this the wrong way, I just have no idea what benefits and control you get from writing your own code with galaxy, id really like to know them to give me an idea on its capabilitys.
Well writing certain elements in pure Galaxy code can simplify the implementation for the really complicated portions of your map. Of course, in SC2, with the more enhanced abilities of the data editor, complicated triggers are not as necessary. In WC3, some things were almost impossible to do without actually delving into JASS2, but even in SC2, for coders it's often easier (and definitely faster) to just write systems in code instead of mucking through a GUI system.
So far, I don't feel the need to recommend learning Galaxy to make triggers in SC2. If you're comfortable with the GUI and uncomfortable with coding, stick to the GUI. It's more powerful than in WC3, with the ability to define custom functions and any amount of local and global variables, and your own structs and whatnot...
Well, the most important thing to me is the much higher writing speed.
Even if I know exactly where everything is in the GUI, I'll still need relatively long to select everything, to load all this lists with variables and functions and so on.
When I can just write everything down without having it to seach somewhere it's much easier and so much faster - given the fact that I know what I have to write :P
Let's take some math as an example. I want to add some numbers and variables. In GUI I'd have to select each value and add them via the arithmic function.
In Galaxy I just write
i=a+b+c+d;
It might only save me a second or so, but given the fact how much we have to work with triggers that amounts to minutes and hours.
Also, I am used to programming languages like C+ + or Java, so I'm very familiar with the look and way of working of Galaxy right off the bat.
Next is the better overview. Actions in GUI sometimes are so horribly long that you have to scroll back and forth, left and right to see the entire function.
The same function. But so much shorter. Of course the parameters look more cryptic in Galaxy, but you get used to it.
Especially long and complex triggers become easier to read. You can also format your text just like you want to, which is impossible in GUI.
In general you have more control over your triggers. Even though GUI can do most of what pure Galaxy can, there's still quite a couple of things that are easily done in Galaxy, but more or less impossible in GUI.
And you can code more efficiently in Galaxy. Not by a huge margin (since GUI does a good job there), but still more efficiently (performance-wise).
Well, using the Galaxy Editor would be a good start :D
Or the notepad+ + has a plugin for it already I think.
About the include, it's
include"TriggerLibs/NativeLib"
At the top of the document.
In maps it's included by default. So unless you're writing map scripts externally and import it into the map mpq then you probably won't worry about that.
Hey,
Can someone explain to me the benefits of writing up pure galaxy code for your map, instead of just using the trigger system?
It seems like the trigger system is a much easier, quicker, more noob friendly way to do things in galaxy.
So what is the point of writing pure code of galaxy? Such as, whats the point of the milky way editor that is being made.
Dont take this the wrong way, I just have no idea what benefits and control you get from writing your own code with galaxy, id really like to know them to give me an idea on its capabilitys.
I think that one benefit is that in GUI you need to select and search for all commands, when in Text Based Interface you can type it.
Well writing certain elements in pure Galaxy code can simplify the implementation for the really complicated portions of your map. Of course, in SC2, with the more enhanced abilities of the data editor, complicated triggers are not as necessary. In WC3, some things were almost impossible to do without actually delving into JASS2, but even in SC2, for coders it's often easier (and definitely faster) to just write systems in code instead of mucking through a GUI system.
So far, I don't feel the need to recommend learning Galaxy to make triggers in SC2. If you're comfortable with the GUI and uncomfortable with coding, stick to the GUI. It's more powerful than in WC3, with the ability to define custom functions and any amount of local and global variables, and your own structs and whatnot...
Well, the most important thing to me is the much higher writing speed.
Even if I know exactly where everything is in the GUI, I'll still need relatively long to select everything, to load all this lists with variables and functions and so on.
When I can just write everything down without having it to seach somewhere it's much easier and so much faster - given the fact that I know what I have to write :P
Let's take some math as an example. I want to add some numbers and variables. In GUI I'd have to select each value and add them via the arithmic function.
In Galaxy I just write
It might only save me a second or so, but given the fact how much we have to work with triggers that amounts to minutes and hours.
Also, I am used to programming languages like C+ + or Java, so I'm very familiar with the look and way of working of Galaxy right off the bat.
Next is the better overview. Actions in GUI sometimes are so horribly long that you have to scroll back and forth, left and right to see the entire function.
Another example. GUI
Galaxy
The same function. But so much shorter. Of course the parameters look more cryptic in Galaxy, but you get used to it.
Especially long and complex triggers become easier to read. You can also format your text just like you want to, which is impossible in GUI.
In general you have more control over your triggers. Even though GUI can do most of what pure Galaxy can, there's still quite a couple of things that are easily done in Galaxy, but more or less impossible in GUI.
And you can code more efficiently in Galaxy. Not by a huge margin (since GUI does a good job there), but still more efficiently (performance-wise).
Yeah when I'm using the GUI I just put it in raw data mode anyway, haha.
Whats a good program to write galaxy code in?
And how would i #include the triggerlibs/natives?
@OnetooOne: Go
Well, using the Galaxy Editor would be a good start :D
Or the notepad+ + has a plugin for it already I think.
About the include, it's
At the top of the document.
In maps it's included by default. So unless you're writing map scripts externally and import it into the map mpq then you probably won't worry about that.