• 🏆 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!

Object Oriented Triggering?

Status
Not open for further replies.
Level 26
Joined
Aug 18, 2009
Messages
4,097
Depends on your pre-education. Also most people do not use every feature of vJass. If you only want to use structs, scopes, library, there is not much too learn and you will see as you write it. It would however be good to have a rough idea how vJass realizes OO, which is per usage of arrays or hashtable, that dictates the limits of the abstraction.

Yet frankly, nowadays I would skip vJass as that still contains a lot of ugliness. Go straight for wurst instead. vJass does not really have support anymore respectively there are some modifications at best.
 
Level 2
Joined
Oct 17, 2017
Messages
9
I am also curious about Wurst since I jsut started learning vJass. Is it more "powerful"?
Does it really have more support or tutorials online? My problem with vJass is finding tutorials about the specific things I don't understand.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
vJass tries to be jass-oriented and just extends the syntax. One of the main atrocities I think is that you have to write "call"/"set" everywhere and it is kinda hacky here and there. wurst is more java-style, except for the indentation-based blocking which you may know from python. Not having terminating delimiters can make it harder to recognize the scope but that can be IDE-supported and on the plus side the code becomes shorter (except for one-liners maybe). You will find much more resources for vJass as there are many more people using it and it has been longer in existence but wurst comes with a standard library and is actively maintained. Also vJass is meant to be written inside the trigger editor of the WE, wurst externally in some IDE (see plugIn(s)). I think every map starting at this point should do so with wurst rather than vJass. It is cleaner, has better syntax and is more powerful for the most part.

from the manual:

You can still use normal Jass syntax/code outside of packages - the Wurst World Editor will parse jass (and vjass, if jasshelper is enabled), in addition to compiling your Wurst code.

yet I doubt that there is much interoperability.
 
Level 23
Joined
Jan 1, 2009
Messages
1,610
@WaterKnight brought up some good points for why you might want to use wurst already, so I will answer a few questions.

I am also curious about Wurst since I jsut started learning vJass. Is it more "powerful"?

The language is just as "powerful" as the user.

Does it really have more support or tutorials online? My problem with vJass is finding tutorials about the specific things I don't understand.

There is much more vjass material available by the community, though of dubious quality.
Wurst has much less learning material available for now, but it is more curated and provided by the authors. See WurstScript • Home for manual & beginner tutorials.


Looked into wurst which seems rather decent.
I am uncertain if wurst can still use normal vjass systems and such. If it can, that is probably the best
yet I doubt that there is much interoperability.

There is full interoperability with Jass. So translate your vJass to Jass using JassHelper and you can use it in wurst.
It's explained in further detail here: Legacy Map Guide

It looks pretty sweet but i think it needs to be further developed

I think, as you seemingly know next to nothing about wc3 modding/Jass scripting, this is a very bold statement to make. Wurst has been developed for over 5 years, matured a lot and is the most complete and advanced wc3 programming environment available.
 

Cokemonkey11

Spell Reviewer
Level 29
Joined
May 9, 2006
Messages
3,534
You will be hard-pressed to find useful vjass libraries that aren't available in wurst (in the worst case you may need to ask the community as the current standard library is a bit more lightweight than the previous one)

This shouldn't be much of a surprise. Nestharus has also written his own fork of the meaningful vjass libraries, so a few active developers making wurst versions over 5 years is pretty reasonable.

Wurst: good programming language with amazing features and slightly less newbie-friendly + fewer knowledgeable users available for help

vJass: less opinionated, worse programming language; more suitable for copy-pasting code than for actual learning and using good game code
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Most triggering requirements do not fit well into an object orientated patterns. It is only certain systems, usually used by abilities, which benefit from it.

None of the languages optimize properly and all of them are hacky pre-compilers for normal JASS. I would recommend vJASS purely because it is the most commonly used, even if it is not the most feature filled or pretty.
 

Cokemonkey11

Spell Reviewer
Level 29
Joined
May 9, 2006
Messages
3,534
> So it is not a pre-compiler and uses the more than likely going to be patched out JASS machine code injection method?

I have no idea what you're talking about. Wurst is a compiled language, yes.

> Or you saying it does better optimizations when translating to JASS?

Wurst isn't a translated language - it's compiled; and yes there is an optimiser that does some Smart stuff before the Emit step during compilation.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
I have no idea what you're talking about. Wurst is a compiled language, yes.
Then it is true for wurst, it is a hacky pre-compiler when viewed from WC3's point of view.
Wurst isn't a translated language - it's compiled; and yes there is an optimiser that does some Smart stuff before the Emit step during compilation.
Practically everything is compiled from one language to another, even vJASS. The problem is that often this is not done at all well. Even tools like Vexorian Optimizer were very bad at optimizing JASS and lacked support for proper inlining and other every day optimizations performed by professional language compilers.

That said part of the blame is with Blizzard. Nothing stopped them (except cost...) from writing a JIT compiler of sorts for JASS.
 
So it is not a pre-compiler and uses the more than likely going to be patched out JASS machine code injection method? Or you saying it does better optimizations when translating to JASS?

Not LeP, but the latter is done.

The thread starter said:
Lvl 1: Would it be possible to create classes and instances?
Lvl 2: Would it be possible to incorporate encapsulation?
Lvl 3: Would it be possible to create super and sub classes?

All of them would be possible. Given enough time and dedication, those above could be handled by an extension program to Wurst which touches upon triggering, just as vJASS is parsed to raw JASS and by speculation, (Frotty can correct me at this point) compiled and optimized by Wurst. One thing I could see the program run is doing away with the vanilla variable editor, and replacing it with a look-alike class editor.

EDIT:

1.) Yes
2.) Yes
3.) Yes
 
Last edited:

Cokemonkey11

Spell Reviewer
Level 29
Joined
May 9, 2006
Messages
3,534
> Then it is true for wurst, it is a hacky pre-compiler when viewed from WC3's point of view.

What are you talking about? There is a grammar, a parser, an AST, etc. WC3 as a blob of code doesn't have any point of view about anything at all.

> Practically everything is compiled from one language to another, even vJASS.

No it isn't, vjass is just translated using simple, finite string parsing. But let's not talk about semantics - what's your point?

> Even tools like Vexorian Optimizer were very bad at optimizing JASS and lacked support for proper inlining and other every day optimizations performed by professional language compilers.

Is your point that the Vexorian Optimiser is limited? Yes it is. The Wurst optimiser is also limited. Sorry, but what?

> That said part of the blame is with Blizzard. Nothing stopped them (except cost...) from writing a JIT compiler of sorts for JASS.

At least 5 9s of maps are not gated by JASS processing speed at all, so I don't see your point again.
 
I don't get the point of this ongoing debate. The answer has been given:

You want OOP programming, you have options: Zinc, vJass, Wurst.

Use the first if you like C syntax. Use the last if you like Java-esque syntax. Use vJass if you like maximum compatibility with system resources from Hive.


And honestly: You shouldn't care about the people here debating about details and the unique quirks of the three big language options. Those are the very people that complain about hackiness and then use struct extends array just because its slightly faster than using the default implementation of vJass classes (which is miles better than any manual implementation as soon as you want to take advantage of extends/super).
 

Cokemonkey11

Spell Reviewer
Level 29
Joined
May 9, 2006
Messages
3,534
I don't get the point of this ongoing debate. The answer has been given:

You want OOP programming, you have options: Zinc, vJass, Wurst.

Use the first if you like C syntax. Use the last if you like Java-esque syntax. Use vJass if you like maximum compatibility with system resources from Hive.

Shitpost of the year. Hive workshop: where language choice depends on syntax familiarity.

The key differences between the three have fuck-all to do with whether they use {} or not.

Also, the greater programming community very regularly has extensive and inexhaustive discussions about language design and differences. So if you're not here to talk about object-oriented triggering in wc3, then you're just disrupting others that are.
 
The key differences between the three have fuck-all to do with whether they use {} or not.
Syntax is the difference that actually matters.

I don't care if a language has extra features that I use once every two months. What I care about is that I like the every day stuff.

Solving a rare problem slightly quicker has no merit if I take twice the time for each single line of code because the syntax doesn't match my coding style or keyboard habits.


Basic every-day Syntax is the most important thing when selecting a language. It's what actually saves time.
 
Level 23
Joined
Jan 1, 2009
Messages
1,610
@Zwiebelchen That may be your taste which you can gladly express, however definitely not general practice.
Apart from the fact that Wurst has its Jurst dialect, which keeps vJass' verbose syntax, and Zinc being lacking in pretty much all regards,
there are plenty of features a language can provide or be suited for which I and many others would consider way more important than syntax.

The problem is you presenting your opinion to the OP as "the only property that matters", which is simply bogus.

@others
The reason we would call wurst less "hacky" than vjass is because of the aforementioned reasons. Of course it is still a "hack" in the sense of how the features are implemented in the emitted Jass. However the process and feel of developing a wc3 map purely in high-level code using a purpose-fit IDE is completely different from using a windows-only hack to badly "emulate" such features inside the World Editor.
 
Last edited:
I think this thread is about triggering, not coding.
With this statement, I mean that the GUI Editor is being dealt with.

According to my knowledge, there are no programs that offer the convenience of OOP in triggering (GUI), only in JASS,
but I will reiterate what I've already said above.

One thing I could see the program run is doing away with the vanilla variable editor, and replacing it with a look-alike class editor.

1.) Yes
2.) Yes
3.) Yes
 
In jass, a trigger is a data type. A trigger lets you "subscribe" to things. This is seen in "real" programing, too.

I see what you're saying though. Maybe we are misunderstanding the needs of the original thread poster?

We really aren't, the OP is asking specifically about some OO concepts that exist in written programming languages. I am pretty sure he wouldn't talk about classes and encapsulation if he wanted to point and click his way into map development (which I don't say is bad, it is just not something that offers proper programming practices in wc3, and there's no tool that'd let you do that, plus he already wants something better than the GUI editor gives anyways).

As some others have said, if you want real OO, wurst is your best bet. It's being worked on and updated all the time, you can quickly and easily learn it if you have experience with some popular languages like Java and JavaScript, and the development in it is a breeze, it is actually easier to write a lot of code that does more than any other wc3 language. It also lets you create object editor entries really easily, which is something vJass attempted to do.

So yeah, go with wurst, if you're really into programming and want a good programming language.
 
@Zwiebelchen That may be your taste which you can gladly express, however definitely not general practice.
Apart from the fact that Wurst has its Jurst dialect, which keeps vJass' verbose syntax, and Zinc being lacking in pretty much all regards,
there are plenty of features a language can provide or be suited for which I and many others would consider way more important than syntax.
I only voiced my oppinion. It was cokemonkey that immediately got aggressive over it.
 
Status
Not open for further replies.
Top