Page 1 of 2

Any luck with multiple(viewport) monitors

Posted: Thu Feb 15, 2018 1:27 pm
by one_armed_man
Have anyone had any luck setting up or modifying Oolite to support a multi-monitor setup. With multi-monitor setup I mean having a single monitor for front view and having an additional one for gauges, levels, radar and/or system data (HUD)?

Is there a way that the Debug Console function could exchange data to facilitate an external HUD?

If not, have anyone looked into using sockets(UDP) as a means to export Ship/system data to an external program or computer so that data can be presented elsewhere?

Re: Any luck with multiple(viewport) monitors

Posted: Thu Feb 15, 2018 1:51 pm
by another_commander
Hi and welcome.
one_armed_man wrote: Thu Feb 15, 2018 1:27 pm
Have anyone had any luck setting up or modifying Oolite to support a multi-monitor setup. With multi-monitor setup I mean having a single monitor for front view and having an additional one for gauges, levels, radar and/or system data (HUD)?
Speaking for Windows and Linux systems, that's a tricky thing to do. The main issue is that the SDL version we use supports only one OpenGL window context, therefore everything that we do has to happen in one window only. We cannot spawn child windows of the game (unless we go into direct OS API calls, not sure, never tried it), which would most likely be a requirement for moving the HUD gauges on a separate screen. And even if we could spawn child windows, we would also need some heavy code modifications to get the gauges to display on that window.
Is there a way that the Debug Console function could exchange data to facilitate an external HUD?

If not, have anyone looked into using sockets(UDP) as a means to export Ship/system data to an external program or computer so that data can be presented elsewhere?
The debug console can certainly receive game packets of varying information. It cannot do much with the received data, though, other than respond back to the game if and when needed. In order to take this data and do something with it, you would need to either talk to the debug console with an external program and listen for incoming packets, or you could write an application that mimics the way the console connects to the game, receive directly the information and do whatever is needed with it.

As far as I am aware, no one has looked into an application like this.

Re: Any luck with multiple(viewport) monitors

Posted: Thu Feb 15, 2018 2:15 pm
by one_armed_man
Hi and thank you!

I am not familiar with OpenGL under SDL, so I will take you word for it that it is difficult, if not impossible to do in an easy manner. I have, however done a similar task using standard SDL2, working on a custom built space simulator for my kid(how do I upload pictures to the forum??).
Exporting the data structures(like using sockets) would allow 3rd party programmers to come up with new ways of using Oolite.
My thought here was modifying or replacing the Debug function in such a way that (using UDP) allowing other application (or computers) to connect to Oolite, subscribe for the data structures, parse them and display them separately from Oolite. I figure that very little would have to be change in the base code(or the Debug OXZ) to allow a 1-way data flow.

Re: Any luck with multiple(viewport) monitors

Posted: Thu Feb 15, 2018 2:18 pm
by Cody
Welcome aboard...
one_armed_man wrote: Thu Feb 15, 2018 2:15 pm
...how do I upload pictures to the forum?
Host the images somewhere (postimage, imgur - there are others) and link to them.

Re: Any luck with multiple(viewport) monitors

Posted: Thu Feb 15, 2018 2:33 pm
by one_armed_man
Thanks! Here's a screenshot of the layout using SDL2:
https://ibb.co/gS3kY7

Re: Any luck with multiple(viewport) monitors

Posted: Thu Feb 15, 2018 3:16 pm
by another_commander
Looks good. I know that SDL2 does allow child windows and if we used SDL2 it would have been a pretty straightforward task to implement. However, we are still on SDL 1.2.13 (.14 for Linux) at the moment so we don't have this flexibility. There is a WIP pull request on github for transition to SDL2, but it is not mature for merging in yet and it might take a while to get to completion.

Re: Any luck with multiple(viewport) monitors

Posted: Thu Feb 15, 2018 3:34 pm
by one_armed_man
another_commander wrote: Thu Feb 15, 2018 3:16 pm
Looks good. I know that SDL2 does allow child windows and if we used SDL2 it would have been a pretty straightforward task to implement. However, we are still on SDL 1.2.13 (.14 for Linux) at the moment so we don't have this flexibility. There is a WIP pull request on github for transition to SDL2, but it is not mature for merging in yet and it might take a while to get to completion.
I can imagine! I started out with SDL1 and hit so many roadblocks! As soon as I could, I upgraded my existing code to SDL2, which works much better.
After a while I realized how much work is involved in coding a 3D space environment, and I stopped my project and changed the hardware to match an (easier) option with Oolite.
If you are interested here's some pictures of it:
https://ibb.co/bPhb6S
https://ibb.co/bN4OmS
https://ibb.co/cTVURS
https://ibb.co/bR0URS
https://ibb.co/dkU0Y7
https://ibb.co/nkq7D7
https://ibb.co/nefk0n

However, my initial question still involves the ability of exporting data/game structures using a UDP socket, like adding a UDP server to the Oolite code and allow clients to connect and subscribe for some or all structures. Anyone working on something like this or are there any plans concerning this? (Or did someone already do this?)

Re: Any luck with multiple(viewport) monitors

Posted: Thu Feb 15, 2018 4:05 pm
by another_commander
one_armed_man wrote: Thu Feb 15, 2018 3:34 pm
However, my initial question still involves the ability of exporting data/game structures using a UDP socket, like adding a UDP server to the Oolite code and allow clients to connect and subscribe for some or all structures. Anyone working on something like this or are there any plans concerning this? (Or did someone already do this?)
To the best of my knowledge, nobody has worked or is currently working on this.

Re: Any luck with multiple(viewport) monitors

Posted: Thu Feb 15, 2018 4:16 pm
by one_armed_man
another_commander wrote: Thu Feb 15, 2018 4:05 pm
one_armed_man wrote: Thu Feb 15, 2018 3:34 pm
However, my initial question still involves the ability of exporting data/game structures using a UDP socket, like adding a UDP server to the Oolite code and allow clients to connect and subscribe for some or all structures. Anyone working on something like this or are there any plans concerning this? (Or did someone already do this?)
To the best of my knowledge, nobody has worked or is currently working on this.
Are there any documentation available describing the data structure in detail?

Re: Any luck with multiple(viewport) monitors

Posted: Thu Feb 15, 2018 5:51 pm
by another_commander
Yes there is and is actually quite good. Just run doxygen in the root folder of Oolite's source code checkout and look for index.html inside the generated doxygen folder. Be warned though, the full documentation weighs about 650 MB.

Re: Any luck with multiple(viewport) monitors

Posted: Thu Feb 15, 2018 9:42 pm
by RockDoctor
another_commander wrote: Thu Feb 15, 2018 5:51 pm
Be warned though, the full documentation weighs about 650 MB.
S(everal s)omeone(s) have been very busy boys. Or does that include a lot of image data? (I'm on a metered connection, so I'm not even going to think about looking.)

Re: Any luck with multiple(viewport) monitors

Posted: Thu Feb 15, 2018 9:46 pm
by another_commander
RockDoctor wrote: Thu Feb 15, 2018 9:42 pm
S(everal s)omeone(s) have been very busy boys. Or does that include a lot of image data? (I'm on a metered connection, so I'm not even going to think about looking.)
It does include a LOT of graphs, but being on a metered connection does not matter in this case. The entire 650MB of documentation gets generated locally on your computer once you run Doxygen.

Re: Any luck with multiple(viewport) monitors

Posted: Tue Feb 20, 2018 1:00 pm
by Diziet Sma

Hoo-boy... when your little one gets old enough for Kerbal Space Program, you are gonna be one busy guy!

Kudos.. that's quite a job you've done there.

Re: Any luck with multiple(viewport) monitors

Posted: Mon Feb 08, 2021 12:41 pm
by maik
one_armed_man wrote: Thu Feb 15, 2018 1:27 pm
Have anyone had any luck setting up or modifying Oolite to support a multi-monitor setup. With multi-monitor setup I mean having a single monitor for front view and having an additional one for gauges, levels, radar and/or system data (HUD)?

Is there a way that the Debug Console function could exchange data to facilitate an external HUD?

If not, have anyone looked into using sockets(UDP) as a means to export Ship/system data to an external program or computer so that data can be presented elsewhere?
another_commander wrote: Thu Feb 15, 2018 1:51 pm
The debug console can certainly receive game packets of varying information. It cannot do much with the received data, though, other than respond back to the game if and when needed. In order to take this data and do something with it, you would need to either talk to the debug console with an external program and listen for incoming packets, or you could write an application that mimics the way the console connects to the game, receive directly the information and do whatever is needed with it.

As far as I am aware, no one has looked into an application like this.
Sneak video peek of what I am working on at the moment :D

Re: Any luck with multiple(viewport) monitors

Posted: Mon Feb 08, 2021 12:52 pm
by Cholmondely
maik wrote: Mon Feb 08, 2021 12:41 pm
one_armed_man wrote: Thu Feb 15, 2018 1:27 pm
Have anyone had any luck setting up or modifying Oolite to support a multi-monitor setup. With multi-monitor setup I mean having a single monitor for front view and having an additional one for gauges, levels, radar and/or system data (HUD)?

Is there a way that the Debug Console function could exchange data to facilitate an external HUD?

If not, have anyone looked into using sockets(UDP) as a means to export Ship/system data to an external program or computer so that data can be presented elsewhere?
another_commander wrote: Thu Feb 15, 2018 1:51 pm
The debug console can certainly receive game packets of varying information. It cannot do much with the received data, though, other than respond back to the game if and when needed. In order to take this data and do something with it, you would need to either talk to the debug console with an external program and listen for incoming packets, or you could write an application that mimics the way the console connects to the game, receive directly the information and do whatever is needed with it.

As far as I am aware, no one has looked into an application like this.
Sneak video peek of what I am working on at the moment :D
Goodness!

Macs & iphones/ipads only?