Page 2 of 2

Re: zscript vs decorate?

PostPosted: Thu Mar 26, 2020 6:08 pm
by Enjay
If you're learning from scratch, and only doing simple stuff (to begin with at least) my guess is that it wouldn't be much harder to learn ZScript than it would be to learn DECORATE. The basic structure and syntax are very similar and a basic enemy with nothing particularly fancy going on will look much as it does in DECORATE, just with a bit more punctuation dotted around the place.

For example, if you look at the DECORATE definition for the DoomImp on the Wiki versus the ZScript one in gzdoom.pk3, they are very similar. The only additional stuff in there is that the A_TroopAttack code pointer is also defined at the bottom of the file. A section like that wouldn't be needed by anyone coding their own simple monster using generalised attack functions etc.

The thing is, once you've mastered the simple ZScript stuff, you can move on to the more complicated stuff. If you start with DECORATE, you'd have to go through the process of learning how things are done in ZScript that you already know how to do in DECORATE (often frustrating to "unlearn" things) before you could meaningfully access the more complicated stuff.

I think that the strongest argument in favour of starting with DECORATE would be the cross-port compatibility already mentioned. I think that the perceived difficulty differences are perhaps a function of most of us (myself included) being for more familiar with DECORATE than ZScript and so DECORATE seems easier. When learning from a point of knowing neither, I suspect that the difficulty is not dramatically different.