Mollymews
-
Posts
5,768 -
Joined
Content Type
Forums
Blogs
Knowledge Base
Posts posted by Mollymews
-
-
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
- 1
-
2 hours ago, AnthonyJoanne said:
What people should take away from this is that LL need to make ban lines that actually work, and that don't screw up people who fly/drive/whatever into them
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
-
SSP?
in Linden Homes
-
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
-
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 nestresult = 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"); }
- 1
- 1
-
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)- 2
-
5 minutes ago, Love Zhaoying said:
Believe it or not - this time I am accomplishing the same goals as the previous 4 or 5 times writing this project - without using lists at all.
So, "not using lists" has become a goal in itself.
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
- 1
-
is always pretty interesting to me these kinds of things
a way to do IFF without doing a function is to use a listexample
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 valuevalue = 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 ev = llList2Integer([a, b, c, d, e], (v > a) + (v > b) + (v > c) + (v > d));
- 1
- 1
-
36 minutes ago, Paulsian said:
Sorry I should have said while on public road security security orbs with ranges extending beyond the parcels do happen, i've reported a few, to be perfectly clear while on a public protected road.
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
- 2
-
14 minutes ago, Codex Alpha said:
So in the meantime, encourage creators to optimize their assets they submit to the platform.
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
-
7 hours ago, Coffee Pancake said:
A this point, building a SL Preview plugin for blender is far simpler than building blender in the SL client, even if that client doesn't log in or have social tools (which due to the way the viewer works, would actually be a huge amount of work - the viewer is a 3d dumb terminal, no more).
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
-
4 hours ago, animats said:
I've discussed "baking of mesh", as the possible next step to Bakes On Mesh. The idea is when you change clothes, something grinds away on a server somewhere and combines all the worn mesh pieces into simpler meshes. Hidden triangles are discarded, and simpler LODs are auto-generated. Just as, when you change clothes, a server grinds away and combines all the texture layers into one layer. So the job gets done once per clothing change, not once per frame. This is hard to do, but the other players in the industry are starting to do it.
Creators can't do this. They don't get to optimize the entire outfit and skin together. it has to be done when you get dressed.
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
- 1
-
25 minutes ago, Bree Giffen said:
What would be a reasonable setting for a security orb?
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 !
😸
- 5
- 1
- 1
-
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(); }
- 1
-
7 hours ago, Love Zhaoying said:
Wouldn't a content editor negatively impact and alienate creators, who drive the SL economy?
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 😺
- 1
-
3 hours ago, Wulfie Reanimator said:
If we still were to separate the build tools from the current viewer, what would be the benefit? Would the viewer performance increase significantly? Could we have more advanced tools that we couldn't otherwise?
What about the cost? How much time would it take to create and maintain these separate viewer releases? Would we no longer be able to do something as simple as tint an object without relogging to this "build viewer" or "builder?" (Without scripts anyway.. would those be written in the builder too?)
It should also be noted that those external editors don't replace programs like Blender and Photoshop. The majority of developers still create most assets elsewhere and then import them to these external editors. SL has one step less.
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)
- 1
-
2 hours ago, Chic Aeon said:
In general I have a feeling that while lots of perks have been officially "leaked" LL is withholding a game changer addition to the Premium Plus pack
hmm! I have a guess
buy one year and get the second year at a discount if you pay for both now
- 3
-
-
11 minutes ago, Haiku Quan said:
How do I remove this small read-out in the corner of my screen telling me the pixel my cursor is sitting on?
on the Linden viewer, menu: Develop \ Show Info \ Show Color Under Cursor
should be about in the same place on Firestorm
- 2
- 2
-
1 hour ago, Altier Verwood said:
Hello forums, I feel like I come asking so many questions, I have one more.
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
- 2
-
Linden are currently looking at implementing PBR (enhanced materials apparently). Never know Linden might end up doing PBR BoM eventually somehow
- 2
-
On 5/23/2022 at 6:48 AM, Miguelito Shilova said:
All I needed to do was remove the on_rez event
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
- 1
-
53 minutes ago, Eirynne Sieyes said:
I think you have to log in the avi on a Tuesday to get the stipend, unless that has been changed.
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
-
59 minutes ago, Katherine Heartsong said:
kawaii ... exaggerated
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
- 2
Having trouble understanding llSetTimerEvent
in LSL Scripting
Posted
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