SlideShare une entreprise Scribd logo
1  sur  20
VWBPE 2020
Overcoming Limitations of LSL
for SL and OpenSim
JB Hancroft
jbhancroft@gmail.com
Agenda
- Introduction
- Objective
- Terminology / Background
- Limitations
Introduction
- Professional scripter and game designer
- Dept of Defense (DOD) Federal Virtual World
Challenge (FVWC) award winner
- SLPro! presenter (LindenLab conference)
- Clients include - universities, gov't and military,
pharma companies, R&D, others
Objectives
Provide you with some practical solutions to
work around LSL and SL/OpenSim limitations.
A blend of design approach and specific technical
solutions...
Terminology / Background (1)
- LSL is an event-driven language
- Events (e.g. a message input on a listen, a timer, a link
message, a web-server reply, etc.)
- Multiple scripts in an object run in parallel, often in an
unpredictable order
- Messages between scripts are called link messages
- Messages between objects: I call them "listen" messages
Terminology / Background (2)
- Messages from a web or database server: let's call them
HTTP messages (or “off-world server”)
- Mono - the larger and faster of the compiled run-time
object formats (checkbox when you Save a script)
- Viewer - what you run locally, as a "fat" client
- Sim/region - the portion of the server dedicated to
simulating your virtual land, objects, and experience
Memory limit of 64k per Mono script
Solution: run multiple parallel scripts
Key to success: each one 'owns' certain data
as the 'source of truth' for that data, and owns
the operations on that data
Be careful - by default, each script Saved as Mono
takes up the full 64K code/stack/heap space.
See llSetMemoryLimit( )
Too Many running scripts causes lag
Solution 1: turn scripts off when you don't need
them
llSetScriptState("script name",FALSE);
But, this is still taking up memory, even when not
running
Many running scripts can cause lag
Solution 2: have an object act as a script
warehouse that can send over a script to the
desire destination, on demand
llSetRemoteScriptAccessPin( ) - sets the PIN
llRemoteLoadScriptPin( ) - transfers the script
Too many running scripts causes lag
Solution 3: Use off-world computing (e.g. a web
server)
This is particularly useful for applications that
need to work with large sets of text data.
Example - store error message text off-world (web
server)
Alternative - keeping all of the text in a script (poor
use of memory) or a local Notecard (can be slow)
Each script can have only 1 timer
event pending
Solution:
Have a separate 'timers' script that will manage
multiple stacked and/or interleaved timers, which
are then signalled by using llMessageLinked( );
Too many link messages...
LSL has an event queue of 64 events, then events
get dropped (without warning)
Solution: use a link message 'logging script' to see
what actual sequence of messages are being
sent, to where, and when (this is a great
debugging technique, will help you confirm your
design is working as expected, and help eliminate
extra link message traffic)
Too many link messages...
Solution: have scripts ignore high-frequency link
messages by filtering them out first, before
checking all of the other things that the script must
do.
if (num != 12000) return;
<rest of your code>
Too many link messages...
Separate the scripts into functional groups and put
the groups of scripts into separate prims.
llMessageLinked(<prim number>,...) lets you
direct the message to a particular destination
prim, reducing the amount of messages that ALL
of the scripts need to process.
(You might consider this link message "routing")
Too many link messages...
For scripts that broadcast 'status' or data updates,
have them cache the previous version of what
was sent out.
If the data hasn't changed, don't send it again
(Suggestion: have a way to force the message to
be sent, in some circumstances)
Too many link messages...
Solution: Localize code, to reduce link message
'noise', so it's a procedure call, not a link msg
Avoid over-factoring your code into too many
scripts.
(This can be difficult, in very large projects)
Unreliable code execution order
In SL, you have to take extreme measures to
control the order in which scripts reset, start, or
run. Very complicated sets of parallel scripts can
exhibit widely varying or intermittent behavior.
Solution: make your design as asynchronous as
possible, ideally allowing the restart of any one
script at any time, with all required data being
provisioned by other scripts. This will decouple
your design/build/test sequence from having to do
a complete restart of everything on each and
every code change.
SL has region restarts / rollbacks
Think about restarts and rollbacks during the
design phase of your project, before you get
deeply invested in an approach that might be
crippled by a rollback.
You can detect a rollback by keeping some 'state'
on an off-world / external server, and watching for
a change in SL to an earlier state.
Conclusions
Think about the structure of your design before
you start coding!
Think about small modules, but not too small.
Think about how your scripts run in parallel.
Think about performance ahead of time.
Make your design easy to maintain and debug.
Thank You!
Thank you for your time and attention. If you'd like
further information on any of what I've covered
here, please feel free to contact me:
Contact info:
email: jbhancroft@gmail.com
SL: JB Hancroft

Contenu connexe

Tendances

Message queuing telemetry transport (mqtt)and part 3 and summarizing
Message queuing telemetry transport (mqtt)and  part 3 and summarizingMessage queuing telemetry transport (mqtt)and  part 3 and summarizing
Message queuing telemetry transport (mqtt)and part 3 and summarizingHamdamboy
 
Message Queue (MQ) Testing
Message Queue (MQ) TestingMessage Queue (MQ) Testing
Message Queue (MQ) TestingUjjwal Gupta
 
Cryptography - Block cipher & stream cipher
Cryptography - Block cipher & stream cipherCryptography - Block cipher & stream cipher
Cryptography - Block cipher & stream cipherNiloy Biswas
 
Encryption/Decryption Algorithm for Devanagri Script(Affine Cipher)
Encryption/Decryption Algorithm for Devanagri Script(Affine Cipher)Encryption/Decryption Algorithm for Devanagri Script(Affine Cipher)
Encryption/Decryption Algorithm for Devanagri Script(Affine Cipher)Swati Nagpal
 
Chapter8 27 nov_2010
Chapter8 27 nov_2010Chapter8 27 nov_2010
Chapter8 27 nov_2010Umang Gupta
 
GopherCon 2017 - Writing Networking Clients in Go: The Design & Implementati...
GopherCon 2017 -  Writing Networking Clients in Go: The Design & Implementati...GopherCon 2017 -  Writing Networking Clients in Go: The Design & Implementati...
GopherCon 2017 - Writing Networking Clients in Go: The Design & Implementati...wallyqs
 
Message passing ( in computer science)
Message   passing  ( in   computer  science)Message   passing  ( in   computer  science)
Message passing ( in computer science)Computer_ at_home
 
Low latency for high throughput
Low latency for high throughputLow latency for high throughput
Low latency for high throughputPeter Lawrey
 
Mqtt protocol in IoT
Mqtt protocol in IoTMqtt protocol in IoT
Mqtt protocol in IoTpravesh kumar
 
Synopsis on "ANALYZING THE EFFECTIVENESS OF THE ADVANCED ENCRYPTION STANDARD ...
Synopsis on "ANALYZING THE EFFECTIVENESS OF THE ADVANCED ENCRYPTION STANDARD ...Synopsis on "ANALYZING THE EFFECTIVENESS OF THE ADVANCED ENCRYPTION STANDARD ...
Synopsis on "ANALYZING THE EFFECTIVENESS OF THE ADVANCED ENCRYPTION STANDARD ...Nikhil Jain
 
Cryptography 1
Cryptography 1Cryptography 1
Cryptography 1bhanu7161
 
Towards Improved Data Dissemination of Publish-Subscribe Systems
Towards Improved Data Dissemination of Publish-Subscribe SystemsTowards Improved Data Dissemination of Publish-Subscribe Systems
Towards Improved Data Dissemination of Publish-Subscribe SystemsSrinath Perera
 
Introduction to Cryptography Part I
Introduction to Cryptography Part IIntroduction to Cryptography Part I
Introduction to Cryptography Part IMaksim Djackov
 
Information Security Cryptography ( L02- Types Cryptography)
Information Security Cryptography ( L02- Types Cryptography)Information Security Cryptography ( L02- Types Cryptography)
Information Security Cryptography ( L02- Types Cryptography)Anas Rock
 

Tendances (20)

Message queuing telemetry transport (mqtt)and part 3 and summarizing
Message queuing telemetry transport (mqtt)and  part 3 and summarizingMessage queuing telemetry transport (mqtt)and  part 3 and summarizing
Message queuing telemetry transport (mqtt)and part 3 and summarizing
 
Cryptography using python
Cryptography using pythonCryptography using python
Cryptography using python
 
Cryptography
CryptographyCryptography
Cryptography
 
Message Queue (MQ) Testing
Message Queue (MQ) TestingMessage Queue (MQ) Testing
Message Queue (MQ) Testing
 
Reflectivity Demo
Reflectivity DemoReflectivity Demo
Reflectivity Demo
 
Cryptography - Block cipher & stream cipher
Cryptography - Block cipher & stream cipherCryptography - Block cipher & stream cipher
Cryptography - Block cipher & stream cipher
 
Encryption/Decryption Algorithm for Devanagri Script(Affine Cipher)
Encryption/Decryption Algorithm for Devanagri Script(Affine Cipher)Encryption/Decryption Algorithm for Devanagri Script(Affine Cipher)
Encryption/Decryption Algorithm for Devanagri Script(Affine Cipher)
 
Crpto ppt
Crpto pptCrpto ppt
Crpto ppt
 
Chapter8 27 nov_2010
Chapter8 27 nov_2010Chapter8 27 nov_2010
Chapter8 27 nov_2010
 
GopherCon 2017 - Writing Networking Clients in Go: The Design & Implementati...
GopherCon 2017 -  Writing Networking Clients in Go: The Design & Implementati...GopherCon 2017 -  Writing Networking Clients in Go: The Design & Implementati...
GopherCon 2017 - Writing Networking Clients in Go: The Design & Implementati...
 
Message passing ( in computer science)
Message   passing  ( in   computer  science)Message   passing  ( in   computer  science)
Message passing ( in computer science)
 
Uja scp
Uja scpUja scp
Uja scp
 
Low latency for high throughput
Low latency for high throughputLow latency for high throughput
Low latency for high throughput
 
Mqtt protocol in IoT
Mqtt protocol in IoTMqtt protocol in IoT
Mqtt protocol in IoT
 
Synopsis on "ANALYZING THE EFFECTIVENESS OF THE ADVANCED ENCRYPTION STANDARD ...
Synopsis on "ANALYZING THE EFFECTIVENESS OF THE ADVANCED ENCRYPTION STANDARD ...Synopsis on "ANALYZING THE EFFECTIVENESS OF THE ADVANCED ENCRYPTION STANDARD ...
Synopsis on "ANALYZING THE EFFECTIVENESS OF THE ADVANCED ENCRYPTION STANDARD ...
 
Chapter 6 pc
Chapter 6 pcChapter 6 pc
Chapter 6 pc
 
Cryptography 1
Cryptography 1Cryptography 1
Cryptography 1
 
Towards Improved Data Dissemination of Publish-Subscribe Systems
Towards Improved Data Dissemination of Publish-Subscribe SystemsTowards Improved Data Dissemination of Publish-Subscribe Systems
Towards Improved Data Dissemination of Publish-Subscribe Systems
 
Introduction to Cryptography Part I
Introduction to Cryptography Part IIntroduction to Cryptography Part I
Introduction to Cryptography Part I
 
Information Security Cryptography ( L02- Types Cryptography)
Information Security Cryptography ( L02- Types Cryptography)Information Security Cryptography ( L02- Types Cryptography)
Information Security Cryptography ( L02- Types Cryptography)
 

Similaire à VWBPE 2020 - Overcoming LSL Limitations in Second Life

Splunk Conf 2014 - Getting the message
Splunk Conf 2014 - Getting the messageSplunk Conf 2014 - Getting the message
Splunk Conf 2014 - Getting the messageDamien Dallimore
 
Open HFT libraries in @Java
Open HFT libraries in @JavaOpen HFT libraries in @Java
Open HFT libraries in @JavaPeter Lawrey
 
JConf.dev 2022 - Apache Pulsar Development 101 with Java
JConf.dev 2022 - Apache Pulsar Development 101 with JavaJConf.dev 2022 - Apache Pulsar Development 101 with Java
JConf.dev 2022 - Apache Pulsar Development 101 with JavaTimothy Spann
 
High Frequency Trading and NoSQL database
High Frequency Trading and NoSQL databaseHigh Frequency Trading and NoSQL database
High Frequency Trading and NoSQL databasePeter Lawrey
 
Big Data Streams Architectures. Why? What? How?
Big Data Streams Architectures. Why? What? How?Big Data Streams Architectures. Why? What? How?
Big Data Streams Architectures. Why? What? How?Anton Nazaruk
 
bigdata 2022_ FLiP Into Pulsar Apps
bigdata 2022_ FLiP Into Pulsar Appsbigdata 2022_ FLiP Into Pulsar Apps
bigdata 2022_ FLiP Into Pulsar AppsTimothy Spann
 
Winning the Lottery with Spring: A Microservices Case Study for the Dutch Lot...
Winning the Lottery with Spring: A Microservices Case Study for the Dutch Lot...Winning the Lottery with Spring: A Microservices Case Study for the Dutch Lot...
Winning the Lottery with Spring: A Microservices Case Study for the Dutch Lot...VMware Tanzu
 
Pacemaker+DRBD
Pacemaker+DRBDPacemaker+DRBD
Pacemaker+DRBDDan Frincu
 
The Art of Message Queues - TEKX
The Art of Message Queues - TEKXThe Art of Message Queues - TEKX
The Art of Message Queues - TEKXMike Willbanks
 
Software architecture for data applications
Software architecture for data applicationsSoftware architecture for data applications
Software architecture for data applicationsDing Li
 
Advanced off heap ipc
Advanced off heap ipcAdvanced off heap ipc
Advanced off heap ipcPeter Lawrey
 
Building and deploying LLM applications with Apache Airflow
Building and deploying LLM applications with Apache AirflowBuilding and deploying LLM applications with Apache Airflow
Building and deploying LLM applications with Apache AirflowKaxil Naik
 
101 mistakes FINN.no has made with Kafka (Baksida meetup)
101 mistakes FINN.no has made with Kafka (Baksida meetup)101 mistakes FINN.no has made with Kafka (Baksida meetup)
101 mistakes FINN.no has made with Kafka (Baksida meetup)Henning Spjelkavik
 
AI&BigData Lab 2016. Сарапин Виктор: Размер имеет значение: анализ по требова...
AI&BigData Lab 2016. Сарапин Виктор: Размер имеет значение: анализ по требова...AI&BigData Lab 2016. Сарапин Виктор: Размер имеет значение: анализ по требова...
AI&BigData Lab 2016. Сарапин Виктор: Размер имеет значение: анализ по требова...GeeksLab Odessa
 
Beyond the RTOS: A Better Way to Design Real-Time Embedded Software
Beyond the RTOS: A Better Way to Design Real-Time Embedded SoftwareBeyond the RTOS: A Better Way to Design Real-Time Embedded Software
Beyond the RTOS: A Better Way to Design Real-Time Embedded SoftwareQuantum Leaps, LLC
 
Timothy Spann: Apache Pulsar for ML
Timothy Spann: Apache Pulsar for MLTimothy Spann: Apache Pulsar for ML
Timothy Spann: Apache Pulsar for MLEdunomica
 

Similaire à VWBPE 2020 - Overcoming LSL Limitations in Second Life (20)

Splunk Conf 2014 - Getting the message
Splunk Conf 2014 - Getting the messageSplunk Conf 2014 - Getting the message
Splunk Conf 2014 - Getting the message
 
Open HFT libraries in @Java
Open HFT libraries in @JavaOpen HFT libraries in @Java
Open HFT libraries in @Java
 
JConf.dev 2022 - Apache Pulsar Development 101 with Java
JConf.dev 2022 - Apache Pulsar Development 101 with JavaJConf.dev 2022 - Apache Pulsar Development 101 with Java
JConf.dev 2022 - Apache Pulsar Development 101 with Java
 
Mysql Latency
Mysql LatencyMysql Latency
Mysql Latency
 
High Frequency Trading and NoSQL database
High Frequency Trading and NoSQL databaseHigh Frequency Trading and NoSQL database
High Frequency Trading and NoSQL database
 
Big Data Streams Architectures. Why? What? How?
Big Data Streams Architectures. Why? What? How?Big Data Streams Architectures. Why? What? How?
Big Data Streams Architectures. Why? What? How?
 
bigdata 2022_ FLiP Into Pulsar Apps
bigdata 2022_ FLiP Into Pulsar Appsbigdata 2022_ FLiP Into Pulsar Apps
bigdata 2022_ FLiP Into Pulsar Apps
 
Winning the Lottery with Spring: A Microservices Case Study for the Dutch Lot...
Winning the Lottery with Spring: A Microservices Case Study for the Dutch Lot...Winning the Lottery with Spring: A Microservices Case Study for the Dutch Lot...
Winning the Lottery with Spring: A Microservices Case Study for the Dutch Lot...
 
Pacemaker+DRBD
Pacemaker+DRBDPacemaker+DRBD
Pacemaker+DRBD
 
The Art of Message Queues - TEKX
The Art of Message Queues - TEKXThe Art of Message Queues - TEKX
The Art of Message Queues - TEKX
 
Software architecture for data applications
Software architecture for data applicationsSoftware architecture for data applications
Software architecture for data applications
 
Advanced off heap ipc
Advanced off heap ipcAdvanced off heap ipc
Advanced off heap ipc
 
Spring batch
Spring batchSpring batch
Spring batch
 
Building and deploying LLM applications with Apache Airflow
Building and deploying LLM applications with Apache AirflowBuilding and deploying LLM applications with Apache Airflow
Building and deploying LLM applications with Apache Airflow
 
Rust Hack
Rust HackRust Hack
Rust Hack
 
Smartblitzmerker
SmartblitzmerkerSmartblitzmerker
Smartblitzmerker
 
101 mistakes FINN.no has made with Kafka (Baksida meetup)
101 mistakes FINN.no has made with Kafka (Baksida meetup)101 mistakes FINN.no has made with Kafka (Baksida meetup)
101 mistakes FINN.no has made with Kafka (Baksida meetup)
 
AI&BigData Lab 2016. Сарапин Виктор: Размер имеет значение: анализ по требова...
AI&BigData Lab 2016. Сарапин Виктор: Размер имеет значение: анализ по требова...AI&BigData Lab 2016. Сарапин Виктор: Размер имеет значение: анализ по требова...
AI&BigData Lab 2016. Сарапин Виктор: Размер имеет значение: анализ по требова...
 
Beyond the RTOS: A Better Way to Design Real-Time Embedded Software
Beyond the RTOS: A Better Way to Design Real-Time Embedded SoftwareBeyond the RTOS: A Better Way to Design Real-Time Embedded Software
Beyond the RTOS: A Better Way to Design Real-Time Embedded Software
 
Timothy Spann: Apache Pulsar for ML
Timothy Spann: Apache Pulsar for MLTimothy Spann: Apache Pulsar for ML
Timothy Spann: Apache Pulsar for ML
 

Dernier

General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxNikitaBankoti2
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 

Dernier (20)

General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptx
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 

VWBPE 2020 - Overcoming LSL Limitations in Second Life

  • 1. VWBPE 2020 Overcoming Limitations of LSL for SL and OpenSim JB Hancroft jbhancroft@gmail.com
  • 2. Agenda - Introduction - Objective - Terminology / Background - Limitations
  • 3. Introduction - Professional scripter and game designer - Dept of Defense (DOD) Federal Virtual World Challenge (FVWC) award winner - SLPro! presenter (LindenLab conference) - Clients include - universities, gov't and military, pharma companies, R&D, others
  • 4. Objectives Provide you with some practical solutions to work around LSL and SL/OpenSim limitations. A blend of design approach and specific technical solutions...
  • 5. Terminology / Background (1) - LSL is an event-driven language - Events (e.g. a message input on a listen, a timer, a link message, a web-server reply, etc.) - Multiple scripts in an object run in parallel, often in an unpredictable order - Messages between scripts are called link messages - Messages between objects: I call them "listen" messages
  • 6. Terminology / Background (2) - Messages from a web or database server: let's call them HTTP messages (or “off-world server”) - Mono - the larger and faster of the compiled run-time object formats (checkbox when you Save a script) - Viewer - what you run locally, as a "fat" client - Sim/region - the portion of the server dedicated to simulating your virtual land, objects, and experience
  • 7. Memory limit of 64k per Mono script Solution: run multiple parallel scripts Key to success: each one 'owns' certain data as the 'source of truth' for that data, and owns the operations on that data Be careful - by default, each script Saved as Mono takes up the full 64K code/stack/heap space. See llSetMemoryLimit( )
  • 8. Too Many running scripts causes lag Solution 1: turn scripts off when you don't need them llSetScriptState("script name",FALSE); But, this is still taking up memory, even when not running
  • 9. Many running scripts can cause lag Solution 2: have an object act as a script warehouse that can send over a script to the desire destination, on demand llSetRemoteScriptAccessPin( ) - sets the PIN llRemoteLoadScriptPin( ) - transfers the script
  • 10. Too many running scripts causes lag Solution 3: Use off-world computing (e.g. a web server) This is particularly useful for applications that need to work with large sets of text data. Example - store error message text off-world (web server) Alternative - keeping all of the text in a script (poor use of memory) or a local Notecard (can be slow)
  • 11. Each script can have only 1 timer event pending Solution: Have a separate 'timers' script that will manage multiple stacked and/or interleaved timers, which are then signalled by using llMessageLinked( );
  • 12. Too many link messages... LSL has an event queue of 64 events, then events get dropped (without warning) Solution: use a link message 'logging script' to see what actual sequence of messages are being sent, to where, and when (this is a great debugging technique, will help you confirm your design is working as expected, and help eliminate extra link message traffic)
  • 13. Too many link messages... Solution: have scripts ignore high-frequency link messages by filtering them out first, before checking all of the other things that the script must do. if (num != 12000) return; <rest of your code>
  • 14. Too many link messages... Separate the scripts into functional groups and put the groups of scripts into separate prims. llMessageLinked(<prim number>,...) lets you direct the message to a particular destination prim, reducing the amount of messages that ALL of the scripts need to process. (You might consider this link message "routing")
  • 15. Too many link messages... For scripts that broadcast 'status' or data updates, have them cache the previous version of what was sent out. If the data hasn't changed, don't send it again (Suggestion: have a way to force the message to be sent, in some circumstances)
  • 16. Too many link messages... Solution: Localize code, to reduce link message 'noise', so it's a procedure call, not a link msg Avoid over-factoring your code into too many scripts. (This can be difficult, in very large projects)
  • 17. Unreliable code execution order In SL, you have to take extreme measures to control the order in which scripts reset, start, or run. Very complicated sets of parallel scripts can exhibit widely varying or intermittent behavior. Solution: make your design as asynchronous as possible, ideally allowing the restart of any one script at any time, with all required data being provisioned by other scripts. This will decouple your design/build/test sequence from having to do a complete restart of everything on each and every code change.
  • 18. SL has region restarts / rollbacks Think about restarts and rollbacks during the design phase of your project, before you get deeply invested in an approach that might be crippled by a rollback. You can detect a rollback by keeping some 'state' on an off-world / external server, and watching for a change in SL to an earlier state.
  • 19. Conclusions Think about the structure of your design before you start coding! Think about small modules, but not too small. Think about how your scripts run in parallel. Think about performance ahead of time. Make your design easy to maintain and debug.
  • 20. Thank You! Thank you for your time and attention. If you'd like further information on any of what I've covered here, please feel free to contact me: Contact info: email: jbhancroft@gmail.com SL: JB Hancroft