Any luck with multiple(viewport) monitors

General discussion for players of Oolite.

Moderators: another_commander, winston

one_armed_man
Poor
Poor
Posts: 5
Joined: Thu Feb 15, 2018 1:15 pm

Any luck with multiple(viewport) monitors

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

Re: Any luck with multiple(viewport) monitors

Post 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.
one_armed_man
Poor
Poor
Posts: 5
Joined: Thu Feb 15, 2018 1:15 pm

Re: Any luck with multiple(viewport) monitors

Post 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.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16055
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Any luck with multiple(viewport) monitors

Post 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.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
one_armed_man
Poor
Poor
Posts: 5
Joined: Thu Feb 15, 2018 1:15 pm

Re: Any luck with multiple(viewport) monitors

Post by one_armed_man »

Thanks! Here's a screenshot of the layout using SDL2:
https://ibb.co/gS3kY7
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6547
Joined: Wed Feb 28, 2007 7:54 am

Re: Any luck with multiple(viewport) monitors

Post 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.
one_armed_man
Poor
Poor
Posts: 5
Joined: Thu Feb 15, 2018 1:15 pm

Re: Any luck with multiple(viewport) monitors

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

Re: Any luck with multiple(viewport) monitors

Post 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.
one_armed_man
Poor
Poor
Posts: 5
Joined: Thu Feb 15, 2018 1:15 pm

Re: Any luck with multiple(viewport) monitors

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

Re: Any luck with multiple(viewport) monitors

Post 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.
User avatar
RockDoctor
---- E L I T E ----
---- E L I T E ----
Posts: 756
Joined: Sat May 01, 2010 9:05 pm
Location: Scotland

Re: Any luck with multiple(viewport) monitors

Post 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.)
--
Shooting aliens for fun and ... well, more fun.
"Speaking as an outsider, what do you think of the human race?" (John Cooper Clark - "I married a Space Alien")
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6547
Joined: Wed Feb 28, 2007 7:54 am

Re: Any luck with multiple(viewport) monitors

Post 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.
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Any luck with multiple(viewport) monitors

Post 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.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
maik
Wiki Wizard
Wiki Wizard
Posts: 2020
Joined: Wed Mar 10, 2010 12:30 pm
Location: Ljubljana, Slovenia (mainly industrial, feudal, TL12)

Re: Any luck with multiple(viewport) monitors

Post 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
User avatar
Cholmondely
Archivist
Archivist
Posts: 4982
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Any luck with multiple(viewport) monitors

Post 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?
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
Post Reply