Dualscreen / External Minimap
Moderator: Moderators
- very_bad_soldier
- Posts: 1397
- Joined: 20 Feb 2007, 01:10
Dualscreen / External Minimap
I am still trying to figure out a good way to implement a minimap on a second screen. Following solutions came to mind:
- Replace SDL with another library (since SDL does not seem to support Dualscreen natively)
- via Widget. aegis was so kind to give me lots of tips how to do this. The problem is the only possible way to communicate with another process seems to be writing/reading to files. And you dont have access to projectile information (maybe other information is missing too)
And my favorite so far:
- Abstract engine's CMiniMap and replace it with an implementation that does not actually draw to the minimap but to send minimap data using tcp or udp to another process (normally on the same machine). That second process would spawn a fullscreen window on the second screen and draws a fullscreen minimap on its own.
So what do you guys think about it? I know its not very nice to have a second process for drawing minimap on second screen but replacing SDL is probably not something I can do without breaking spring.
The widget solution misses some important features and using real files as communication channel is not nice either.
Thats why im in favor with the third option but its not worth the effort when there is no chance to get it actually commited to spring because I wont be able to use it before that happens.
- Replace SDL with another library (since SDL does not seem to support Dualscreen natively)
- via Widget. aegis was so kind to give me lots of tips how to do this. The problem is the only possible way to communicate with another process seems to be writing/reading to files. And you dont have access to projectile information (maybe other information is missing too)
And my favorite so far:
- Abstract engine's CMiniMap and replace it with an implementation that does not actually draw to the minimap but to send minimap data using tcp or udp to another process (normally on the same machine). That second process would spawn a fullscreen window on the second screen and draws a fullscreen minimap on its own.
So what do you guys think about it? I know its not very nice to have a second process for drawing minimap on second screen but replacing SDL is probably not something I can do without breaking spring.
The widget solution misses some important features and using real files as communication channel is not nice either.
Thats why im in favor with the third option but its not worth the effort when there is no chance to get it actually commited to spring because I wont be able to use it before that happens.
Re: Dualscreen / External Minimap
for widget-based implementation, pipes and projectile information could probably easily be made available for a cleaner solution.
-
- Posts: 834
- Joined: 19 May 2009, 21:10
Re: Dualscreen / External Minimap
I like the idea. I can play via desktop and use a laptop to show the minimap. No need for second monitor.very_bad_soldier wrote:And my favorite so far:
- Abstract engine's CMiniMap and replace it with an implementation that does not actually draw to the minimap but to send minimap data using tcp or udp to another process (normally on the same machine). That second process would spawn a fullscreen window on the second screen and draws a fullscreen minimap on its own.
Re: Dualscreen / External Minimap
if it were made available to widgets, it could also be displayed on a second monitor
sockets could be used instead of pipes, perhaps luasockets could be compiled into engine?
this would also allow a pure lua lobby if lua were given control over the menu
sockets could be used instead of pipes, perhaps luasockets could be compiled into engine?
this would also allow a pure lua lobby if lua were given control over the menu
-
- Posts: 933
- Joined: 27 Feb 2006, 02:04
Re: Dualscreen / External Minimap
SDL 1.3 (Aka 2.0) has multiple window support and is going to add an API for multiple monitors. http://wiki.libsdl.org/moin.cgi/Roadmapvery_bad_soldier wrote:- Replace SDL with another library (since SDL does not seem to support Dualscreen natively)
Re: Dualscreen / External Minimap
ohh and you still think you can play DukeNukemForever one day?
Re: Dualscreen / External Minimap
That is an entirely unproductive post, jK, as well as off-topic.
Re: Dualscreen / External Minimap
No, it just reflects the current position.
People accept it: SDL is dead and SDL2.0 will never come!
People accept it: SDL is dead and SDL2.0 will never come!
Re: Dualscreen / External Minimap
Really? I mean, the last release was in November.
- very_bad_soldier
- Posts: 1397
- Joined: 20 Feb 2007, 01:10
Re: Dualscreen / External Minimap
I would still prefer the engine version (while doing it as a widget would be ok also). Mainly because I would not have to bug the devs about implementing luasockets, lua projectile information and maybe more. Doing that myself is probably (for me) as difficult as implementing that external minimap.aegis wrote:if it were made available to widgets, it could also be displayed on a second monitor
sockets could be used instead of pipes, perhaps luasockets could be compiled into engine?
this would also allow a pure lua lobby if lua were given control over the menu
Also as this feature would be quite a universal engine feature I see it more suitable to be inside the engine.
More thoughts are still highly appreciated.
Re: Dualscreen / External Minimap
but including luasockets and projectile information isn't a far stretch, and has other uses as well
-
- Posts: 933
- Joined: 27 Feb 2006, 02:04
Re: Dualscreen / External Minimap
The development has been taking a LOT longer than I thought it would, but they are definitely making progress and the dev mailing list is very active still.jK wrote:No, it just reflects the current position.
People accept it: SDL is dead and SDL2.0 will never come!
Also a lot of people have just gone ahead and adopted 1.3 in their application judging by the mailing list.
I think it might be worth an experimental build of Spring on 1.3, but you're probably right that Spring should keep its options open with SFML which seems to be getting a lot of converts from SDL lately.
Re: Dualscreen / External Minimap
There is also the option to use an OS-specific API to get the screen geometry, and modify the engine to draw it right.
I don't know how multiscreen works on Windows, but on Linux (X11) you see one big area and query for rectangles representing the physical devices. Spring uses this system now but assumes that dualscreen is cut in half horizontally.
If you try to change the vertical offset (viewPosY in the source) there are many problems, I have been unable to fix all of them as some seem to be in LUA.
Changing totally the way the minimap is drawn will give big difficulties when it comes to interaction, I don't know how much data you would have to comunicate but the API won't be trivial.
In my opinion we would have to clean some code in the engine, with all the winsize, viewsize, viewpos, screensize that nobody knows what they should be used for !
I don't know how multiscreen works on Windows, but on Linux (X11) you see one big area and query for rectangles representing the physical devices. Spring uses this system now but assumes that dualscreen is cut in half horizontally.
If you try to change the vertical offset (viewPosY in the source) there are many problems, I have been unable to fix all of them as some seem to be in LUA.
Changing totally the way the minimap is drawn will give big difficulties when it comes to interaction, I don't know how much data you would have to comunicate but the API won't be trivial.
In my opinion we would have to clean some code in the engine, with all the winsize, viewsize, viewpos, screensize that nobody knows what they should be used for !