ZScript line specials?

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: ZScript line specials?

Re: ZScript line specials?

by gwHero » Wed Nov 29, 2017 3:59 am

Yes, I think I read most of the posts :) Because of that, we owe you and the dev's a lot for being inspirational and getting such a result there. I've been a fan of ZDoom & GZDoom for quite some time now, but it's getting better every day.

Re: ZScript line specials?

by Nash » Wed Nov 29, 2017 1:54 am

Yes, jumping on ZScript as early as possible is definitely worth it for large-scale projects and I am so glad I did - getting yelled at for doings things wrong in the process and even forcing developer intervention that ultimately led to the entire scope-blocking system and the birth of event handlers was SO worth it. ;) I have about 260 KB of ZScript (11332 lines according to my line counter script), and I can't imagine if I slept on ZScript and have to convert much later... I'd probably just rage and give up.

Re: ZScript line specials?

by gwHero » Tue Nov 28, 2017 1:39 pm

Graf Zahl wrote:I actually see very little point in adding such a feature. The action special namespace needs to be protected because it is shared across ports, so I am a bit reluctant to open it up.
I understand. Well, maybe it can be done in another way later. The only thing I miss at the moment is triggering a VM function from the map; I still have to use ACS as a bridge for that. From the console it's already possible with NetworkProcess.
phantombeta wrote:ACS shouldn't really be considered deprecated.
In fact, IIRC Graf has said before that ACS should only not be used for actor behaviour like people were doing before ZScript was a thing, and that ACS should still be used for map scripting. (and I agree with that. ZScript is global, it makes no sense to make map-specific scripts in a global scope.)

Related. Also read Xaser's post.
Thanks, I now remember reading that post before. As a matter of fact, a lot of months after the birth of ZScript was a fact, as a newcomer concerning ZScript like me it's rather difficult to get the big picture of which way it is going, because all information is scattered throughout many posts, and I've seen a lot of opinions.
Actually, it was this discussion viewtopic.php?f=18&t=57814&start=30#p1024869a couple of weeks ago where I defended ACS first, that made me thinking to reconsider afterwards.

My thoughts were this: "okay, here I am, after 6 months busy creating a game, I have now 2.5k of ACS lines in a big library and it's still growing. The game will not be finished before 2019; assuming that in the end ZScript might do a lot of things better, I think it's not desirable to have a game finished in 2019 with a outdated scripting language. If I want to switch, I'd better do it now." So I did, and actually I'm quite pleased with it, because ZScript gives me more control and far better organized code. I agree ZScript is not complete yet, and not having latent functions requires a little bit more code, but it's not too difficult to check moving planes during ticks (a lot of the necessary functionality is already exposed). Assuming more things to be exposed to ZScript later, I think it will be easier to replace some more complex ZScript with simplified code then rewriting complete ACS libraries after 2 years when all's finished. :)

Re: ZScript line specials?

by gwHero » Tue Nov 28, 2017 9:43 am

Well indeed I did read posts and opinions that contradict with each other, and to be honest I indeed believed at first that it was best to leave ACS and ZScript coexist - which will be necessary for a long time, I understand that, deprecated does not mean it will be abandoned.

However, although reluctant at first, because I'm so used to ACS, I found out that there is a lot possible yet also on map control in ZScript. So I thought I give it a try to see how far I would get in migrating the stuff. So to my surprise I found out that even the day/night light system I had developed for my TC in ACS, was improved a lot by moving it to ZScript. With ACS it needed sector tags throughout the maps, which were a pain to be maintained, so I even developed a small custom C# program to generate the tags in the TEXTMAP's.

But after migrating it to ZScript, I could write this easily without need for the sector tags, and I was able the kick the custom C# code out. So for me I've actually changed my mind, and I'm no longer convinced that ACS is better for certain kind of stuff.

But okay, this post was merely to see what the future mindset was on ZScript.

Re: ZScript line specials?

by Graf Zahl » Tue Nov 28, 2017 9:01 am

So this entire request came out of a fundamental misunderstandiing. I actually see very little point in adding such a feature. The action special namespace needs to be protected because it is shared across ports, so I am a bit reluctant to open it up.

Re: ZScript line specials?

by phantombeta » Tue Nov 28, 2017 8:40 am

ACS shouldn't really be considered deprecated.
In fact, IIRC Graf has said before that ACS should only not be used for actor behaviour like people were doing before ZScript was a thing, and that ACS should still be used for map scripting. (and I agree with that. ZScript is global, it makes no sense to make map-specific scripts in a global scope.)

Related. Also read Xaser's post.

Re: ZScript line specials?

by gwHero » Tue Nov 28, 2017 8:13 am

Thanks :) I could not find something like it either.

I posted this not in a desperate need for this to be build in very quickly, but mainly because I'm interested if there are already some thoughts how the engine is going to deal with these. Like you said yourself recently to consider ACS as deprecated, and I myself got rid of most of my ACS now, I do have linedefs triggering ACS scripts that do nothing more than passing things thru to ZScript. Would be nice to get these last parts out too, but of course no hurry at all.

Re: ZScript line specials?

by Rachael » Tue Nov 28, 2017 7:17 am

Reopened, but AFAIR this was already asked for, so it's likely this will be closed as a duplicate. (I just can't find the thread atm, though)

Re: ZScript line specials?

by gwHero » Tue Nov 28, 2017 6:39 am

Hi, I think my post was not clear enough. I don't mean executing line specials from ZScript, but a line special that calls a ZScript function directly (the other way around).

Where I can now define line special 80 on the map, it's not yet possible to define a line special to call a ZScript function directly.

Re: ZScript line specials?

by Rachael » Tue Nov 28, 2017 5:27 am

ACS_Execute* specials, and all other line specials, are already inherently available in ZScript.

ZScript line specials?

by gwHero » Tue Nov 28, 2017 4:59 am

Just thinking how to replace more ACS scripts by Zscript: are there plans of offering line specials for calling ZScript functions like for ACS (i.e. 80 Script Execute)? Maybe as an intermediate solution it would be not to difficult to make it possible to call SendNetworkEvent thru a line special, but I can imagine that that would be an unwanted development.

Top