1. Melee Mapping contest #3 - Poll is up! Vote for the best 4v4 melee maps!
    Dismiss Notice
  2. The 30th edition of the Modeling Contest is finally up! The Portable Buildings need your attention, so come along and have a blast!
    Dismiss Notice
  3. We have a new contest going on right now! Join the 11th Music Contest! You are to make a Cinematic modern sound-track for this contest, so come and compete with other people for fun.
    Dismiss Notice

Best of the Wurst 9

Discussion in 'Latest Updates and News' started by Frotty, Dec 27, 2018.

  1. Fingolfin

    Fingolfin

    Joined:
    Jan 11, 2009
    Messages:
    3,140
    Resources:
    152
    Models:
    142
    Icons:
    1
    Packs:
    4
    Skins:
    2
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    152
    Man, this looks like exactly what i always wanted. I've generally been really impressed by how clean scriping becomes with Wurst, and the workflow of using VSCode is also a good way of getting around the shitty built-in text editor of Wc3. With all my current maps, i'm stuck using version 1.28 with JNGP on a separate laptop, which is.... less than ideal.

    @Frotty, very few Jass-users use BJs if they can help it. Sure, for maybe 80% of the cases, the overhead of wrapping a function call has no effect on performance whatsoever, and i am all for readability over overzealous optimization. However, for things like physics simulations or other heavy systems which run at 30Hz, the accumulated overhead of having all funcitons called essentially twice can make a big difference, and i've also noticed that nested function calls inside loops can have a really weird impact on performance. I love the tuple functionality for this reason, i've previously been using struct-based Vector and Quaternion libraries in Jass, but they get much worse performance than what you can get with tuples.

    I am guessing that Wurst also nulls local variables for you?
     
  2. Sir Moriarty

    Sir Moriarty

    Joined:
    Jun 13, 2016
    Messages:
    251
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    It does perform auto-nulling, yes.
     
  3. Frotty

    Frotty

    Wurst Reviewer

    Joined:
    Jan 1, 2009
    Messages:
    1,324
    Resources:
    9
    Models:
    3
    Tools:
    1
    Maps:
    3
    Tutorials:
    1
    Wurst:
    1
    Resources:
    9
    Thanks. I hope you will be able to use it.

    "big difference" might be a bit overstated, since there are often other things you could optimize instead, but sure, it is a measurable improvement.
    Optimizations are great, but should be, for the most part, handled by the compiler and no the user.

    Of course :)
     
  4. Robbepop

    Robbepop

    Joined:
    Mar 6, 2008
    Messages:
    861
    Resources:
    7
    Maps:
    6
    Spells:
    1
    Resources:
    7
    Sorry if this has already been asked but: What happens with Maps using WurstScript when a new WarCraft III version is released?
    Can the map still be compiled for new WarCraft III versions without requiring an update to WurstScript and associated tools?
    Would be pretty painful if the world stops as soon as there is a new WarCraft III patch and modders can no longer test their maps on B.Net due to incompatibilities.
     
  5. Sir Moriarty

    Sir Moriarty

    Joined:
    Jun 13, 2016
    Messages:
    251
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    Wurst does not depend at all on the current WC3 version, except for common.j and blizzard.j files.

    Maps compiled with Wurst should be forward-compatible with future patches, unless there is something that Blizzard breaks (which happens rather frequently, these days).

    There is usually no update to Wurst required, with one exception - if either Blizzard.j or common.j changes. Even then, the map should still compile and work with the old versions of these files, you will just be unable to use new functionality.
     
  6. Robbepop

    Robbepop

    Joined:
    Mar 6, 2008
    Messages:
    861
    Resources:
    7
    Maps:
    6
    Spells:
    1
    Resources:
    7
    Thanks for the fast response!

    Definitely the way to mod in today's WarCraft III scene!
     
  7. Frotty

    Frotty

    Wurst Reviewer

    Joined:
    Jan 1, 2009
    Messages:
    1,324
    Resources:
    9
    Models:
    3
    Tools:
    1
    Maps:
    3
    Tutorials:
    1
    Wurst:
    1
    Resources:
    9
    Yeah, as @Sir Moriarty said. There isn't really any particular difference between a map generated by wurst and a map made using world editor and GUI.

    Some wurst maps did break e.g. when blizzard screwed up event-ids, but so did any other map relying on that data.

    Things that do get broken by patches are e.g. the runmap command, if blizzard changes the way how wc3 and maps are run again.

    Stuff not related to the map that can break is e.g. running warcraft from VSCode, if blizzard changes how warcraft is run *again*.
    But usually we are quite quick to catch up.

    :thumbs_up:
     
  8. Robbepop

    Robbepop

    Joined:
    Mar 6, 2008
    Messages:
    861
    Resources:
    7
    Maps:
    6
    Spells:
    1
    Resources:
    7
    How does WurstScript behave towards variables defined in the associated map that is also used for terrain?
    Especially for rects (udg_X variables for every rect) it is really convenient to create them there and access them as their "udg_" name or make another variable assign to that in the map's script during init.

    tldr; is it possible to interact with GUI variables? (especially locations, rects, etc.)
     
  9. Sir Moriarty

    Sir Moriarty

    Joined:
    Jun 13, 2016
    Messages:
    251
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    I haven't used this functionality myself, but;

    When building/running a map, Wurst will copy the war3map.j file from the map and automatically add it to your project. This is done every time you run/build a map. Consequently, any code/variables defined in war3map.j will be accessible to you in Wurst.
     
  10. Fingolfin

    Fingolfin

    Joined:
    Jan 11, 2009
    Messages:
    3,140
    Resources:
    152
    Models:
    142
    Icons:
    1
    Packs:
    4
    Skins:
    2
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    152
    Is the runmap command backwards compatiable with older versions of Wc3?
     
  11. Frotty

    Frotty

    Wurst Reviewer

    Joined:
    Jan 1, 2009
    Messages:
    1,324
    Resources:
    9
    Models:
    3
    Tools:
    1
    Maps:
    3
    Tutorials:
    1
    Wurst:
    1
    Resources:
    9
    It extracts the war3map.j from your map and then you can use them like any other global variable.

    Yes for the most part.
     
  12. karaulov

    karaulov

    Joined:
    Jun 17, 2010
    Messages:
    199
    Resources:
    3
    Tools:
    3
    Resources:
    3
    Impossible to add C(C++) language support to Wurst language ?)))
     
  13. Sir Moriarty

    Sir Moriarty

    Joined:
    Jun 13, 2016
    Messages:
    251
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    For what purpose?
     
  14. Fingolfin

    Fingolfin

    Joined:
    Jan 11, 2009
    Messages:
    3,140
    Resources:
    152
    Models:
    142
    Icons:
    1
    Packs:
    4
    Skins:
    2
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    152
    @karaulov Try Zinc, it is supported by JassHelper which is now an official part of the editor. It uses C-like syntax.

    Adding "C/C++ support" is not possible per se though, everything we write has to be converted to jass code, and the best we can do is write a compiler which parses an arbitrary syntax to jass.
     
  15. Frotty

    Frotty

    Wurst Reviewer

    Joined:
    Jan 1, 2009
    Messages:
    1,324
    Resources:
    9
    Models:
    3
    Tools:
    1
    Maps:
    3
    Tutorials:
    1
    Wurst:
    1
    Resources:
    9
    @Fingolfin @Sir Moriarty Judging by Best of the Wurst 7 he just means the syntax.

    Of course it's not impossible. Is it impossible for you to learn multiple syntax styles? Why does python not have c syntax?

    As fingolfin said, perhaps zinc suits you better.
     
    Last edited: Jan 15, 2019
  16. Astrella

    Astrella

    Joined:
    Oct 3, 2008
    Messages:
    127
    Resources:
    1
    Maps:
    1
    Resources:
    1
    What's the policy on credits? Like, is there a certain specific way I should credit Wurst / credit the individual contributors? (Asking cause I'm not sure if made with Wurst would be enough. :p )
     
  17. Frotty

    Frotty

    Wurst Reviewer

    Joined:
    Jan 1, 2009
    Messages:
    1,324
    Resources:
    9
    Models:
    3
    Tools:
    1
    Maps:
    3
    Tutorials:
    1
    Wurst:
    1
    Resources:
    9
    We generally don't mind, but of course any mention is greatly appreciated to help the project :)
    If you want you can use the banner from my signature.
     
  18. karaulov

    karaulov

    Joined:
    Jun 17, 2010
    Messages:
    199
    Resources:
    3
    Tools:
    3
    Resources:
    3
    Stupid question.

    Why should I learn some new language "WURST" only for the game 2002 year?))
     
  19. Fingolfin

    Fingolfin

    Joined:
    Jan 11, 2009
    Messages:
    3,140
    Resources:
    152
    Models:
    142
    Icons:
    1
    Packs:
    4
    Skins:
    2
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    152
    Anyone who is experienced in programming will have absolutely zero difficulty grasping the very simple and straightforward concepts of Wurst. The question is rather why anyone would learn C (a 50 year old language btw) in this day and age unless they work with embedded software.
     
  20. Frotty

    Frotty

    Wurst Reviewer

    Joined:
    Jan 1, 2009
    Messages:
    1,324
    Resources:
    9
    Models:
    3
    Tools:
    1
    Maps:
    3
    Tutorials:
    1
    Wurst:
    1
    Resources:
    9
    Why not? Learning something new should be fun! If you use age as argument, then why are you even still here, 16+ years later?
    No one forces you to use it, and if syntax is important to you, there are other options.