Jump to content

SL Object HTTP API


AkyreNerzhul
 Share

Recommended Posts

Hey, so I'm trying to expose LSL methods to other programming languages via a HTTP API. I'm not really a fan of the programming tools available and we have other languages that have a lot more syntactic sugar available.

There's a couple of questions I come here with:

1. Is there something like this already?

2. What's a good use case I can test this on? Does anyone have an object I can try to create a simple controller for?

Obviously there are delay issues but for event based uses, this will be perfectly adequate. Furthermore, the viewer delay matches the HTTP request delay, so practically for a user, it is not too noticeable.

This concept is still in very early stages, but my testing in rotating a box shows that there is potential 🥼.

Link to comment
Share on other sites

15 hours ago, AkyreNerzhul said:

What's a good use case I can test this on?

Honestly, if you could make a general wrapper for llSetLinkPrimitiveParamsFast() that would cover at least 75% of "make an inworld object do a thing" cases.

As for practical use-cases, the main things I can think of are already handled by CTS wardrobe (manages your outfit via website) and Casper systems (get an item redelivery via website).

Edited by Quistess Alpha
Link to comment
Share on other sites

20 hours ago, Xiija said:

In the end, any http incoming will still have to use LSL to affect an object?

I think the best use case for http would be data manipulation or storage.

good luck :)

 

 

Actually no, you'd be using another language to affect the object.

You can think of it as, you going in to SL to tell an object to do something, then running back out of SL with the result. It used to be that you use LSL to tell the object to do something, what I am building is replacing LSL for applications that are not time sensitive. This means you have no memory limitations and no language limitations.

For example, to llOwnerSay something, you would fire off that function from your C#, JS or Java code. The inworld object would receive the command over HTTP.

The advantage of this is that you're no longer limited by the script, you can now build huge programs that exist outside of the SL context, but still be able to access objects within SL via these commands. I've also tested two way communication, so you can request object state (like who it is attached to etc), or listen to well.. listen events.

The next step to expand the use case is to batch commands together, then run them together to get around the round trip time vs single commands.

 

EDIT: Another consideration - LSL lacks the huge amount of libraries offered in say Javascript, where there's millions of user created packages. Need a graph algorithm? Just grab it from NPM. Things aren't as easy in LSL.

Edited by AkyreNerzhul
Link to comment
Share on other sites

15 hours ago, Quistess Alpha said:

Honestly, if you could make a general wrapper for llSetLinkPrimitiveParamsFast() that would cover at least 75% of "make an inworld object do a thing" cases.

As for practical use-cases, the main things I can think of are already handled by CTS wardrobe (manages your outfit via website) and Casper systems (get an item redelivery via website).

Thanks for those two examples, I'll give them a look over. They would be doing something similar underneath. My hope is that I could build something that others such as the creators of those products could use for their systems.

I'm not familiar with using that function "llSetLinkPrimitiveParamsFast" as I'm not a creator, but making a wrapper for it to be called over HTTP is very easy. What makes it so useful? I'm happy to explore down this line if it could produce an example.

Link to comment
Share on other sites

Actually after logging in again, I think I have a good idea for a test to monitor sim users. We'll see how well it works!

For anyone interested, this is the script so far: https://gist.github.com/TheGuardianWolf/9701c76bd2dc481d3bfb19e94df9c2be

It's kind of useless without the gateway as-is, clever coders may be able to remove the gateway server usage if you need to use it in some other way.

Link to comment
Share on other sites

6 hours ago, AkyreNerzhul said:

<llSetLinkPrimitiveParamsFast> What makes it so useful?

http://wiki.secondlife.com/wiki/LlSetLinkPrimitiveParamsFast

What makes it so useful is its wide scope and generality. it is a multi-function which has same or similar functionality to at least 10 other functions, as well as functionality specific to itself. If you have a linked collection of prims (and or meshes) and you want to change their visual appearance in some way, LLSLPPF contains basically every piece of functionality to do that. The list of what it doesn't do (animated textures and particles) is much shorter than the list of what it does.

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...