by 3saster » Thu Mar 26, 2020 4:59 pm
Agentbromsnor wrote:ZScript is for programmers who don't need any hand holding what so ever. Being familiar with C++ helps.
DECORATE is generally preferred within the community because it is much better documented and you don't need to be a seasoned programmer to understand it.
This is a common misconception that isn't true at all. DECORATE and basic ZScript only differ by mostly by some semicolons and extra brackets; see the
zombieman page. The main difference is that ZScript has lots of handy stuff that can be taken advantage of even in basic mods. Sure, the complicated stuff will look like you need programming experience, but basic stuff will look nearly identical to DECORATE (see this
page for the syntax differences). On top of that, every single function in DECORATE is also in ZScript (this is an automatic engine side thing), and since the syntax is similar, every single DECORATE tutorial, etc, also holds for ZScript. So it is my recommendation that you start with ZScript, since you have access to all the potentially useful additions, and you do not have to go through the tedious conversion process when/if you realize you want some of ZScript's functionality. Furthermore, DECORATE is deprecated; ZScript is actively being developed. To quote this
document:
Jekyll Grim Payne wrote:Now, there are a lot of misconceptions related to this point, so it’s important to expand on it.
The first common misconception is that ZScript is supposedly harder to use than DECORATE. This is, in fact, not true: ZScript just has a much higher ceiling in terms of the available features and possibilities. However, the base is the same in both languages. In fact, simple base actors, such as vanilla Doom enemies and props, look almost identical in ZScript and DECORATE, except for a few headers and semicolons. This is demonstrated on the Zombieman page on ZDoom wiki. The learning curve is longer but it’s not necessarily steeper.
In other words, if you know DECORATE, you’re already ready to code ZScript. Yes, your ZScript code will be simple at first, but that’s OK. Nobody starts advanced. And no, just like DECORATE, ZScript does not necessarily require any previous programming experience.
That being said, there is ONE reason to use DECORATE over ZScript. Zandronum only supports DECORATE (and an old version at that), not ZScript (and never will), so if multiplayer is an absolutely integral part of your mod, then consider using DECORATE (even then, it won't support everything that GZDoom DECORATE does). Other than this one reason, there is no reason to use DECORATE over ZScript in a new project.
[quote="Agentbromsnor"]ZScript is for programmers who don't need any hand holding what so ever. Being familiar with C++ helps.
DECORATE is generally preferred within the community because it is much better documented and you don't need to be a seasoned programmer to understand it.[/quote]
This is a common misconception that isn't true at all. DECORATE and basic ZScript only differ by mostly by some semicolons and extra brackets; see the [url=https://zdoom.org/wiki/Classes:ZombieMan]zombieman[/url] page. The main difference is that ZScript has lots of handy stuff that can be taken advantage of even in basic mods. Sure, the complicated stuff will look like you need programming experience, but basic stuff will look nearly identical to DECORATE (see this [url=https://zdoom.org/wiki/Converting_DECORATE_code_to_ZScript]page[/url] for the syntax differences). On top of that, every single function in DECORATE is also in ZScript (this is an automatic engine side thing), and since the syntax is similar, every single DECORATE tutorial, etc, also holds for ZScript. So it is my recommendation that you start with ZScript, since you have access to all the potentially useful additions, and you do not have to go through the tedious conversion process when/if you realize you want some of ZScript's functionality. Furthermore, DECORATE is deprecated; ZScript is actively being developed. To quote this [url=https://docs.google.com/document/d/1Qr-mUdw6Z3OzC3Db81TcPjHrdqwL3aldEid0IwMi_PQ/edit]document[/url]:
[quote="Jekyll Grim Payne"]Now, there are a lot of misconceptions related to this point, so it’s important to expand on it.
The first common misconception is that ZScript is supposedly harder to use than DECORATE. This is, in fact, not true: ZScript just has a much higher ceiling in terms of the available features and possibilities. However, the base is the same in both languages. In fact, simple base actors, such as vanilla Doom enemies and props, look almost identical in ZScript and DECORATE, except for a few headers and semicolons. This is demonstrated on the Zombieman page on ZDoom wiki. The learning curve is longer but it’s not necessarily steeper.
In other words, if you know DECORATE, you’re already ready to code ZScript. Yes, your ZScript code will be simple at first, but that’s OK. Nobody starts advanced. And no, just like DECORATE, ZScript does not necessarily require any previous programming experience.
[/quote]
That being said, there is ONE reason to use DECORATE over ZScript. Zandronum only supports DECORATE (and an old version at that), not ZScript (and never will), so if multiplayer is an absolutely integral part of your mod, then consider using DECORATE (even then, it won't support everything that GZDoom DECORATE does). Other than this one reason, there is no reason to use DECORATE over ZScript in a new project.