
Thanks, Ligmatism.
Moderator: GZDoom Developers
Spoiler:
This.gwHero wrote:Nevertheless, sometimes you will have to rely on ACS as well. For instance, when you want to trigger a script from the map, it's not yet possible to call ZScript functions directly from it. You will have to call a ACS script in that case; from there, you can decide to handle stuff in ACS itself or parsing it to ZScript with ScriptCall. It's all made quite flexible; vice versa calling ACS from ZScript is also possible.
Spoiler:
That's in part because a big chunk of ZScript is literally just DECORATE with a slightly different syntax.There is an awful lot of context that you need to understand in order to be productive as a Doom scripter. And currently, since Zscript is the newest and most advanced scripting language, it has the least documentation of any of them (and what documentation there is tends to assume familiarity with the other two systems.)
Knowing C# or Java helps more than C++, but the best would be knowing both, so it's easier to understand why things are the way they are in ZScript.I don't know if it would help you learn C++ any more than other languages in the object-oriented, imperative, weakly typed, C-style family such as C#, Java, or Objective-C.
???such as lack of access to the standard library
Not quite. It's compiled into ZScriptVM bytecode.the fact that it's interpreted rather than compiled
There's readonly variables and AFAIK there's const methods.lack of const objects and methods
I'm not sure I've ever seen anyone recommend learning ZScript to learn C++ - In fact, what I've seen is people recommending learning C++ to make learning ZScript easier.But if you want to learn C++, I'd just study C++. There are way more resources out there for that or any of the other languages in this family than for Zscript itself. In fact, I'd say that learning any of these languages *first* - at least, running through some basic tutorials and starter projects, would be helpful to learn Zscript rather than the other way around, simply because there are so many more resources for total beginners that introduce the basic concepts.
Right, which is why I suggested learning DECORATE first, since it's targeted by the existing documentation. An experienced programmer should have no trouble translating the syntax on the fly but I think that might be a lot for a beginner to handle.phantombeta wrote:That's in part because a big chunk of ZScript is literally just DECORATE with a slightly different syntax.
This comment was mostly stemming from my frustration at the lack of certain facilities in ZScript for less common tasks such as obtaining freeform text input from the player, parsing ints from strings, etc. In the past I have used Lua for scripting, which could provide a transparent FFI to leverage functions in the native library on the host runtime (in that case, Objective-C/Cocoa) - although this is understandably more difficult here. Perhaps due to security considerations and the lack of support for reflection in the C++ runtime. And maybe also due to being a mature Doom source port so having to support all these other scripting mechanisms too. Totally understandable if this was never a design goal to begin with.phantombeta wrote:???such as lack of access to the standard library
Interesting! Makes sense.phantombeta wrote:Not quite. It's compiled into ZScriptVM bytecode.the fact that it's interpreted rather than compiled
Cool - I did know about and use const variables, but chalk up another one to gaps in my own knowledge regarding const methods. I'll have to try that out.phantombeta wrote:There's readonly variables and AFAIK there's const methods.lack of const objects and methods
Perhaps I misunderstood - this makes a lot more sense to me and is also what I was suggesting.phantombeta wrote:I'm not sure I've ever seen anyone recommend learning ZScript to learn C++ - In fact, what I've seen is people recommending learning C++ to make learning ZScript easier.
This sounds incredibly useful, I will do so. Thanks for the tip.phantombeta wrote:One thing to note is that ZScript has a ton of undocumented features. Some of them were documented by marrub. Since I'm not sure if he wants it posted on this forum at the moment, you can ask him for a link.
He will eventually export all the ACS functionality. However, it's not deprecated for map control purposes since that's pretty much a map made in heaven.Rachael wrote:Last I remember Graf specifically stated there were no such plans.
Really? Where'd he say this?Major Cooke wrote:He will eventually export all the ACS functionality. However, it's not deprecated for map control purposes since that's pretty much a map made in heaven.Rachael wrote:Last I remember Graf specifically stated there were no such plans.