Other Languages Like JASS?

Status
Not open for further replies.
Level 2
Joined
Jul 28, 2012
Messages
10
Hi, I have played WC3 for ages and love it. I would love to be able to create high quality maps, but I have no programming experience. My first question was, what exactly is JASS? It's just a programming language Blizzard made specifically for WC, is that right?
I was thinking of getting some books on programming, just as a hobby and out of pure curiosity. I would love to learn basic, fundamental programming. I have heard C++ is the most commonly used code for game design. Would C++ be relevant to JASS at all or are they completely different? Any books you would recommend? Thanks!
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,207
yes it is the langue of wc3

every language got the same basics. like they got variables, local variables, if then else stuff and so on. however they are not allways called the same. I have heard from a friend that java is the most common for starters but I dont know.

and btw the ++ is like vjass you will learn C not C++ for now atleast.
 
You can try anything. :) JASS has a couple of concepts that are shared with others, but not that many. For example, it doesn't have OOP. vJASS will simulate that a bit, so if you know vJASS it may be easier to dive into a topic of OOP or encapsulation, etc.

I first started off with C++ (so do tons of others). The other common one, AFAIK, is Java. Both have their benefits. C++ compiles directly into .exe files and it is a staple-language (most programmers have tried it at one point or another). Some people choose Java because it is a bit more standardized or even "neater", to an extent.

Or you can be weird/cool and choose a different first language. Python is lovely and neat. Some people like Delphi/Pascal too.

But in the end, you will find the appropriate language. You just have to experiment. But before you do that, you should learn the concepts and the basic syntax, as most of it will be translatable to other languages. :) Choose a book or tutorial that starts from the ground up--one that assumes you have no knowledge of programming.

My first book was on C++:
http://www.pearsonhighered.com/product?ISBN=013336092X

It was an earlier edition though. You may not read through all of it (it is thick with small print), but it has solid information that will be universally useful, as well as several examples. That might be a bit demoralizing if you are trying it out as a hobby, though. I really like the websites with interactive tutorials, such as in w3schools or this one:
http://www.learn-c.org/
It will be very brief on the topics, but you will learn through example and it'll give you room to experiment. Just have fun with it. Make random projects that will calculate a formula or tell you the time--then you'll rally a bit of motivation to keep you going. :)
 
I personally recommend (in below order)

1. Lua (functions and variables)
2. vJASS (all)
3. c++ (all)


Lua will introduce you to programming with variables, in both regular variables and functions. It'll also introduce you to basic blocks. The idea of types won't be introduced yet =).

vJASS will cover types, functions, control structures, algorithms, and inheritance. Furthermore, it'll cover some data structures and memory.

c++ will cover memory, data structures, algorithms... everything up to programming mastery =)


From here, to cover all your bases, SQL, (php, java, javascript, or c#, server side), and (javascript, ajax, etc, client side)
 
Level 2
Joined
Jul 28, 2012
Messages
10
Would you guys suggest learning a more widely used language like C++ before going into JASS? Is JASS easier or harder than other suggested codes like C++, Lua and Python? Thank you guys so much, you've been extremely helpful! Appreciate it!
 
Would you guys suggest learning a more widely used language like C++ before going into JASS? Is JASS easier or harder than other suggested codes like C++, Lua and Python? Thank you guys so much, you've been extremely helpful! Appreciate it!

JASS is the default language of Warcraft 3. It cannot be used to create tools or what ever. So based on my experience,its hard to learn external languages other than this easy languages like vJASS and JASS.
 
JASS is relatively easier to pick up (IMO) since the environment is smaller in comparison to full-fledged languages such as C++ or Java. I find that it is a great intro to programming concepts, and you can have fun while you're at it making eye-candy spells and cool systems. :) I'd definitely recommend delving into JASS/vJASS. If it doesn't fulfill some of your programming desire, or if you feel like you've learned enough to move on, you can simultaneously pick up a programming language. I often switch between learning a programming language and coding JASS for mapmaking. Both are fun, it just usually depends on what mood you're in.
 
Level 15
Joined
Oct 18, 2008
Messages
1,588
yes it is the langue of wc3

every language got the same basics. like they got variables, local variables, if then else stuff and so on. however they are not allways called the same. I have heard from a friend that java is the most common for starters but I dont know.

and btw the ++ is like vjass you will learn C not C++ for now atleast.

This is pretty much only true while you are talking about the same level of languages... Yea, Java, Delphi and C# are kinda the same with different syntaxes, but you can not really measure Assembly or Basic to C or C++ ;) But well, who the hell wants to work with those primitive languages these days (apart from hardware engineers >_<)?

Would you guys suggest learning a more widely used language like C++ before going into JASS? Is JASS easier or harder than other suggested codes like C++, Lua and Python? Thank you guys so much, you've been extremely helpful! Appreciate it!

I suggest that first you go for something easy first, such as some basic C# or Java. These are not universal, but the framework manages the memory instead of you, and so many things are already in the framework it's amazing. There is really no need to go into it in depth of platform specific knowledge, but for me it was a lot easier to understand memory allocation and such after having a grasp on the way basic functions, classes, structures, inheritance, interfaces and extensions work and the way to break down tasks into simple steps. Then you can go either for C++ or JASS - in contrast to JASS, C++ takes a tad lot of time to learn, since it's such a huge language (and I don't even know if it's possible to memorize all of it), but it's a universal, standalone one.

EDIT: Also, going into C++ after having learnt C# can be a bit confusing at first, since many things work in a different way. In C# you have no header files so all of your functions are defined in-line, whereas you can do the same in C++, but the tendency is defining the function header separately. I can't say I'm really into C++ yet, ATM I don't have the time to learn it apart from some basic knowledge like pointers, separate headers, etc... I wish I had the time to do that, but I guess I'll learn it anyway in the university
 
Last edited:
Level 23
Joined
Apr 16, 2012
Messages
4,041
yes it is the langue of wc3

every language got the same basics. like they got variables, local variables, if then else stuff and so on. however they are not allways called the same. I have heard from a friend that java is the most common for starters but I dont know.

and btw the ++ is like vjass you will learn C not C++ for now atleast.

that is not true anymore(was in 80's) because C++ is translated to assembly streigth without touching C at all, while vJass goes to Jass

People should realize that C and C++ are two different languages with very similar syntax and thats also just because of backwards compatability

You dont need to see pure C code once to master C++, so its not good to say go learn C and then C++(thats even logic in our school), thats wrong and slows you down, becuase if you are learning C++ streigth away you will learn most of C as well because of the fact they are so similar

Just to point out before someone jumps on me, C++ code is as maybe 5% slower then pure C code and thats just because of shit like vTables and stuff or RTTI info so no saying C is faster then C++ is not valid as well(there are compilers that beat the shit out of the code so it runs the fastest possible)
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
You guys are incredibly cruel people... Suggesting C++ as your first language is like wishing you had aids. C++ is a badly designed language either way, and should not be used as a learning tool to newcomers. Unless you're a hardware or high-end game programmer, don't use c++. Hell, once you look away from AAA games, you'll see less and less c++.

If you want something "similar" because you eventually want to learn c++ anyway, at least start off with Java or C#. Otherwise, there are other languages better suited for learning to program.

Personally, I think Visual Basic or Oberon (2) are excellent languages to introduce people to programming. I prefer Oberon, because although it's an obscure language that nobody uses, it's relatively easy to go to both c++ and jass afterwards.

Once you have a solid understanding of general purpose languages, you should look into specialized programming languages. Specifically SQL and functional languages such as Haskell or Lisp.
 
Level 15
Joined
Oct 18, 2008
Messages
1,588
Because C++ is like vJASS compared to Java which is like GUI
(source : Meg)

I wonder about that... Java and C# are pretty much better than C++ in many fields, except when it comes to lower level or resource intense tasks. Whereas vJASS, or even JASS is always superior to GUI, since GUI has nothing over JASS, but it's harder to see the whole code in GUI. In contrast, managed languages tend to make developing faster by simplifying commonly used syntaxes, whereas everything GUI can offer is a simple JASS function. And navigating between the GUI menus take so much time it generally takes 3-5x as much time to create a simple cycle in GUI.

So let me correct it for you:
C++ is like vJASS compared to C which is like GUI.

This is a bit closer to reality ;) Never underestimate managed languages :p GUI, on the other hand, is trash, since by itself it won't even make cleaning up leaks possible, nor will it do it itself.
 
Level 5
Joined
May 6, 2013
Messages
125
Note how Almia quoted, so i believe your correcting the wrong one. And while i surely disagree about the "better" part, its all personal opinion, so i wont argue about that. It might be because its 3:30 in the morning, i am dead tired and madness is simply taking over me, it might be because i've spend my last 2 weeks writing c++ and assembler, or a horrifying combination of both, but i start to interpret a meaning into that quote that it most certainly isn't supposed to have. Well, heres the boiling stuff that is currently crawling out of my brain:
If you ever only learn Java, Javascript or similar high level languages, you will never actually learn what happens behind the scenes. There are numerous java-only programmers out there who do not even understand the concept of pointers or dynamic memory allocation, who wonder why that difference between "String str = """ and "String str = new String()" and all that stuff. In order to understand executables on a level you need in order to create hacks like the ones in JNGP, you need knowledge of the internals, stuff like dynamic memory allocation, modules, calling conventions, pointers, winapi etc.
And you don't even have to go that deep to see the benefits of the knowledge you gain from lower-level-languages. Take leaks as an example. As a c++ programmer, i needed little time to actually understand where they come from and how to avoid them, because i understand the concept of pointers, handles and dynamic memory allocation. If i only ever learned html or something like this, all those concepts would be way less clear, and i probably would have had more problems learning what they are, just like i see a lot of people on this forum fighting with them.
Which brings us back to the quote. Java is like GUI, in that it shrouds the reality in a fency looking environment. You have absolutely no plan about whats going except for the general return values and the little description they give you. Selection of Player x has a little wait inbetween as it syncs the selections, select units for player might cause desyncs as it uses getLocalPlayer, and you don't even have any kind of clue that all this happens. It gives you the illusion to have a "location variable" when in fact its actually a "location handle variable", much like in java, where String str is a pointer to a string rather than an actual string object. Funnily, they also share the attributes of beeing slower, and both are more or less converted into some other language (well, GUI converts to JASS, Java is run by a program written in C. Always makes me laugh thinking about that one.)
Jass, or for that matter, vJass, would be the equivalent to C/C++ as it requires you to have knowledge about what you are doing in order to work correctly, rewarding you with faster, just as easily readable code if you know what youre doing, while punishing you with horrendous amounts of leak and an even slower code if you dont. And it's giving you the information about what is actually happening. (I have my own little issues with vJass as it, again, shrouds the reality a bit, but whatever)
I guess some people just prefer the pink fluffy comfort those high-level-programming languages trade in for effectiveness and control, and in the end, even c++ is quite a lot of pink fluffy comfort. Everybody has to find how much control he is willing to give away for how much pink fluffy comfort, but always keep in mind: in the end, a curious person will never come around leaving his pink fluffy fortress and stepping down into the uncomfortable swamps of lower programming languages.

And now, in the end, dumping all the information i have given in this long post that nobody is ever gonna read anyways, disregarding any common sense which should tell me to advice easy programming languages at first and potentially pouring oil into a possibly upcoming c++ vs java war:
take c++. If you really mean it, and if you constantly find things you want to program, you won't give up. And if you dont give up and constantly program things, you will learn it. Don't pick the pink fluffy fortress. They are trying to lure you with its fluffiness, but once they put their grasp around you, you will have hard times escaping from that horrifying place that once seemed so attracting.

(using posts to learn englisch. hurray)
 
Level 15
Joined
Oct 18, 2008
Messages
1,588
By managed languages being better in cases I meant that in case of simple applications, such as an RSS reader for a mobile phone or such, managed languages are faster to develop with and the performance drop isn't really a problem nowadays. But hell, I won't ever try to make an A, and especially not an AAA game in C# or Java.

So the point is, the area of usage is different.

About the fluffy fortress - yea, that kinda makes sense. Once you are into java, it's kinda easy to slip on the differences when trying to go for C++ and falling face first. But starting out straight with C++ is a cruel way of learning the basics :)

Oh, by the way, congratulations to writing that wall at 3:30 :D
 
Ok... seems like my little intro thing was semi ignored


When I teach brand new programmers how to program, people that have never programmed, regardless of background (business, art, etc), I teach them

1. Lua
This will introduce the basics of programming, break them in. Programming is mysterious to a lot of people, so this shows what it's all about without having to deal with types. It is a great introduction to functions, variables, and control structures.

2. vJASS
This will introduces types and the workings of a function brilliantly. It also brilliantly shows the design of if statements and loops. Furthermore, you will code custom allocators from scratch, which'll introduce you to memory ;). This will really get you into knowing a lot about programming.

3. c++
Why c++ and not c or c#?

This will teach you OOP + Good modern design practices. This will also teach you all about memory, it takes it a step up from vJASS. It just really goes from the vJASS level to the mastery level.


So Lua = beginner
vJASS = intermediate
c++ = expert


I've taught quite a few people programming live and have never failed to teach them to it in a way that they'd understand it, regardless of background ;). Well, there was one person, but they didn't even know math, so >.<, not much I could do, lol. Like, they didn't know what ( ) was for.


So that is my recommendation. Don't start with c# or java, ur ganna get overwhelmed. Don't start with vJASS, u'll be a bit overwhelmed. Start with a simple scripting language. I recommend Lua because you can declare functions like variables, which makes it much more beginner friendly.

Lua is like the most beginner friendly language there is. You can work with it online, no need for any tools.

I also recommend that you have someone teach you Lua rather than work off of online tutorials, that way you can focus on what you should be taking away from that language

1. introduction to syntax, comments
2. variables (numbers only)
3. calling functions (they are instructions, and you can execute those instructions)
4. calling functions with arguments (give instructions more detail, like X eggs vs 6 eggs)
5. local variables, intro to blocks (do block)
6. making functions (variable syntax)

That's all I recommend that you cover from Lua, from there you move on to vJASS ; ).

1. Comments (to get into the language and show other ways, plus to get more into blocks with /* */)
2. Variables (just the basic types, whole numbers and double again, showing how Lua differed from vJASS, experiment a bit to show value ranges and get into memory)
3. Calling functions + more variables (show that you must pass X arguments into the function, unlike Lua, plus introduce handles, not strings yet) + number systems + more on memory
4. Arrays + Strings + Substrings + Colors (colors use haxadecimal)
5. Boolean expressions, if statement structure (start to get into data structures, introduce indexed array)
6. Loops (start to get into algorithms)
7. Functions (return, local variables, etc)

And from here, you get into more and more stuff, like stacks, allocators, heaps, and so forth. Probably a list of ~20 items ;).

After this, you get into c++. The first thing would be function syntax and the main entry point of a program. After this, you can go crazy with memory.
 
First of all, C and C++ are not interchangeable, so don't make that mistake.

If you go for C++, do it right.

Get Bjarne Stroustroup's book and read that shit.
Then get Effective C++ by Scott Meyers and read that shit too.

But seriously now, you should probably not start with C++ as a first language (C++ was my second language, vJASS was my first).

Go for Lua.

When you can actually make something, play around with Haskell or Python (You might find Haskell beautiful to a certain extent), THEN move to tougher languages like C++.

edit
I actually agree quite a lot with Imp Midna, but I don't know if C++ should be your first language.
It depends on how capable you are at understanding and applying a set of rules.

Seriously, most people simply can't program. Computer Science courses in University have huge drop-rates in the first semester.

If you have any sort of experience with any programming language, go for it.

Most people who have used C++ for a while hate it, but it's a good hate. ;)

Also, don't touch Java. It's not the performance (which happens to be really good nowadays), it's not the cheap way of being cross-platform (in fact, it's not actually cross-platform because you still have to address OS-related matters in some cases), it's Sun.

They're dicks, okay?

C++ has a defined standard approved by the ISO and an incredibly rich standard library that keeps getting better and better.
Both the standard library and Boost (Considered to be like a second standard library as most of the people who develop the Standard library develop Boost as well, and it happens to contain a lot of the up-coming C++14 features like boost::eek:ptional or boost::make_unique ;D) are developed by highly-skilled professionals who know what they're doing and who actually use the language and promote it. C++ is not some product owned by a single company, it's a community effort. Another good advantage is the amazing documentation and specifications for everything you'll find in the standard. Java's docs are lacking and incomplete and Sun's engineers are dicks at the bug-reporting forums.
 
Last edited:
Level 23
Joined
Apr 16, 2012
Messages
4,041
C++ was my second language, vJASS was my first

Lol thats the exactly same order as how I learned the languages

Anways, I think LUA->C/C++ may cause some problems, because LUA is dynamically typed language, and C/C++ are not, which may be hard for some people to understand

Please dont forget this is my own opinion and noone needs to flame war over my thought
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
another try: I see nothing wrong with starting with C or C++, they are similar so I would start with C++ right off the butt, but people may prefer C for some reason.

Its true that LUA can introduce people to some nice things like function definitions, but I personally would maybe be a bit screwed when you would try to introduce something like variable types to me, it would most likely make no sence at start, so I think starting off with variables is not that bad, because going variable types -> no variable types is better imho then no variable types -> variable types

And I agree, I bought a C book once, found out I got robbed because I knew everything that was in the book at the time I bought it.

I think there are very good websites like learncpp or even cplusplus(more or less official site)

Im not trying to convince anyone, this is just my opinion
 
C is a completely different language.

The most complex data structure you have available to you in C is an array. (Structs can count too, but eh...)

C++ brings you much more than that. The learning curve, however is somewhat like a Sigmoid curve, so for C++ to actually be better to you than C, you'd need to learn to use it right and take advantage of smart pointers and templates correctly. Variadic templates are also nice sometimes, but you won't use them very much in practice.

C expects you to do all the memory management on your own, which is not that hard really, but it's pretty easy for segfaults and other memory errors to pop up. C++ makes it harder for you to make memory errors if you use the STL because of the RAII idiom and because of how smart pointers (like the reference-counted shared_ptr and the non-copyable but moveable unique_ptr) allow you to manage the lifetime of dynamically created objects.
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
you can always screw up making two differently scoped unique_ptr's to share the same memory address :D But yes as someone here made point eariler, if I was to learn LUA/java and stuff like that, I would never really understand how it works on a bit lower level(memory managment mainly)

I think C's FILE is more complex then array :p
 
@CMDHowie: I looked inside the book you posted and it looks pretty neat. I'd certainly recommend giving it a try. One of the key things you want in a C++ book is exercises (rather than just telling you all this information and slapping code in your face), and it seems to have some at the end of each chapter. Overall, that book looks like it has a fun approach to it. Just make sure to experiment a bit--it'll help you remember everything. Also, take it in increments.

But I'd say it looks good for its price!
 
Level 5
Joined
Jun 26, 2013
Messages
49
Use C++/Qt bcz standard C++ libs are dead like C, delphi, fortran etc.

Java forces to use inefficient structures even if you don't want to use them.

The future is C# but .NET is still not propagated into many platforms.

And don't the f try to create your own game engine on DX or OGL, there are thousands of LGPL/MIT engines.
 
Level 15
Joined
Oct 18, 2008
Messages
1,588
windows itself looks lke its going to shit, how can C#, exclusivly windows language have future?

Mate you know you just asked us to bring here the endless war about whether C# has no future or is the supreme language?

As things are for now, C# has a future - no matter what you say, most computers run Windows even today. And, since it's already the main field of games (this is a huge factor), developers will keep focusing on it. And because they do, it won't die. Or not for a long time.

From this comes that C# and .NET has a pretty solid future. Especially in areas where the speed of production is high priority and there is no need for high performance tasks.

But tell me, from what did you come to the conclusion (one that has been popular for god knows how many years already) that Windows is dying? From the fact that in the last 5 years Windows had a superiority as an OS with more than 80% share? Or the fact that the suddenly popular Mac OSX slowly raised to 10% in 10 years? Let's say that Windows slowly dies at the same rate - it will still take up to 80 years in best, 50 years in worst case. Given how fast IT evolves atm, I wouldn't go into such assumptions so easily. So, unless someone suddenly creates an OS that is superior to Windows in every aspect, it still has a long way to go.

So unless you are some kind of oracle or prophet, just stick to the present and the statistics. As of now and the near future, C# is still a very viable language.
 
funny no one mentioned good old pal, Haskell! Some love for functional programming languages. Specialy one as practical as Haskell. I remember making a full 3d pong game in less than 150 lines with it. those languages can really save time if used correctly. Plus it's so awesome that things that take 30 lines in java or c++ can be done in 2 or 3 with it. (high order funstions and monads ftw!)

My personal suggestion: Ruby or python, both languages are pretty easy and are pretty practical for web programming and simple games.

C and C++ are a bit hard for starters since you need to manage memory pretty well and you can really mess up the program if you fall into a segmentation fault. Plus, programming games on them, without correct libraries or an engine is almost suicide. big companies use them due to the fact they have good compilers and allow you to optimize a lot since they are kinda close to machine language (you can even inline assembly in them xD).
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
Why do people keep suggesting that programming newcomers (or anyone for that matter) learn C++? It's an excessively overcomplicated language that gives you all sorts of powerful tools that essentially nobody should be trusted with, and the advantages you're supposedly getting (such as slightly better efficiency) are not things most people will benefit from regardless. C#, Java, Python etc may be marginally slower, but they're much more attractive options for 99.9% of what anyone will ever want to do.

In addition, as BlinkBoy pointed out, there are lots of fun alternatives! Haskell is one example, and Scheme is my personal favourite example of a very different and fun language to learn which will teach you a thing or two about programming methodology which you won't get from any of the standard list of procedural or object-oriented languages.
 
Why do people keep suggesting that programming newcomers (or anyone for that matter) learn C++? It's an excessively overcomplicated language that gives you all sorts of powerful tools that essentially nobody should be trusted with, and the advantages you're supposedly getting (such as slightly better efficiency) are not things most people will benefit from regardless. C#, Java, Python etc may be marginally slower, but they're much more attractive options for 99.9% of what anyone will ever want to do.

In addition, as BlinkBoy pointed out, there are lots of fun alternatives! Haskell is one example, and Scheme is my personal favourite example of a very different and fun language to learn which will teach you a thing or two about programming methodology which you won't get from any of the standard list of procedural or object-oriented languages.

If I may add something, Prolog is also a nice option if you want to learn a crazy way of thinking out problems. It really gives you a more opened mind at solving problems, since programs are described on first order logic.

In my opinion, in order to be a full programmer, one should learn atleast learn one language of each category as:
Imperative Languages (structured programming: C, OOP: Java)
Functional Languages (Haskell, Scheme or Erlang)
Logical Languages (Prolog or Mercury)
full OOP languages (Smalltalk)
design languages (UML, ER, OCL, SPEM, etc)
interpreted megamixed languages (Ruby, Pearl, Python, pretty nice tricks you can do with them)

Learning for instance a functional language made me make code way shorter when programming in an imperative language which supported lambda calculus, such as C#, Php and Ruby. Learning logical languages taught me a lot of formality and good logical order at making my classes and modules, specialy when making databases. UML and ER are the best languages to learn to think from a top-down view. In my opinion, design is a must for any project which will be bigger than 1000 lines of code.
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
BlinkBoy, you forgot one of the most important categories: data definition/manipulation languages (i.e. SQL).
I'd also say that to be a full programmer, you need to know a generic programming language and SQL. You really don't need to know prolog or haskell. Unless you intend to specialize in one of those languages, you'll never *actually* use it.
 
BlinkBoy, you forgot one of the most important categories: data definition/manipulation languages (i.e. SQL).
I'd also say that to be a full programmer, you need to know a generic programming language and SQL. You really don't need to know prolog or haskell. Unless you intend to specialize in one of those languages, you'll never *actually* use it.

SQL falls within many of the other categories. Basic SQL (the basic insert, delete, update, create, blah blah) is considered within a functional paradign. However, PL-SQL is imperative. Mainly SQL is a multiparadigm language.
 
  • Like
Reactions: Rui
Status
Not open for further replies.
Top