Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

How much is too much?

Baron Hauptmann
Just Designs / Scripter
Join date: 29 Oct 2005
Posts: 358
08-02-2006 13:01
I've been working on a card game table. I am curious about the impact that the scripts have on the sim. I really don't want it to be responsible for bringing a sim crawling on its knees . . .

What does a scripter need to be aware of when scripting, that is, what things cause the most/worst lag? Listens, linked messages, list handling, texture shifting, etc?

How many scripts are too many? (Right now, I have 2 primary scripts plus 1 in each of 8 chairs, along with 6 (5 of which are in buttons, handling turning a button on/off and changing texture) in a HUD for each player, for up to 50 scripts. Most of them are normally idle.

Does turning "off" some of the scripts while the game is not being played make much impact?

Thanks for your input.
Baron
Angela Salome
Registered User
Join date: 6 Oct 2005
Posts: 224
08-02-2006 13:20
From: Baron Hauptmann
I've been working on a card game table. I am curious about the impact that the scripts have on the sim. I really don't want it to be responsible for bringing a sim crawling on its knees . . .

What does a scripter need to be aware of when scripting, that is, what things cause the most/worst lag? Listens, linked messages, list handling, texture shifting, etc?

How many scripts are too many? (Right now, I have 2 primary scripts plus 1 in each of 8 chairs, along with 6 (5 of which are in buttons, handling turning a button on/off and changing texture) in a HUD for each player, for up to 50 scripts. Most of them are normally idle.

Does turning "off" some of the scripts while the game is not being played make much impact?


Use heavily filtered listens, use more states rather than just one.

Visit a void sim and try rezzing and playing your card game, and see how much of a diffference it makes to sim stats.
Baron Hauptmann
Just Designs / Scripter
Join date: 29 Oct 2005
Posts: 358
08-02-2006 13:25
Okay. My listens only listen on one channel, and only when it is needed, and I use states out the wazoo! I had just thought that I could eliminate some of the scripts by remotely changing the texture of the buttons, but just realized that I can't.

Regarding listens . . . if I'm using some really off-the wall channel, does it help any to use other filters? I mean, the chances of something else using the same channel are quite remote.

Baron
Xixao Dannunzio
Owner, X3D Enterprises
Join date: 20 Mar 2006
Posts: 114
08-02-2006 13:34
From: Baron Hauptmann
Regarding listens . . . if I'm using some really off-the wall channel, does it help any to use other filters? I mean, the chances of something else using the same channel are quite remote.


Additional filters could be the key of a specific object to listen to, specific words/phrases, etc.

And, yes, it would help, as the objects won't be listening to everything that happens across that channel, as you never know who else has scripted their objects to speak on it.
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
08-02-2006 14:00
From: Baron Hauptmann
Regarding listens . . . if I'm using some really off-the wall channel, does it help any to use other filters? I mean, the chances of something else using the same channel are quite remote.

More filtering is always better (or should be anyway) so long as it doesn't hurt the application. On the other hand, who knows how costly it is to change filters often, so if you have to do that you might play around a bit or just go with the simplest solution. I'd turn off as much listening as you possibly can at any given time with ''llListenControl()' though. That should have minimal impact as it theoretically shouldn't have to change filter tables much.

Remember that with all those states you may have to re-establish listens often. That could have an impact.
Eaglebird Cameron
YTMND *********
Join date: 1 Jul 2006
Posts: 68
08-02-2006 16:04
If there's any communication between things that are linked, like maybe the scoreboard and the table, use llMessageLinked instead of llSay and llListen.
llSay and llListen are for player to game chat.

llRezobject lags the script, not the sim, because of a built in sleep.

Sensors are big culprits of script-caused sim lag.