Jump to content

Miranda Umino

Resident
  • Posts

    411
  • Joined

  • Last visited

Everything posted by Miranda Umino

  1. You may change only small insignifant this to meshes in world : only the size( but you may be forbidden because of your amount available prims ) , rotation, position , name , textures ( but in practice you couldn t because you don t know the UVMap ), permissions ( who cares ? ) , links ( but in practice you couldn t always because there is an overhead about rendereing cost) and contents . You can t change type of course ( mesh to sculpties for instnace ) You can t change nothing else. Mesh editing inworld = zero
  2. Since today , i meet an awesome lag In my statistics viewers ( contole + shift + 1) i can see - my bandwith is eaten to the max ( in my instance 1400 kb/s) - in the details of networks statistics , "objects" eat the whole bandwidth ( 1350 kb/s in my instance , and 50kb only for textures ) Do you meet this problem ?
  3. You sell a right on an asset ; you don t sell a dae file or slm file
  4. Sincerly i don t understand why the whole object has got a size doubled when it s scripted and not only the prim having the script. The LINK* functions are useless in practice with meshes .
  5. I understand this sentence wroten at http://wiki.secondlife.com/wiki/Viewer_URI_Name_Space about the need to block other browsers "Most secondlife:///app URLs only work from browser instances running inside Second Life because of a denial-of-service attack using secondlife:///app/teleport links to force repeated teleports." If i call a page by the internal browser , i pass through the SL Server proxy who overwrites the headers and who knows if i am calling the page in-world or by an external browser But why does the internal browser is considered as an external browser ?
  6. I ve seen the wiki about llSetMemoryLimit , but i dont understand the goal or the interest of this function ? Who will be enough fool to think that 64 k is too much memory for him ?
  7. I am using the documentation from http://wiki.secondlife.com/wiki/Viewer_URI_Name_Space Inside the viewer , when i build one URI with the teleport action , it works I ve used a media on prim with a page with links who pints to these URI For mostly any URI , the media on prim works correctly .... except ... for TP .. This is a sample script i use : show(string html) { html = "data:text/html," + llEscapeURL(html); llSetPrimMediaParams(0, // Side to display the media on. [PRIM_MEDIA_AUTO_PLAY,TRUE, // Show this page immediately PRIM_MEDIA_CURRENT_URL,html, // The url currently showing PRIM_MEDIA_HOME_URL,html, // The url if they hit 'home' PRIM_MEDIA_HEIGHT_PIXELS,512, // Height/width of media texture will be PRIM_MEDIA_WIDTH_PIXELS,512]); // rounded up to nearest power of 2. } default { state_entry() { llRequestURL(); } http_request(key id, string method, string body) { if (method == URL_REQUEST_GRANTED) { show("<h1>Go TO :<br>"+ "<a href='secondlife:///app/teleport/BlueSteel%20Sandbox%201/60/131/23'>TP</a><br>"+ "<a href='secondlife:///app/inventory/show'>Inventory</a><br>"+ "<a href='secondlife:///app/worldmap/BlueSteel%20Sandbox%201/60/131/23'>show map</a>"+ "</h1>"); } else if (method == "GET") { llOwnerSay("get"); } } } To display the world map , there is no problems . To open Inventory ( just for the exemple ), no problems too. But to TP , it fails and displays A SLurl was received from an untrusted browser and has been blocked for your security. - Firstly it doesn t reassure about the fiability of the internal viewer - Secondly, it s weird that it s blocked inside SL but not blocked when we use the URI with chrome or internet viewer . I suspect a bug with viewer Has anybody got one idea to fix this ?
  8. 1) If you compile in mono , you may replace llGetFreeMemory by llGetUsedMemory http://wiki.secondlife.com/wiki/LlGetUsedMemory llGetFreeMemory returns the top of the used stack and doens t pay attention to the fragmentation of memory . llGetUsedMemory returns the memory used and pays attention to the fragmentation of memory 2) if you use some huge lists or some huge strings , and if you call some functions with list or string in parameters , you may fail in stack heap collision even if you have got enough memory . It s because the arguments of functions are passed by value and not by reference write myList = llDeleteSubList((myList=[])+myList, 0, 0); instead myList = llDeleteSubList(myList, 0, 0);
  9. Store varaiables in prim properties unused is in my opinion something to avoid if we don t need to store permanently . Firstly it s slower than LINK_MESSAGES; secondly all the world is warned by the modification of the prim so it increases the general sim lag . Informations of change of properties are broadcasted to any avatars . default{ touch_start(integer total_number) { integer i = 10000; key k1 = llGetKey(); key k2 = llGetOwner(); float x = llGetTime(); while ( ~ --i ) { llMessageLinked(LINK_SET, 1000,"", k1); llMessageLinked(LINK_SET, 1000,"", k2); } llOwnerSay((string)(llGetTime()-x)); i = 10000; x = llGetTime(); while ( ~ --i ) { llSetLinkPrimitiveParamsFast(LINK_SET, [ PRIM_TEXTURE, 1, k1, ZERO_VECTOR, ZERO_VECTOR, 0.0 ] ); llSetLinkPrimitiveParamsFast(LINK_SET, [ PRIM_TEXTURE, 1, k2, ZERO_VECTOR, ZERO_VECTOR, 0.0 ] ); } llOwnerSay((string)(llGetTime()-x)); }}[12:55] Object: 9.774347 time for linked_messages[12:56] Object: 109.367800 time for set properties .
  10. I ve got many problems and iissues of performance with SL2 or viewers based on it like Firestorm . Firstly , occasionnaly , even after 30 minutes loaded a sim , i see many textures in grey . Secondly , and many more frequent , the UI/GUI , every elements displayed who are not the 3D items of the world , are slowing my FPS hugely . A simple move of the cursor of the mouse decrease very quickly my performances , some floating messages when some IMS come or group chat talk slow down my computer . Even sometimes , chat in local when my history chat is long and i have stayed some hours in the same session of second life With 10 avatars around me , i am often frozed if i do some actions like moving cams , looking my inventory , browsing in the internal browser, select with right button an item etc .. It s the kind of thing i don t meet with 1.23 clients or 1.23 based clients
  11. llGetBoundingBox works only on physics prims . To add , for linksets , it will give the size of the linkset , not the size of the root prim
  12. if you use llSetLinkTextureAnim with a special texture ( normally the same texture with the same rate ) with transparence , and different levels of grey , no colors; and if you use llSetLinkPrimitiveParamsFast for each of your prim to set them with a different color ; should it be like you expect ?
  13. Maybe the height . Normally the gravity is very lightly different with the height . In SL we can go from 0 to 4000 in an instant , and we could see some differences between the 2 experiences , one shot at 0 m and one shot at 4000 . It can surprise because we are not used to this comportment in real life Nevertheless , the delta diffrence should be at the maximum 0.001 m.s-2 . Normally on real earth it s more the latitude and longitude who make changes on gravity In real , the height gives some different pressures too . So the measures in real are difficult to interprete and can be different than in SL . The wind resistence is different too. Neverthess , if they were some differences between sl and rl , it s more probably because of imprecions of computing
  14. oh mygod .. Newton .. where was my head ? this apple has made maybe fall my memory :matte-motes-big-grin: Thank you everybody for your answers . It s certainly the best idea to use llSetForce with llGetMass to move the item with a constant acceleration . You have talked about a wiki on vehicles , but i is there a good wiki on physics ? I think more physics to use with industrial machines for instance ? **edit* i ve tried to control my item as a vehicle even if it s not really a vehicle. it gives some interesting effects . And the code is simplified a lot of .. Nevertheless it s really unprecise , smooth, simple but unprecise. I keep an eye above this , maybe it could be an option
  15. I have got an objet i want to move with a constant linear acceleration until to reach a maximum velocity I know the function llGetAccel , but there is no function llSetAccel . To move an object with a constant linear velocity i do generally a llMoveTotarget with a varaiable tau .And inside the event not_at_target , i call again llMoveTotarget with the same variable tau . But for accelerations, it s ceratinly different. How do you do ?
  16. llSetAlpha has got a delay , but you dont wait the end of the delay to fire the second llSetAlpha integer giChan;default { attach(key id) { if (id != NULL_KEY) { //check if the HUD has got attached, not detached giChan = (integer)("0x" + llGetSubString(llGetOwner(), 0, 7)) * -1; //compute a channel number based in the key of the owner } } touch_end(integer num_detected) { state first_alpha; }}state first_alpha{ state_entry() { llWhisper(giChan, "throw"); //say the defined comand for playing the animation llSetAlpha(0, ALL_SIDES); } changed (integer change ) { if (change & CHANGED_COLOR ) state second_alpha; }}state second_alpha{ state_entry() { llSleep(0.1); // to tune at your conveniance llSetAlpha(100, ALL_SIDES); } changed (integer change ) { if (change & CHANGED_COLOR ) state default; }}
  17. When you say "i want to change dinamically a picture on a prim" it may depend how ( what action ) it changes. If you want just a kind of diaporama or a carousel , you may use llSetPrimMediaParams, llGetPrimMediaParam & llClearPrimMedia. There are many pictures host services who can display for a diaporama with the pictures you have uploaded on their site . For instance , you may use flicker , pick up the url of your diaporama , for instance http://www.flickr.com/photos/hathuyanna/show/with/4444861729 and put it on the media on prim. Flicker diaporama is nice because the menu goes away when your cursor is not above the picture after a moment If you use LSL , you could swap from a diaporama to an another with an action of the user . For instance . Link your board with some prims who , by touch , will change the URL of the board . Either load the url only when there is an avatar nearby and clear the media when nobody is nearby , tested by a sensor Check http://wiki.secondlife.com/wiki/LlSetPrimMediaParams for more informations You may use too the URL of a PNG but it s static not dynamic . Weirdly the URL of a TGA or a JP2 will display the binary of the picture , but not the picture itself . An other way is to use a dynamical page as PHP or JSP page , who will generate a picture on the fly . Probably you will need to tune with the sizes of the texture ( not of the prim ) and maybe the offsets
  18. Even for POST method , there is a limit in the size of the body , but generally it s huge compared to the limit size of URLs For instance , for an apache web server the limits is delared in the parameter LimitRequestBody inside your config file httpd.cond Check the other parameters too : #LimitRequestLine: Limit on bytes in Request-Line (Method+URI+HTTP-version). #Maximum value set by DEFAULT_LIMIT_REQUEST_LINE in httpd.h to 8190KB #LimitRequestFieldsize: Limit on bytes in any one header field. #Maximum value set by DEFAULT_LIMIT_REQUEST_FIELDSIZE in httpd.h to 8190KB #LimitRequestBody: Limit on bytes in Request-Line. #LimitRequestFields: Limit on number of request header fields. The application server can limit too the size of requests. For instance , for a php application server , the limit is declared inside your php.ini config file with these parameters upload_max_filesize = 2M post_max_size = 2M Check your host web server hosting documentation to know the limits Anyway , you will be limited by the size of your string inside the LSL script , so 64 kb in mono with a 16bit character size . So 32 kb less the side code of your script and the size of other datas you use For the max number of connections actives , you should check too your httpd.conf file if you are using apache . It s easy to modify but is often difficult to tune correctly For instance , for apache web server you may check this directive MaxKeepAliveRequests for statics MaxClients for dynamics Nevertheless , there are many other directives you should check too A simple common configuration in local may handle 400 active requests if you answer some static documents ( images , for instance ) but around 50 active requests only for dynamic documents ( php , jsp asp .. ) without to have a time out . To go back to the 1st post , 50 connections per minute is easily handled . 50 connections per seconds could fail . It can depend how fast you generate the answer If you are using a database you should check too the configuration of your database . Generally , each database has got a pool of connections . If you are using this pool of connections it s fine , but you will be limited by the size of the pool . If you don t use this pool of connection inside your php , jsp, asp page , and create some connection inside the page , you will fail to timeout quickly .
  19. :matte-motes-big-grin-squint: void , my bad .. i was tired ...
  20. This code below costs many creation of lists .. Let s cross fingers that the garbage collector works well list ListReplaceIntegerElementByIndex(list l , integer index , integer value){ return llList2List( l , 0, index -1 ) + (list)value + llList2List( l , index +1 , -1 );}default{ state_entry() { // displays Object: 10, 20, 30, 40, 1000, 60, 70, 80, 90 llOwnerSay(llList2CSV( ListReplaceElementByIndex( [ 10, 20, 30, 40, 50, 60, 70, 80, 90 ], 4, 1000))); }}
  21. So , detecting viewer is probably useless .. Positions of HUDS can depend of the screen resolution, of the resolution window in graphical preferences , maybe your viewport too and maybe other some different configuration settings
  22. Hi , i ve got a problem of memory in a script and i don t understand what it happens . I am very glad that in the Snack sims the function llGetUsedMemory has been released . So , i ve wanted to test my scripts It s a simple script who allocates some memory every time and it frees the old memory when i ve reached an amount of memory when i write the function FIFO_free_memory with the line "llOwnerSay("free called");" commented , the script reaches a stack heap error collision when i write the function FIFO_free_memory with the line "llOwnerSay("free called");" uncommented , the script runs until i stop it in touching a second time list l ; // it s my FIFO list , i will add some elements on it .. and when i reach too much memory , i will delete the first elements inputed integer i =0; // a counter to know how many allocations i have done integer start; // a boolean to start and stop the script // Function to free the memory list FIFO_free_memory(list l) { // i am allocating 7 per 7 elements each time . So i m deleteing the 7 firsts elements //llOwnerSay("free called"); return llDeleteSubList(l, 0, 6) ; } list FIFO_add_memory( list l) { // i add 7 elements ( the firsts are just to make grow teh memory faster . The counter at the end will inform me which element i ve reached return l + [ llGetKey(), llGetOwner(),llGetKey(), llGetOwner(), llGetKey(), llGetOwner(), i++ ]; } default { state_entry() { // initialize start start = TRUE; } touch_start(integer total_number) { // the first time i touch the prim i run the timer // the second time i stop the script and restart it to be sure to have not clean memory between two runs if (start) { start = FALSE ; llSetTimerEvent(0.25); } else llResetScript(); } timer() { // i display the memory used and the top of the stack llOwnerSay("Timer Memory used =" + (string)llGetUsedMemory() + " SP="+(string)llGetFreeMemory() ); // if i ve used more 40kbytes , i start to desallocate before to allocate if ( llGetUsedMemory() > 40000 ) { l = FIFO_free_memory(l); // i display number elements in the list the 1st value of the counter and the last value of the counter llOwnerSay("Number elements =" + (string)llGetListLength(l)+ " 1st=" + llList2String(l,6) + " last="+llList2String(l,-1) ); } l = FIFO_add_memory(l); } } When the script runs without stack heap error collision , it displays ... ... [18:43] Object: Timer Memory used =37792 SP=27744 [18:43] Object: Timer Memory used =38420 SP=27116 [18:43] Object: Timer Memory used =39048 SP=26488 [18:43] Object: Timer Memory used =39676 SP=25860 [18:43] Object: Timer Memory used =40304 SP=25232 [18:43] Object: free called [18:43] Object: Number elements =364 1st=1 last=52 [18:43] Object: Timer Memory used =40352 SP=25232 [18:43] Object: free called [18:43] Object: Number elements =364 1st=2 last=53 [18:43] Object: Timer Memory used =40304 SP=25232 [18:43] Object: free called [18:43] Object: Number elements =364 1st=3 last=54 [18:43] Object: Timer Memory used =40304 SP=25232 [18:43] Object: free called [18:43] Object: Number elements =364 1st=4 last=55 [18:43] Object: Timer Memory used =40304 SP=25232 [18:43] Object: free called [18:43] Object: Number elements =364 1st=5 last=56 [18:43] Object: Timer Memory used =40304 SP=25232 [18:43] Object: free called ... ... and so on , it continues without break When it s stopped by a stack heap error collision i ve displayed [18:47] Object: Timer Memory used =37164 SP=28372 [18:47] Object: Timer Memory used =37792 SP=27744 [18:47] Object: Timer Memory used =38420 SP=27116 [18:47] Object: Timer Memory used =39048 SP=26488 [18:47] Object: Timer Memory used =39676 SP=25860 [18:47] Object: Timer Memory used =40304 SP=25232 [18:47] Object: Number elements =364 1st=1 last=52 [18:47] Object: Timer Memory used =40352 SP=25232 and one stack heap error collisiion there
  23. So, use the preprocessor of your C compiler . There exists a C preprocessor/compiler in every architectures even not-AMD/Intel
  24. Ugly and probably useless The better way is to use the preprocessor of some alternative viewers to develop. For the final distribution to the customers , the code preprocessed can be generated to work in any viewer. To add the optimiser will remove the functions declared but not called . It s a thing impossible to do with the ugly trick in the precedent posts The description of preprocessor is here http://wiki.secondlife.com/w/index.php?title=User:Toy_Wylie/Phoenix/Preprocessor&diff=1033262&oldid=prev chapter 5 Including files has one disadvantage though. You will get the complete contents of the file, if you need it or not. But the Phoenix LSL Preprocessor uses an optimizing technique, which only keeps the things you really used in your code and removes all global functions and variables you didn't reference in your script. This makes sure that your scripts don't get burdened with a lot of unused code. You can enable or disable this functionality in the script editor's "Advanced" menu.
×
×
  • Create New...