Jump to content

Mollymews

Resident
  • Posts

    5,768
  • Joined

Everything posted by Mollymews

  1. yes agree is more efficient to open and close a listener than it is to create and destroy a new one every time for the same use
  2. oops the IIF I wrote above is wrong. Should be integer IIF(integer condition, integer a, integer b, integer c,integer d, integer e) { if (condition <= a) return a; if (condition <= b) return b; if (condition <= c) return c; if (condition <= d) return d; return e; } the extra parameter doesn't significantly affect the timing tho. I just post the correction
  3. at a recent-ish SUG meeting, Linden mentioned that they were looking into this. Bouncing vehicles off banlines. So is some hope for the future
  4. i have a M please i woumd Mike to somve the puzzme just have to know what a puzzme is and what happens when somevee it, and why Mike would be woumd by it which not many people know, but it's obvious when think about it 😸
  5. a suggestion for orb makers on the one time I had a skybox on a adult region which I used as a private dressing room space, I made my orb to set the eject time to 0 only when I was present and because I forget to turn these things off and on manually then I had it check on a timer for my presence if (owner_present) set_orb(eject_in_0_secs); else set_orb(eject_off) we can do this in different combinations, like eject_in_15_secs, etc
  6. is a pretty significant difference between const and var lists so I will be paying attention to this with my list work going forward i thought to level up IIF testing to deal with a more complex case. So I compared this v = llList2Integer([a, b, c, d, e], (v > a) + (v > b) + (v > c) + (v > d)); in the more complex case, when our IIF breaks on condition successful then is pretty competitive with inlining. So altogether I think there is some merit in IIF depending on use case, code clarity also being a factor in the choice running it 6 times at Sea of Fables region [19:09] work: x Total times: 0.466231 : IIF (user function call) 0.711628 : llList2Integer indexing of constant-valued list variable 0.288379 : inline conditionals [19:09] work: x Total times: 0.443376 : IIF (user function call) 0.866850 : llList2Integer indexing of constant-valued list variable 0.444371 : inline conditionals [19:09] work: x Total times: 0.399680 : IIF (user function call) 1.022209 : llList2Integer indexing of constant-valued list variable 0.400074 : inline conditionals [19:09] work: x Total times: 0.488607 : IIF (user function call) 0.933127 : llList2Integer indexing of constant-valued list variable 0.377889 : inline conditionals [19:09] work: x Total times: 0.511082 : IIF (user function call) 0.866693 : llList2Integer indexing of constant-valued list variable 0.355385 : inline conditionals [19:09] work: x Total times: 0.443689 : IIF (user function call) 0.823224 : llList2Integer indexing of constant-valued list variable 0.399611 : inline conditionals if did also look at inlining nested IFs but is slower than IF ELSEIF ELSE, and has to do with the need to assign result in each nest result = e; if (condition <= a) { result = a; if (condition <= b) { result = b; if (condition <= c) { result = c; if (condition <= d) result = d; } } } integer IIF(integer condition, integer a, integer b, integer c,integer d) { if (condition <= a) return a; if (condition <= b) return b; if (condition <= c) return c; if (condition <= d) return d; return condition; } integer REPS = 10000; default { state_entry() { integer true = TRUE; // superstitious attempt to prevent an optimization? integer false = FALSE; integer result; float ignoreTime; float totalIIFtime; float totalListTime; float totalListvarTime; float totalInlineTime; integer countdown; integer condition; integer length = 4; integer a = 0; integer b = 1; integer c = 2; integer d = 3; integer e = 4; list trueFalse = [a, b, c, d]; ignoreTime += llGetAndResetTime(); // for consistency? for (countdown = REPS; countdown; --countdown) { for (condition = 0; condition < length; ++condition) { result = e; result = IIF(condition, a, b, c, d); } } totalIIFtime += llGetAndResetTime(); for (countdown = REPS; countdown; --countdown) { for (condition = 0; condition < length; ++condition) { result = e; result = llList2Integer([a, b, c, d], (condition > a) + (condition > b) + (condition > c) + (condition > d) ); } } totalListTime += llGetAndResetTime(); for (countdown = REPS; countdown; --countdown) { for (condition = 0; condition < length; ++condition) { result = e; result = llList2Integer(trueFalse, (condition > a) + (condition > b) + (condition > c) + (condition > d) ); } } totalListvarTime += llGetAndResetTime(); for (countdown = REPS; countdown; --countdown) { for (condition = 0; condition < length; ++condition) { result = e; if (condition <= a) result = a; else if (condition <= b) result = b; else if (condition <= c) result = c; else if (condition <= d) result = d; } } totalInlineTime += llGetAndResetTime(); llOwnerSay("Total times:\n\t" +(string)totalIIFtime+" : IIF (user function call)\n\t" +(string)totalListTime+" : llList2Integer indexing\n\t" +(string)totalListvarTime+" : llList2Integer indexing of constant-valued list variable\n\t" +(string)totalInlineTime+" : inline conditionals"); }
  7. i used your test harness Qie to test 'preline' code vs inline code 'preline' meaning assign a default value so to only do an IF and not an IF ELSE result = FALSE; if (true) result = TRUE; result = TRUE; if (false) result = FALSE; i ran the test in 14 sets. 7 on Lewis and 7 on Plum each set was 20 reps of 100,000. 2,000,000. Alternating the order within each rep resetting the script between each set data below is pretty marginal the difference but 'preline' came out in front 11 times vs 3 times for inline so pretty much we can confirm what we already thought. If we after performance then is no substitute for copious lines of inline code. And seems like 'prelining' can give some tiny bit more performance over the long run Lewis region work: Totes times: 16.866480 : inline conditionals 16.758780 : preline conditionals (p) work: Totes times: 16.978610 : inline conditionals 16.735420 : preline conditionals (p) work: Totes times: 16.068230 : inline conditionals 16.000920 : preline conditionals (p) work: Totes times: 17.401600 : inline conditionals 17.158410 : preline conditionals (p) work: Totes times: 16.423780 : inline conditionals 15.900300 : preline conditionals (p) work: Totes times: 16.888160 : inline conditionals (i) 17.113820 : preline conditionals work: Totes times: 16.911920 : inline conditionals 16.623720 : preline conditionals (p) Plum region work: Totes times: 16.404080 : inline conditionals 16.154130 : preline conditionals (p) work: Totes times: 17.001260 : inline conditionals (i) 17.334990 : preline conditionals work: Totes times: 16.446620 : inline conditionals (i) 16.600650 : preline conditionals work: Totes times: 15.578240 : inline conditionals 15.357420 : preline conditionals (p) work: Totes times: 17.160240 : inline conditionals 16.642140 : preline conditionals (p) work: Totes times: 16.090590 : inline conditionals 15.512880 : preline conditionals (p) work: Totes times: 16.578000 : inline conditionals 16.045150 : preline conditionals (p)
  8. i use lists a lot. I am influenced tho by the kinds of apps I write for myself, mostly wearables. Things like dance hud, my tail, AO, wearable MOAP player, etc. With these kinds of apps then I just want to change out the dataset to effect changes and not have to mod the script itself
  9. is always pretty interesting to me these kinds of things a way to do IFF without doing a function is to use a list example integer result = llList2Integer([falsevalue, truevalue], condition); other things we can do say we want to return a range bound result if (value < low) return low else if (value > high) return high else return value value = llList2Integer([low, value, high], (value > low) * (-(value > high) | 1)); then there is when we have multiple bounded ranges if (v <= a) return a else if (v <= b) return b else if (v <= c) return c else if (v <= d) return d else return e v = llList2Integer([a, b, c, d, e], (v > a) + (v > b) + (v > c) + (v > d));
  10. just a fyi about this the script picks up that we are in range of the sensor. The script says in chat or dialog that it will try to eject us. It can't actually eject us as we are not on the parcel if we are going to Abuse Report this then it comes under Spam. A dialog or chat message that has no purpose is spam. Is the same kind of spam when we are going by a parcel (not on it) and the script shouts greetings at us, or shouts and drops LMs and such on us. This is all spam, as we are not on the parcel
  11. this is the base of the topic. What is meant by optimize ? this is not to say that this is not being thought about by residents or by Linden. Resident creators pretty much do the best they can, just that optimize has different meanings for them depending on their product like for example, indoor furnishings (behind walls therefore not needed to be seen from long distances) can have less complex LODs than do outdoor furnishings (which can be seen from long distances). In this case both opposites are optimal which leads to, what is the Linden standard for optimisation ? At the moment the standard is pretty broad. Is whatever is accepted by the uploader code and if there was to be a standard then what would it be ? Which is an ongoing open question
  12. this is also an option i think is more about how Linden can/could/should/maybe/somehow move 'optimisation' to earlier in the process of asset production and I think if this was done then there could be a 'standard' for creating SL compatible mesh. With a standard (a baseline) to which people are working then it would I think make ideas like Baked Mesh Model a little less arduous to implement
  13. yes agree. Would be very nice to have this is not easy tho to implement as you say. Which isn't to say it couldn't/shouldn't be done, just that the path is long and rocky
  14. about 4 or 5 hours, or until the home invader runs away all by themself. When our orb is like little chikkens that make lots of cheeping sounds with particles when it pecks their feet and bumps the invader just a little bit to make their avatar jiggle. Or a puppy which goes woof woof ! and rubs itself on the invaders leg making them both jiggle and when the invader goes ah! hah! and sits on the furniture then the chikkens come and peck peck and the little dog rubs itself on the furniture which unsits the object of their desire (the invader). Annnd if the invader is silly enough to do a system Sit then even better. The chikkens get all excited and more sounds and particles and next thing they breeding off the invader and is heaps off them going Mommy! mommy! And I wont say about what happens particle-wise to the little dog when he gets really excited having met the love of his life ! 😸
  15. as has been mentioned already you are removing the listener as soon as you create it you mostly got it right tho. So i just tidy up an example for you touch_start(integer total_number) { if (llDetectedOwner(0)) // owner touched me { main_menu(id, mainMenuDialog, mainMenuButtons); // start the timer in main_menu as the last line } } listen (..., string text) { close_menu(); // we have the button value in 'text' so we can close main_menu ... do something with button 'text' ... } timer() { close_menu(); }
  16. am not sure that making it easier to make stuff is a negative. Is not so much about the technicals, is about the art of making like I can make a way better vehicle that many other people from a technical perspective. it will outperform and out run anything else on the grid, and crash a whole lot less on region crossings than any other competing vehicle only issue I have with my mighty grid crushing, destroy all challengers vehicle, is that is a box with the sandpaper texture removed. brmmm !! Which doesn't have a whole lot of commercial appeal to people who like bling. Yanno bling! like wheels and wings and stuff 😺
  17. is not suggested to do away with the existing viewer build tools. They are perfectly fine as they are, for what they do. This is about meshes channelling my inner Stimpy. Maybe or maybe not do it if the answer is maybe then why ? SL avatar assets have to be rigged in a way peculiar to SL LOD models are also done in a way peculiar to SL a third one is making models SL physics compatible then additional things like UVs, PBR when it comes, etc. All done in the SL way i think the underlying why is that SL assets to perform well, have to conform technically to the ways in which the region server and viewer best function. And I think such a program is a way for Linden to standardise creative technical conformity that best suit the region server and the viewer the program renders the asset in the exact same way as the viewer does. Can flip the view between Build mode and Display mode. What you see is what you will get inworld when upload any deficiencies or suggestions for improvement to assets can then be done formally thru the JIRA. Instead of how it is now, done informally thru various other channels that Linden staff frequent on topics that are not formal JIRA material i also think such a program needs a plugin interface, so that 3rd parties (residents) can monetarise their plugins (or not as they choose)
  18. hmm! I have a guess buy one year and get the second year at a discount if you pay for both now
  19. suggest you do it under Account Creation Issue
  20. on the Linden viewer, menu: Develop \ Show Info \ Show Color Under Cursor should be about in the same place on Firestorm
  21. ask as many questions as you want. Is what the scripting forum is for, and the scripters who come here will be happy to help you out as many times as you want
  22. Linden are currently looking at implementing PBR (enhanced materials apparently). Never know Linden might end up doing PBR BoM eventually somehow
  23. you will find that if the script is reset manually when the prim is in the open position then is_closed flag will be the opposite (closed) on start up if is for our use then is not a biggie. If we transfer it to another person then is best that prim and flag are aligned should they ever reset the script
  24. as I remember is the olden days free accounts who get the L$50 stipend, who have to in at least once a week to get the L$50 for that week
  25. kawaii is pretty much always exaggerated. Is the same with neko. I have always been neko and I have never grown up in SL. Is when we don't exaggerate these styles (go over the top) then it all gets hard for parcel owners if we are going to be kawaii then be all kawaii. Don't mix up it up with GND
×
×
  • Create New...