Passing Information Through LAN

General discussion for players of Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
Randy
Competent
Competent
Posts: 34
Joined: Fri Mar 27, 2009 5:00 pm
Location: Wherever I am, I'm there.
Contact:

Passing Information Through LAN

Post 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
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6659
Joined: Wed Feb 28, 2007 7:54 am

Post 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.
User avatar
Randy
Competent
Competent
Posts: 34
Joined: Fri Mar 27, 2009 5:00 pm
Location: Wherever I am, I'm there.
Contact:

Wow, that was fast!

Post 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
Maybe it's just a bunch of stuff that happens. -- Homer Simpson
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

Hi Randy,

welcome to the forums. Another Programmer - cool! My talents in this area are decidely 3rd class!
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
overmage
Deadly
Deadly
Posts: 128
Joined: Mon Mar 23, 2009 6:55 pm

Post by overmage »

can this ever be extended to passing information on the ship's positional co-ordinates directly through LAN? Just wondering.
User avatar
Randy
Competent
Competent
Posts: 34
Joined: Fri Mar 27, 2009 5:00 pm
Location: Wherever I am, I'm there.
Contact:

If I read it right...

Post 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
Maybe it's just a bunch of stuff that happens. -- Homer Simpson
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post 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!
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
overmage
Deadly
Deadly
Posts: 128
Joined: Mon Mar 23, 2009 6:55 pm

Post 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 :(
User avatar
_ds_
Deadly
Deadly
Posts: 180
Joined: Thu Jan 22, 2009 5:34 pm
Location: In a cloaked ship behind you

Re: If I read it right...

Post 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
http://tartarus.org/~ds/oolite/patches, Buzzer OXP etc.
User avatar
harry747
Deadly
Deadly
Posts: 135
Joined: Mon Feb 23, 2009 8:57 pm
Location: England

Re: If I read it right...

Post 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.
MacBook pro, OSX 10.8.5, Xcode 5
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6659
Joined: Wed Feb 28, 2007 7:54 am

Post 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.
overmage
Deadly
Deadly
Posts: 128
Joined: Mon Mar 23, 2009 6:55 pm

Post by overmage »

ah ok thanks! :D
User avatar
Randy
Competent
Competent
Posts: 34
Joined: Fri Mar 27, 2009 5:00 pm
Location: Wherever I am, I'm there.
Contact:

Not Looking for Mulitplayer Exactly

Post 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
Maybe it's just a bunch of stuff that happens. -- Homer Simpson
Post Reply