zscript vs decorate?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Re: zscript vs decorate?

Postby Enjay » Thu Mar 26, 2020 6:08 pm

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.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Previous

Return to Scripting

Who is online

Users browsing this forum: No registered users and 1 guest