Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Getting Second Life to interact with other Programs

Atrus Hyun
Registered User
Join date: 21 May 2007
Posts: 7
09-14-2007 12:34
I am currently doing a large art project involving Second Life. Right now I am trying to figure out the technical portions of the project.

I am trying to get Second Life to interact with a visual basic program. That visual basic program in turn will be talking to a micro controller, but that's beyond the scope of what I'm asking now.

All I'm trying to do now is try to get that first interaction - Second Life to the Visual Basic program. Can anyone point me in the right direction?
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
09-14-2007 12:57
You mean objects in-world interactive with RL stuff? Or maybe something to do with avatars?

/me looks confused.
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!!
- Go here: http://jira.secondlife.com/browse/SVC-1224
- If you see "if you were logged in.." on the left, click it and log in
- Click the "Vote for it" link on the left
Haruki Watanabe
llSLCrash(void);
Join date: 28 Mar 2007
Posts: 434
09-14-2007 13:22
The only way SL can «talk» to the outside world is by HTTP/RPC-Requests and by email (me thinks :)

So your VB-Program would have to run on a Webserver in order to get informations from SL...

I guess, you'd have to alter the SL-Client to make it interact with a local installed program...
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
09-14-2007 13:23
I'm not sure that your desired interaction is yet possible. You may want to take a look at the OS Client to see if you can get the type of information you need going to your VB program from a modified client. Even simpler, you could see if you could get a POST command to hit a webservice on your "server" and trigger your VB Program with said info.
_____________________
--AeonVox--

Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.
Meade Paravane
Hedgehog
Join date: 21 Nov 2006
Posts: 4,845
09-14-2007 13:41
Well, he could be doing something with bots.. Wouldn't need a web server for that. Or maybe a custom viewer that also interacts with other software running on his machine.

/me still looks confused.
_____________________
Tired of shouting clubs and lucky chairs? Vote for llParcelSay!!!
- Go here: http://jira.secondlife.com/browse/SVC-1224
- If you see "if you were logged in.." on the left, click it and log in
- Click the "Vote for it" link on the left
Debbie Trilling
Our Lady of Peenemünde
Join date: 17 Oct 2006
Posts: 434
09-14-2007 13:44
The product "Particle Wizard" created by Darius Lehane does what you seem to be suggesting, I think.

The product comprises 3 elements (for the purpose of this discussion):

1) an in-game simple prim
2) some scripting mechanism to open a web page (presumably by HTTP/RPC-Requests or some such)
3) an installed program on the PC hard drive (looks like it was developed in VB to me)

Touching the prim in-game opens a blue dialog menu inviting you to "Go To Page". Accepting this invite opens a browser web page with a link. Clicking the web-page link executes the installed program.

All very clever, but it gets better.

Any parameter changes made within the installed program are then fed back into SL and you can see the effect on the in-world simple prim.

BTW: I have no personal interests in this product, nor do i know Darius ~ but I do know a good product when I see one! :)
Dzonatas Sol
Visual Learner
Join date: 16 Oct 2006
Posts: 507
09-14-2007 13:53
If you want the program to talk to the servers, use XML-RPC.

If you want it to talk to the viewer itself, then you'll have to do some extra programming.

I suggest to ask others that work on a similar interface:

https://wiki.secondlife.com/wiki/SLDev
Shadow Subagja
Registered User
Join date: 29 Apr 2007
Posts: 354
09-14-2007 16:40
modify the open source client, thats your best bet. There's an example of something very similar published from a while back:
http://www.hackdiary.com/archives/000101.html

Sounds very similar to what you're doing. You'd just have to port your visual basic code to the language of the client you are using and you're off to the races.
Escort DeFarge
Together
Join date: 18 Nov 2004
Posts: 681
09-15-2007 07:57
You should review the wire protocol for client-server interactions in indra (the open source SL client). The language you are using to implement is totally irrelevant to the issue you are trying to solve.

hth
/esc
_____________________
http://slurl.com/secondlife/Together
Zen Zeddmore
3dprinter Enthusiast
Join date: 31 Jul 2006
Posts: 604
09-15-2007 09:22
alternatly, you could have a hud that color encodes what you wish to know of the SL environment, and program a screen viewing camera accordingly.
_____________________
A kilogram of programmable nanobots can lower the certainty of both death AND taxes.
Atrus Hyun
Registered User
Join date: 21 May 2007
Posts: 7
09-15-2007 14:00
Thanks for the speedy and numerous replies guys.

Let me be a little more specific.

I am looking for a way such that if I was to create a box in SL and a box in RL, I would link the two together. If I moved the box in SL it would move in RL, and vice versa. Hence the two way communication.

Right now it seems XML-RPC is the correct route and I'm trying to do research to figure out how to do that. I have a number of pages open but they all seem to be LSL oriented. Can anyone point me towards a tutorial on how to set up the XML-RPC non second life side of it?
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
09-15-2007 14:12
I'm no VB expert, but I would suspect that it would be easier if you set up a web server using your VB code to respond to llHTTPRequests. I really don't bother with XML-RPC these days.
_____________________
http://ordinalmalaprop.com/forum/ - visit Ordinal's Scripting Colloquium for scripting discussion with actual working BBCode!

http://ordinalmalaprop.com/engine/ - An Engine Fit For My Proceeding, my Aethernet Journal

http://www.flickr.com/groups/slgriefbuild/ - Second Life Griefbuild Digest, pictures of horrible ad griefing and land spam, and the naming of names
Atrus Hyun
Registered User
Join date: 21 May 2007
Posts: 7
09-15-2007 14:48
So you're suggesting setting up a visual basic program to respond to llHTTPRequests, or in other words, every time page X is activated, it's the Second Life program running function X. Every time page Y is activated, it's the Second Life program running function Y. Interesting idea - but can it work both ways?
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
09-15-2007 14:56
The program sits on a web server. A piece of LSL code sends a request to it via llHTTPRequest - it process that and sends a response to it. Or, you can have different pages being called for different purposes, though I tend to have out-world server code interpreting GET parameters, personally.

I have some example PHP code if that's any use, or there is quite a lot out there, but I don't really know about VB. I would assume that you could put it into an ASP or something - sorry, it's not one of my fields.
_____________________
http://ordinalmalaprop.com/forum/ - visit Ordinal's Scripting Colloquium for scripting discussion with actual working BBCode!

http://ordinalmalaprop.com/engine/ - An Engine Fit For My Proceeding, my Aethernet Journal

http://www.flickr.com/groups/slgriefbuild/ - Second Life Griefbuild Digest, pictures of horrible ad griefing and land spam, and the naming of names
Dzonatas Sol
Visual Learner
Join date: 16 Oct 2006
Posts: 507
09-15-2007 18:12
Here is one that gives you a PHP and Perl script as an example that you would use on the local side. These scripts normally work together with a webserver that can execute them.

https://wiki.secondlife.com/wiki/Category:LSL_XML-RPC

Somehow that got stuck under the "Category" title.

If you use MS-IIS or Mono enabled webserver, then you can use visual basic with it.
Lee Ponzu
What Would Steve Do?
Join date: 28 Jun 2006
Posts: 1,770
hack the client
09-15-2007 18:37
you could even merge your VB program with the client.
Atrus Hyun
Registered User
Join date: 21 May 2007
Posts: 7
09-16-2007 09:49
Alright, so I'm basically going to be spending my afternoon reading about XML-RPC and trying to get simple scripts to work with that, and THEN explore the possibility of using HTTP requests to go directly to the VB program that I'm going to need.

My friend found a LSL command to respond to HTTP responses - is it possible to use this as a two way method of communication with the VB program ignoring the XML-RPC route completely? Hm.