Tad Jensen
Script Junkie
Join date: 29 May 2004
Posts: 24
|
12-02-2004 13:29
hi all,
looking for some solutions / ideas to get past a hurdle im having while thinking of a concept for a project i may take part in...
basically an object will contain multiple items (dynamic - could be 10 - could be 22) that will need configuration settings for each item separately (in a notecard potentially?)
my concerns are timing... there are two approaches i can think of off the top of my head...
1) Load all settings for the notecards up front and that way they are available to the script when they are needed (ideal because real time processing will be much quicker to use those settings if a particular option is chosen)
2) Load the settings individually when chosen (not as ideal because the notecard read is fairly slow and i would want an almost instantaneous response for the user)
im looking at anywhere from 10-30 notecard reads...
if i do number 1 then the intial setup will be SLOW and i know there is a way to read notecards simultaneously but the number of notecards is variable in this application and im not sure what type of load reading 20-30 notecards simultaneously would have on the SIM. (and sequentially is out - WAY to0 long)
if i do number 2 it puts a strain on the user in that when they select an option (s) i would go out and possibly read some combination of notecards right then... this would have a slow response time as they choose options instead of an upfront slow response then everything is fast after that
Am I going about this all wrong? There a way to go about this better than using notecards, etc? Be nice to have a DB to work with, rofl. (also, i could go offline storage but the configuration would have to be done offline wouldn't it (as in a web page)) i can do this technically but i'm not sure i want to have the user do this for this particular application.
any help would be appreciated... if anyone has a system to do this effectively with an initial setup of under 30 seconds or a real time reading of multiple notecards in under 5-10 seconds then i would be willing to pay for the source code.
otherwise, any thoughts, ideas would be greatly appreciated...
THANKS
|
Water Rogers
Registered User
Join date: 1 May 2003
Posts: 286
|
12-03-2004 05:43
Hi, Ted!
I'm sure i could give you a better response here if i had a bit more information. You mentioned having to load settings, and a lot of notecards... but you didn't really mention much of what you are really trying to accomplish.
Could you be a bit more detailed with the facts?
All i gathered out of the above was "I want settings for items in an object stored in a notecard for a script to load and it will have user interaction"
Try giving some examples or specifics like what kind of object it is suppose to be (a vendor?) and what kind of items is it holding (only Objects... only Clothing.... combination?), and most importantly -- what kind of settings (user/manager settings for the object). I'm assuming based off the information that you want to create a vendor for someone who doesn't want to have to edit a script, but can edit the notecard?
Thanks, Ted!
_____________________
From: Philip Linden For the more technically minded - the problem is actually NOT the asset server (or 'asshat' as you prefer to affectionately call it herein).
|
Chromal Brodsky
ExperimentalMetaphysicist
Join date: 24 Feb 2004
Posts: 243
|
12-03-2004 07:17
From: Tad Jensen 1) Load all settings for the notecards up front and that way they are available to the script when they are needed (ideal because real time processing will be much quicker to use those settings if a particular option is chosen)
2) Load the settings individually when chosen (not as ideal because the notecard read is fairly slow and i would want an almost instantaneous response for the user)
im looking at anywhere from 10-30 notecard reads...
Well, as somebody else already mentioned, more information would be helpful. Are you reading a lot of string data off of the notecards? You may fill your task's heap if you attempt to read many notecards into task memory. Perhaps a combination where you index all the cards up front and than read from them as appropriate throughout runtime could work? Really need to know more to say much...
|
Tad Jensen
Script Junkie
Join date: 29 May 2004
Posts: 24
|
12-03-2004 11:33
sorry guys, maybe this will help?
1 main object with the following in its inventory --> itemA (could be a texture, animation, anything) --> itemAnotecard (settings notecard for itemA) --> itemB --> itemBnotecard --> itemC --> itemCnotecard --> so on and so on (could set a max number the user could put in the object but i would like for it to be at least 20)
the notecard contents will look similar to this... i know i could streamline it down into one line with a delimiter, etc but i want it easily readable by the user as they can make changes to it
### begin notecard ### param1=2 param2=whats this param3=nother param value ### end notecard ###
notecard could possibly have 20 lines or more
a master notecard will contain certain configurations for the user to be able to ACTIVATE real time as an attachment
### master notecard ### config1,itemA,itemB,itemC config2,itemB,itemC config3,itemC,itemA ### end master notecard ###
the user will say "config3" and it will go do some processing of itemC and itemA items based on the settings in their respective notecards (and ideally this would be real time with no pause after the user says the keyword
hope this helps understand my application a little...
btw... not so much asking for specifics as if i know how to go about doing this i can probably figure out the scripting part... just looking for thoughts on if this is possible with the tools we have in LSL and if they are what pieces should i be looking into?
ive thought of having like 10 scripts all loading in the data at the same time and when i need to acess that then just use linkmessages to return it to my main script but that just seems kludgy to me and 10 scripts doing dataserver calls concurrently in LSL may be laggy? reading the file sequentially is just out of the question... and reading the notecards real time isn't really going to cut it either especially with a 20 line notecard i think takes a bit (and if you saw my main notecard i could potentially want to load multiple notecards even real time, not just 1 but 2 or 5 or 10 at one time but a subset of all the notecards)
thanks for any help,
Tad
|
Water Rogers
Registered User
Join date: 1 May 2003
Posts: 286
|
12-03-2004 13:01
I'd have a feeling you'd run into a stack heap collision with all the string manipulation so you might have to break this down into seperate scripts.
I'm trying to figure out the actual use of the item though, as i'm still a bit unclear. Are you trying to make an attachment that contains other little attachments? I'm confused as to why you would need so many parameters for one item in one notecard for something contained in an object's inventory that technically can't be directly modified that much from inside an inventory.
Is it like:
Person wears attachment. Person says a command from a "Master notecard" that was loaded into the script at runtime. Specific Objects rez given the parameters passed from Master notecard. Those specific Objects are then passed their little notecards of parameters?
The reason why i ask, is to see how much it is being split up and what kind of actions are being used.
Theoretically, the way you explained it and want to go about it might seem like overkill UNLESS you are just trying to simplify things for the user AND/OR allow the user to modify certain aspects of the script without the script iteself using anotecard (and not having direct perms on the script). So if the latter is the way you are going about it, then yes -- the way you explained would work. Just make sure you are monitoring you're scripts' memory capacity. Loading too many variables or doing too many nested loops or finite calculations will err on you. And then you will be mad. And we don't want a mad Tad.
btw... streamlining it would be faster imo if you can get away with doing it... because then you aren't calling data server queries per line.
Perhaps you can think about having ONE editable script that contains the necessary variables needed by the user, and then you could link_message them if you wanted to try going a different route.
--Water
_____________________
From: Philip Linden For the more technically minded - the problem is actually NOT the asset server (or 'asshat' as you prefer to affectionately call it herein).
|