Dualscreen / External Minimap

Dualscreen / External Minimap

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
very_bad_soldier
Posts: 1397
Joined: 20 Feb 2007, 01:10

Dualscreen / External Minimap

Post by very_bad_soldier »

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.
User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: Dualscreen / External Minimap

Post by aegis »

for widget-based implementation, pipes and projectile information could probably easily be made available for a cleaner solution.
SirMaverick
Posts: 834
Joined: 19 May 2009, 21:10

Re: Dualscreen / External Minimap

Post by SirMaverick »

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.
I like the idea. I can play via desktop and use a laptop to show the minimap. No need for second monitor.
User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: Dualscreen / External Minimap

Post by aegis »

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
el_matarife
Posts: 933
Joined: 27 Feb 2006, 02:04

Re: Dualscreen / External Minimap

Post by el_matarife »

very_bad_soldier wrote:- Replace SDL with another library (since SDL does not seem to support Dualscreen natively)
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/Roadmap
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Dualscreen / External Minimap

Post by jK »

ohh and you still think you can play DukeNukemForever one day?
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Re: Dualscreen / External Minimap

Post by Neddie »

That is an entirely unproductive post, jK, as well as off-topic.
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Dualscreen / External Minimap

Post by jK »

No, it just reflects the current position.

People accept it: SDL is dead and SDL2.0 will never come!
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Dualscreen / External Minimap

Post by Argh »

Really? I mean, the last release was in November.
User avatar
very_bad_soldier
Posts: 1397
Joined: 20 Feb 2007, 01:10

Re: Dualscreen / External Minimap

Post by very_bad_soldier »

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
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.
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.
User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: Dualscreen / External Minimap

Post by aegis »

but including luasockets and projectile information isn't a far stretch, and has other uses as well
el_matarife
Posts: 933
Joined: 27 Feb 2006, 02:04

Re: Dualscreen / External Minimap

Post by el_matarife »

jK wrote:No, it just reflects the current position.

People accept it: SDL is dead and SDL2.0 will never come!
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.

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.
Xytovl
Posts: 4
Joined: 09 Sep 2009, 14:25

Re: Dualscreen / External Minimap

Post by Xytovl »

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 !
Post Reply

Return to “Engine”