ZDaemon Forum Index ZDaemon
Client/Server DOOM
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[ACS] Script scope addition for arrays

 
Post new topic   Reply to topic    ZDaemon Forum Index -> Pending Requests
View previous topic :: View next topic  
Author Message
Body-Guard
Spamming!


Joined: 08 Jan 2006
Location: Hungary

PostPosted: Wed Jan 07, 2015 12:14 pm    Post subject: [ACS] Script scope addition for arrays Reply with quote

ZDoom recently implemented script scoping for arrays: http://zdoom.org/wiki/Arrays

Before that, only map, global or world scope was available when defining them. I would be really happy to see it implemented here as well Smile
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
ZeroDev
has entered the game!


Joined: 24 Sep 2012

PostPosted: Sat May 29, 2021 4:36 pm    Post subject: Reply with quote

I'm interested in that aswell.
Back to top
View user's profile Send private message
UberGewei
SuperAntler


Joined: 01 Sep 2010
Location: The Netherlands

PostPosted: Thu Jun 03, 2021 11:25 am    Post subject: Reply with quote

What would the overall advantage be over map, global or world scope arrays.
Perhaps you could provide us with a use case?

It worries me slightly though.. given that multiple scripts can be executed in quick succession (depending on what and/or who is invoking it by what action),
the addition of arrays in a script-scope would imply it has the potential of becoming ludicrously heavy. ZDoom has no C/S environment, so that's nothing for them to worry about.
Back to top
View user's profile Send private message Visit poster's website
Body-Guard
Spamming!


Joined: 08 Jan 2006
Location: Hungary

PostPosted: Sun Jul 04, 2021 3:25 pm    Post subject: Reply with quote

UberGewei wrote:
What would the overall advantage be over map, global or world scope arrays.
Perhaps you could provide us with a use case?
...
the addition of arrays in a script-scope would imply it has the potential of becoming ludicrously heavy...



I think the advantage is the same as having a more fine tuned scoping in any other programming language, that is, offering a way to better organize one's code. ACS is heavily function-based, so script scoping could be valuable in that regard. I don't know the engine's internal workings performance wise, though I suspect a one or two dimensional string array sized sanely should not really cause problems in any environment using modern hardware. If a script gets heavy, that is probably poor scripting on the ACS coder's part Smile
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    ZDaemon Forum Index -> Pending Requests All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group