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.
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.
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
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.
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.
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 !
Users browsing this forum: Google [Bot] and 2 guests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum