1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Choose your ride to damnation in the 5th Special Effect Contest Poll.
    Dismiss Notice
  5. The winners of the 13th Techtree Contest have been announced!
    Dismiss Notice
  6. The 13th Music Contest Poll is up! Vote for the best tracks in this symphony of frost and flame.
    Dismiss Notice
  7. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  8. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

JASS worth learning?

Discussion in 'Warcraft Discussion' started by Qrom Bellascream, Nov 6, 2017.

  1. Qrom Bellascream

    Qrom Bellascream

    Joined:
    Apr 5, 2013
    Messages:
    150
    Resources:
    0
    Resources:
    0
    If I were to learn jass, would learning other languages such as c++ or python be made easier? Are there any correlations between them? I'm going to start trying jass out in any case.
     
  2. Chaosy

    Chaosy

    Joined:
    Jun 9, 2011
    Messages:
    10,696
    Resources:
    18
    Maps:
    1
    Spells:
    11
    Tutorials:
    6
    Resources:
    18
    Jass is a very clunky language, but there are some similarities on a fundamental level. Variables, functions, blocks and such are in all languages.


    However, there are way more similarities in Wurst or vjass.

    So, yes it would help. But it is not required.
     
  3. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,233
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    I find it's a very good way to come in touch with first programming.
     
  4. Qrom Bellascream

    Qrom Bellascream

    Joined:
    Apr 5, 2013
    Messages:
    150
    Resources:
    0
    Resources:
    0
    Are there any up to date guides? Beginning JASS Tutorial Series I just don't understand where to input the code from the first part of that tutorial.
    When I convert it into a custom text I get the following:
    Code (Text):

    function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
    endfunction

    //===========================================================================
    function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
        set gg_trg_Untitled_Trigger_001 = CreateTrigger(  )
        call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
    endfunction
     
    Where am I supposed to input the "hello world" stuff? Is the pre-existing code supposed to be there at all? This is really confusing.
     
  5. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,233
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    Elemental Coder Guide - here are some other JASS tutorials mentioned.

    Yes, it's normal that there is a default code when you convert from GUI to custom script.

    A GUI trigger can have events, conditions, and actions. "Event" is something that a trigger is registered to. Actions and Conditions are "functions" that are executed when the trigger runs by the registred event.
    Now, for arranging this all, we need to make operations to create a trigger, to bind the event to the trigger, and to define functions as actions, or conditions. This all happens automaticaly in GUI, and the user can't see this. If you convert the GUI trigger to JASS, then you can see the "Actions" function, which is the function which does hold all actions of the trigger, and a "Init" function, which does create the trigger and binds the action to it.
     
  6. Qrom Bellascream

    Qrom Bellascream

    Joined:
    Apr 5, 2013
    Messages:
    150
    Resources:
    0
    Resources:
    0
    Hmm, sounds logical. I'll try it out soon.

    Edit: So here's what I got
    Code (Text):

    function Trig_Trigger1 takes nothing returns nothing
    call DisplayTextToForce( GetPlayersAll(), "Test" )
    endfunction

    //===========================================================================
    function InitTrig_Trigger1 takes nothing returns nothing
        set gg_trg_Trigger1 = CreateTrigger(  )
        call TriggerRegisterPlayerChatEvent( gg_trg_Trigger1, Player(1), "Test", true )

    endfunction
     
    You can probably see what I tried to do, player 1 types "Test" and the game prints "Test". It's not working, though.
     
    Last edited: Nov 6, 2017
  7. Xonok

    Xonok

    Joined:
    Mar 27, 2012
    Messages:
    3,042
    Resources:
    8
    Spells:
    3
    Tutorials:
    5
    Resources:
    8
    (v)JASS is definitely worth learning. It was the first kind of programming that got me any results and ever since learning it I've found other languages easier to deal with.
    Btw, use jass tags instead of code. That way they highlight better.
     
  8. Chaosy

    Chaosy

    Joined:
    Jun 9, 2011
    Messages:
    10,696
    Resources:
    18
    Maps:
    1
    Spells:
    11
    Tutorials:
    6
    Resources:
    18
    The code is not wrong, you just need one more line.
    Use "call AddAction(yourTrigger, yourFunction)
     
  9. Kaijyuu

    Kaijyuu

    Joined:
    Jun 2, 2004
    Messages:
    848
    Resources:
    0
    Resources:
    0
    I've always felt GUI triggers to be an excellent introduction to programming. It was pretty much my introduction as a kid.

    JASS is nice too though I'm not sure it's worth it solely from an educational standpoint. It's got some oddities like its verbosity and the details of how it handles containers (uniform and enforced size of arrays, bolted on and clunky nature of hashtables, type specificness of stuff like unit groups...). If one can do GUI triggers fine and wants to program proper, I'd suggest moving on to python and do some hello world stuff. After that, a strongly typed language like java or some flavor of c. After that one is very much enabled to do any sort of hobbyist programming project and well on their way to being a programmer.
     
    Last edited: Nov 7, 2017
  10. Nowow

    Nowow

    Joined:
    Jun 15, 2016
    Messages:
    443
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    In my opinion, JASS has some nice aspects of visualizing what you do with the code very early on. Also, some of the constraints JASS has requires you to utilize certain programming conventions. but this is the bare basics, after that what kaijyuu said is probably more accurate.
     
  11. Rui

    Rui

    Joined:
    Jan 7, 2005
    Messages:
    8,502
    Resources:
    8
    Maps:
    8
    Resources:
    8
    So you want to know if it's valuable to learn other languages before JASS? I think it is, but if your end goal is to learn JASS, then you don't need to delve too much into them. Once you've grasped the logic behind writing the program, parameter passing and basic function calls (from the API or your own), you're good to go.

    Reversing your question, let me tell you, if you intend to learn other programming languages after JASS, then know this:
    JASS is totally worth learning!
    1. When I enrolled in university and attended my first Java classes, I quickly grasped the basics of Object-Oriented Programming (OOP). But guess what! I had never learned vJASS before my enrollment!

      On most OOP language tutorials, everything the objects do is happening inside the computer. You don't really see it. But with Warcraft III, you do; units, destructibles, items. When you think of a unit, you realize it has properties that you can manipulate. For example, the unit's position on the map. Then, when you see the function
      SetUnitPosition(unit u, real x, real y)
      , it makes absolute sense. This function grabs the unit you specify, and changes its coordinates to a (x,y) of your choice. From there to getting used to the traditional OOP dot notation is a very short distance. ;)

    2. Problems with JASS: it's clumsy, leaks memory for every reason imaginable, and has a fair amount of overhead also for mostly silly reasons. And guess what. This is also great! When I started C classes, the whole deal with memory management didn't seem strange to me at all. And the overheads? They get you thinking on efficiency.

    3. Finally, it won't be strange if you start writing large pieces of code. Then you open it up again a few weeks later and don't have a clue what you did. This gets you thinking on code commenting.
      Though possibly less successfully :croll:
    This, of course, not to mention you'll never struggle with the initial impact of meddling with operators and function calling in a computer science degree, if you ever choose that path. ;)
     
    Last edited: Nov 9, 2017
  12. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,822
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Yes it does make learning other languages easier, however learning any programming language does the same.

    If you plan to make complex maps with WC3 then learning JASS is highly recommended as GUI is kind of rubbish. If you just want to mess around and experiment with WC3 maps then GUI is sufficient.