• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

SC2's jass replacement (preview)

Status
Not open for further replies.
Level 31
Joined
Jul 10, 2007
Messages
6,306
Anyone know if we can declare variables anywhere within the function and have those variables retain scope for the block of code they are in? (vars inside while loops etc).

Furthermore, anyone know if we can choose how big we want the arrays to be? Like rather than the default array at 8k size, pick our own sizes?

Can we return arrays?
Can we take arrays?

The next interesting question would be pointers, but I doubt it ; |. Like, for example... have a true linked list with new and delete, lol... I know blizzard's not going to give us that kind of power : O.

Multi dimensional arrays?

These are all some interesting things..

Oh yes, namespaces? I sort of see files and I'm assuming each file is it's own namespace or w/e.

eh, so many questions ;o.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,197
Asking unawnersable questions? We have yet to get any custom map to view such structures. Melee code is not exactly the best for discovering coding.

I have seen evidence pointing towards firstly the ability to modify units in every way via triggers and that arrays will be difiniable to certain sizes, but no hard code showing it.
 
Level 5
Joined
Nov 6, 2005
Messages
28
Actually, they seem to have copied C in that it has to be:

JASS:
if (bool)
{
   //Soemthing.
}

As in, required brackets. How annoying. Also, semicolons are the devil. They took the bad features of C and kept them. :/

Otherwise, good ol C (hopefully with structs included?).

What you consider the "bad features", I consider very good features. :p


Edit: random info, I broke a map by typing "int" instead of "integer" when writing a JASS trigger just recently. xD
 
Last edited:
Level 12
Joined
Aug 7, 2004
Messages
875
It's just C-like syntax. Java uses C-like syntax and so do a bunch of other languages, including this new one.

Btw how'd you get the AI natives? You opened some MPQ file? sc2 .mpq files can be opened with current mpq programs?

I do like C-like/Java syntax, atleast its not JASSlike retarded that requires vJASS and Vexorian to step forward... I don't like some random programmer make a tyranny out of language mod, lolz jk...
 
Level 10
Joined
Sep 29, 2006
Messages
447
Anyone know if we can declare variables anywhere within the function and have those variables retain scope for the block of code they are in? (vars inside while loops etc).

Furthermore, anyone know if we can choose how big we want the arrays to be? Like rather than the default array at 8k size, pick our own sizes?

Can we return arrays?
Can we take arrays?

The next interesting question would be pointers, but I doubt it ; |. Like, for example... have a true linked list with new and delete, lol... I know blizzard's not going to give us that kind of power : O.

Multi dimensional arrays?

These are all some interesting things..

Oh yes, namespaces? I sort of see files and I'm assuming each file is it's own namespace or w/e.

eh, so many questions ;o.

If these things were implemented, maps would be highly advanced. I really hope they're there, along with object-oriented programming.
 
Level 2
Joined
Feb 8, 2010
Messages
17
So, what would you guys recomend I learn, just to get a head start on the new language. I dont know any language at all. Should I learn JASS? C? JAVA? Or maybe I dont need any of them?

I realy want to learn this language early on, so I dont end up using GUI forever like I did with Wc3.
 
Level 16
Joined
Feb 22, 2006
Messages
960
the question is what do you want to do with your knowledge
Learn Jass if you want to get an idea how programming languages work and combine it with your hobby (wc3). Jass is a good start to all this stuff since the syntax is descriptive.

Java and C are far more advanced and so not that easy to learn.
I would recommend Java if you want to do something not wc3 related ... it rocks^^
 
Level 2
Joined
Feb 8, 2010
Messages
17
Im not interested in doing other stuff, only want to learn the Galaxy language. So, learning JASS will make the learning of Galaxy Language easyer? Or do I have to start from scratch when it comes out anyway?
 
Im not interested in doing other stuff, only want to learn the Galaxy language. So, learning JASS will make the learning of Galaxy Language easyer? Or do I have to start from scratch when it comes out anyway?

Learning any language would make it easier but if you want to get used to syntax then I'd suggest learning either java or C#.

(Yes C++ works too but I wouldn't recommend it to beginners)
 
Level 14
Joined
Jun 13, 2007
Messages
1,432
If you're families with GUI you will have an easier time learning jass and once you've understood jass pretty much all programming languages will become clear too you in most cases.
 
Level 9
Joined
Nov 28, 2008
Messages
704
The AP Comp Sci program in America and International focuses on one language and that is Java. So expect many people to assume the syntx looks like Java.

Funny. In Canada, it is Visual Basic.

And Java has OO. This does not. This is C, sadly.

I guess I'm going to have to make a vJass equivilent for this, sigh. I was hoping for full OO on units and such, which isnt that bad to code, but yeh. A pain to have to do it anyways.

Anyone know how fast a grimoire-equivilent is going to be made so I can just bind an exe to a hacked Galaxy Editor?
 
Level 9
Joined
Nov 28, 2008
Messages
704
I did post on your idea thread, LifelessOne. But god knows, anything Vexorian does is going to find some way to make me hate it (see: refusal to add priority to libraries, and ++ += and such) and probably yours will as well.

The best way to make me happy is to do it myself.
 
Level 14
Joined
Nov 18, 2007
Messages
816
refusal to add priority to libraries, and ++ += and such
I find it funny that you ignore the ability to require other libraries, which in this case acts much like prioritization, except it also sorts the content of the libraries correctly, so that you can actually use required libraries. About those operators: I think Vex added += and the like to ZINC. ++ and -- need to die (i think its horrible syntax, just a bit better than && and ||). And you could never implement them properly in JASS.
 
Level 9
Joined
Nov 28, 2008
Messages
704
I find it funny that you ignore the ability to require other libraries, which in this case acts much like prioritization, except it also sorts the content of the libraries correctly

Ah, yes. This. I hate having to require libraries. Useless waste of time when I make a bunch of simple functions and enjoy them being used by all libraries. Why should every library I make that depends on that simple base have to have me retype "needs" or "uses" or "requires"?

Surely JassHelper can figure out a few dependencies on its own, making "requires" unneeded. Which is why my preprocesser (tentatively named Universe) will be doing away with requires and do that itself. Also, it will make libraries and scopes one and the same, since I see no reason to separate the two like Vex did.
 
I disagree, ++, -- are immensely useful, especially in loops. I also happen to like && and ||, although I admit using the words "and" and "or" is probably much more clear.

the best part of them is that:

Code:
x = x + 1;

turns into:
mov eax, _x
add eax, 1
mov _x, eax

while

x++;

turns into:
mov eax, _x
inc eax
mov _x, eax

and the opcode 'inc' is WAY faster than 'add', making them ideal for loops. Specially since Galaxy is JIT compiled; no much optimization is done while the game compiles it.

In other words, it improves performance.
 
Status
Not open for further replies.
Top