Page 1 of 1

Passing Information Through LAN

Posted: Sat Mar 28, 2009 12:11 pm
by Randy
Hi all.

First off, I'm a new member although I've been reading the bulletin board for at least two weeks and quite frankly, I'm in awe at the work that's been done.

I have a question (naturally): Would it be possible to pass information through the LAN? For instance: After a hyperspace jump to Zaonce another computer could (because it is procedurally done) tell what system we are in with a simple byte on some central data file on the server and use that to show all the information.

I know it's a tall order :shock: and I know that it can be done through the core system. However, I'm not wanting to ask the creators of this beautifully done program to change how and what they do. I was thinking that maybe it can be done through Javascript but I'm only researching it now.

Lastly, my profession and hobby is computer programming and I've been doing it since the video game Pong came out. I also like to create and modify games, textures, sounds, and so-forth. I might be able to help out in the future with perhaps a few textures, some sounds, and an OXP or two.

Thanks again, Oolite is a wonderful game. I'll be playing it some tonight finally now that I have some "me" time! :)

May your cargo be full and your trumbles be few.

Randy

Posted: Sat Mar 28, 2009 12:28 pm
by another_commander
Welcome to the forums Randy and thanks for the kind words.

To comment on your question, it seems to me that what you are requesting is already feasible as long as your LAN is using TCP/IP addresses for its node systems. That is basically what the debug console does. We know and have tested that two computers, one running the game with the Debug OXP and one running the console, can communicate over the Internet the way you describe and I don't see why the same principle should not work on a LAN. It should be a simple matter of configuring the debug console to listen for connections to, say, 192.168.xxx.xxx instead of 127.0.0.1.

You can search for more information on the Debug Console and the Debug OXP on wiki.alioth.net. Apologies for not being able to provide a link, almost half of the Internet is blocked by Web(non)sense where I work.

Wow, that was fast!

Posted: Sat Mar 28, 2009 12:44 pm
by Randy
Thanks A.C. I'll check that out. Communicating between the computers like that will be even better.

I'll look into it in a little bit. I am really in awe at the talent on this board. It's truly a remarkable feat.

Okay, I'll stop gushing now. My brother is coming over in a little bit and after he leaves I'll get the opportunity to look at the OXP you suggested. And if I get something working, I'll be happy to post it. Maybe others would like to use it as well.

Signing off,

Randy

Posted: Sat Mar 28, 2009 4:45 pm
by DaddyHoggy
Hi Randy,

welcome to the forums. Another Programmer - cool! My talents in this area are decidely 3rd class!

Posted: Sat Mar 28, 2009 7:41 pm
by overmage
can this ever be extended to passing information on the ship's positional co-ordinates directly through LAN? Just wondering.

If I read it right...

Posted: Sat Mar 28, 2009 8:52 pm
by Randy
Hi Overmage, if I read it right I think that's what A.C.'s saying. I'm about to download the OXP now to see what it contains and if so, that will be helpful to me as well.

DaddyHoggy, we programmers are a dime a dozen. I wouldn't know what a third rate programmer is but I've had the grumble, grumble privilege of working with a last rate one not too long ago. I think we paid him a dime and got what we paid for.

Randy

Posted: Sat Mar 28, 2009 10:37 pm
by Kaks
You can get all sorts of information: the protocol passes strings back and forth, the strings get parsed as javascript at the Oolite end, and the result is sent back to the console end. As networking goes it's pretty inefficient, but on a lan it shouldn't matter too much!

Posted: Sun Mar 29, 2009 3:49 am
by overmage
to randy: oh whoops, well I thought A_C was referring to the position of the ship in terms of 'which system', while i was asking about where the ship was within a system, e.g. 10 km from the Dodec :P But thanks anyway!

to kaks: does that mean it would, in theory, be possible (in some far-flung off future, if not via OXP then via code tweaks, etc) to code for such a scenario: one system, two ships, two computers via a LAN network? (think little fighter) Hmm, technically I'm a programmer too, but I haven't actually touched C++ for... a few years. :D excuse my insufferable questioning :(

Re: If I read it right...

Posted: Sun Mar 29, 2009 4:01 am
by _ds_
Randy wrote:
DaddyHoggy, we programmers are a dime a dozen. I wouldn't know what a third rate programmer is but I've had the grumble, grumble privilege of working with a last rate one not too long ago. I think we paid him a dime and got what we paid for.
Payment in confectionery? Well, it's certainly different

Re: If I read it right...

Posted: Sun Mar 29, 2009 4:05 am
by harry747
Randy wrote:
I think we paid him a dime and got what we paid for.
well, you know what they say: if you pay peanuts, you get monkeys.

Posted: Sun Mar 29, 2009 12:20 pm
by another_commander
@overmage: Everything that is visible to JavaScript can be handled through the debug console. So the answer to your question is yes, the information that can travel through network can contain also the position of the ship and also anything else you might want: Ship's target, speed, AI state etc.

As for the possibility of setting up a netgame based on this, well, not at the current state. All this we are discussing here is about one computer running Oolite and one running the cosole control. The console code could be modified to do something with the data that comes back and forth, but this would not be the same as a multiplayer setup. I guess if it were that simple, it would have been done already. I can see the console doing some basic processing of the data it gets, but that's about it. Anything more would be a lot of work and possibly would involve redesign of the core. That's my point of view anyway.

Posted: Sun Mar 29, 2009 1:23 pm
by overmage
ah ok thanks! :D

Not Looking for Mulitplayer Exactly

Posted: Sun Mar 29, 2009 1:42 pm
by Randy
Hi A.C.,

I'm not looking to do multiplayer per se. The idea is one ship, multiple monitors or other devices. If I can get one computer to send and receive information, that computer could be programmed to send to others. This way the core isn't touched. At least that's my hypothesis anyway.

Oh _DS_, you might have something there. It wouldn't be Dunkin Donuts exactly but a dime a dozen confectionery computer programmers might sell. They can't program but they are good with morning coffee. A little glaze and an oven... who knows? :lol:

Randy