How I achieved fullscreen windowed mode with spring

How I achieved fullscreen windowed mode with spring

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

Moderator: Moderators

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14603
Joined: 17 Nov 2005, 02:43

How I achieved fullscreen windowed mode with spring

Post by Forboding Angel » 05 Jul 2011, 09:28

As most of you know, fullscreen windowed mode is pretty much the best thing since sliced bread when it comes to games. Until the engine devs see fit to add that mode into spring, here is how you can do it in the meantime.

The first part is the suckiest. You need "Actual Window Manager" which costs 50 bucks (or you can "acquire" it via other means).

After that, simply add a special rule for spring.exe . Set position to snap to top left, and disable all title window and border stuffs.

If horizontal scrolling doesn't work ingame, in the chat type: /grabinput 1
and press enter.

Devs, could we please get built in fullscreen window support semi soon?
0 x

User avatar
Beherith
Moderator
Posts: 4934
Joined: 26 Oct 2007, 16:21

Re: How I achieved fullscreen windowed mode with spring

Post by Beherith » 05 Jul 2011, 09:36

What is the difference between windowed fullscreen and non windowed?
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14603
Joined: 17 Nov 2005, 02:43

Re: How I achieved fullscreen windowed mode with spring

Post by Forboding Angel » 05 Jul 2011, 09:56

Can someone else explain this? I do not know the correct words to use.

Ever had your computer taken over by a game that decided to be a cockmonkey, or just a game that has really long loading times? You sit there, thumbs up your ass, because if you alt tab out of it, the game will probably crash (like spring), you can't see if anything else is going on in the lobby while you're loading, you can't quickly check something on the net, or pass the time by alt tabbing over to your web browser... etc etc etc.

A misbehaving window is treated the same as if notepad locked up (course you're still using xp which means that if notepad locks up your entire computer still goes retarded, but whatever), which on vista or win7 is as simple as lolclose.

There are a host of reasons why windowed fullscreen is the absolute shit, but hopefully someone else can put it more eloquently than I.

Umm, it's better by over 9000. The vast majority of the devs are on linux, which has a window manager like this built in already, so they can do this without even thinking about it. Which is one of the main reasons no one has done it yet (because it's not an issue for them, so who cares amirite?).

Fullscreen windowed mode is still semi rare for windows games. I was quite surprised and pleased when I found that sc2 had it.
0 x

User avatar
hoijui
Former Engine Dev
Posts: 4342
Joined: 22 Sep 2007, 09:51

Re: How I achieved fullscreen windowed mode with spring

Post by hoijui » 05 Jul 2011, 10:05

simplified, it is about like this:
when starting an application in real full-screen mode, the OS gives all control of rendering to that application. this means, the OS can free resources -> possible performance gain.
The downside is, that when switching between the full-screen app and the OS, there is always re-initializing and re-shutting down of the OSs rendering stuff. That means prolonged waiting time, and makes graphical glitches much more likely; those of the sort that likely every gamer of pretty much any game since the beginning of 3D acceleration knows.

i am sure jk could give a much more precise explanation though.
0 x

trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Re: How I achieved fullscreen windowed mode with spring

Post by trepan » 05 Jul 2011, 10:36

What would be required to get windowed-fullscreen working in windows?
Is it just a matter of issuing a command to resize the window so that it
covers the entire screen?

http://stackoverflow.com/questions/6927 ... indows-api
Last edited by trepan on 05 Jul 2011, 11:09, edited 1 time in total.
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14603
Joined: 17 Nov 2005, 02:43

Re: How I achieved fullscreen windowed mode with spring

Post by Forboding Angel » 05 Jul 2011, 11:01

Unless I'm mistaken, it's more or less a matter of issuing some parameters to the windows window manager. Apparently, according to what I read, in windows it is not required that an application give commands to the window manager, only optional.

Unfortunately, that's about all I've been able to glean, but I have no way to verify that what I just wrote is gospel truth.
0 x

User avatar
Licho
Zero-K Developer
Posts: 3803
Joined: 19 May 2006, 19:13

Re: How I achieved fullscreen windowed mode with spring

Post by Licho » 05 Jul 2011, 11:09

Trepan - yes ..
You can setup window to be borderless and you can set it to be sized as desktop.
It is just few lines for external app or spring itself to do it.
0 x

trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Re: How I achieved fullscreen windowed mode with spring

Post by trepan » 05 Jul 2011, 11:12

Ya, I started poking around and found the link that I edited
into my last post. I've always hated "fullscreen" apps that
take control of everything (luckily, being a linux user, it's
rarely an issue).

A snippet of SpringRTS code (rts/System/SpringApp.cpp):

Code: Select all

sdlflags |= globalRendering->fullScreen ? SDL_FULLSCREEN | SDL_NOFRAME : 0;
It would probably be easy to do if you added a command line switch.
0 x

User avatar
smoth
Posts: 22298
Joined: 13 Jan 2005, 00:46

Re: How I achieved fullscreen windowed mode with spring

Post by smoth » 05 Jul 2011, 17:32

trepan wrote:What would be required to get windowed-fullscreen working in windows?
Is it just a matter of issuing a command to resize the window so that it
covers the entire screen?

http://stackoverflow.com/questions/6927 ... indows-api
You start spring in windowed and press maximized. Boom! Done I have no idea why forb needs software for that
0 x

User avatar
AF
AI Developer
Posts: 20669
Joined: 14 Sep 2004, 11:32

Re: How I achieved fullscreen windowed mode with spring

Post by AF » 05 Jul 2011, 18:24

because then you have the top window title and the start bar, the edges of the window arent the edges of the screen
0 x

User avatar
smoth
Posts: 22298
Joined: 13 Jan 2005, 00:46

Re: How I achieved fullscreen windowed mode with spring

Post by smoth » 05 Jul 2011, 18:28

Ah, not my cup of tea but hey more power to ya. Ever since the current release windowed spring has some lovely audio issues and fps issues
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14603
Joined: 17 Nov 2005, 02:43

Re: How I achieved fullscreen windowed mode with spring

Post by Forboding Angel » 05 Jul 2011, 22:21

Windowed fullscreen via what I described above works flawlessly. What pisses spring off is when you try to dynamically resize the window when you're just using plain old windowed mode. A bug for sure, but if fullscreen windowed is natively supported I doubt you'll see much of people running windowed other than fullscreen.
0 x

Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: How I achieved fullscreen windowed mode with spring

Post by Satirik » 05 Jul 2011, 22:36

Forboding Angel wrote:As most of you know, fullscreen windowed mode is pretty much the best thing since sliced bread when it comes to games.
sliced bread is the worst kind of bread ever :roll:
0 x

User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: How I achieved fullscreen windowed mode with spring

Post by Pxtl » 05 Jul 2011, 22:43

Yeah, if you have the resources to spare (since it ain't free) windowed fullscreen is the way to go. Pretty much mandatory for any game with long load-screens or crash-on-alt-tab problems (Valve, I'm looking in your direction).
0 x

User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10238
Joined: 24 Jan 2006, 21:12

Re: How I achieved fullscreen windowed mode with spring

Post by PicassoCT » 05 Jul 2011, 22:44

you can play the tanks in small window without evar leaving the lobby
0 x

User avatar
smoth
Posts: 22298
Joined: 13 Jan 2005, 00:46

Re: How I achieved fullscreen windowed mode with spring

Post by smoth » 05 Jul 2011, 22:58

Forboding Angel wrote:Windowed fullscreen via what I described above works flawlessly. What pisses spring off is when you try to dynamically resize the window when you're just using plain old windowed mode. A bug for sure, but if fullscreen windowed is natively supported I doubt you'll see much of people running windowed other than fullscreen.
Yeah more power to ya I am happy with the regular window mode fullscreen windows don't have a start menu no good to me
But thisn't about personal opinion options are always good provided the devs have time for it
0 x

User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: How I achieved fullscreen windowed mode with spring

Post by knorke » 05 Jul 2011, 23:03

I play in windowed mode with the Spring window sized so that it covers all of the screen except for taskbar at bottom and window title thing at top.
Basically works except for scrolling by screen edges not working. (which i dont care about that much )
For spring alt tabbing is more useless then for other games because at least in my games there is always some noob doing things that require switching to lobby. That works more reliable in windowed mode, in fullscreen mode Spring sometimes locks up for some seconds/minutes on alt tab or desktop resolution gets messed or whatever.

So if you make a "real windowed fullscreen", please allow those options:
fullscreen - well, fullscreen
windowed - the way it is now, with title bar
new frameless windowed fullscreen - looks like fullscreen but is technically windowed just without titlebar etc

That way you can still resize Spring to some smaller window when testing mod stuff.
0 x

abma
Spring Developer
Posts: 3556
Joined: 01 Jun 2009, 00:08

Re: How I achieved fullscreen windowed mode with spring

Post by abma » 06 Jul 2011, 01:20

current master can do it:

https://github.com/spring/spring/commit ... eb4e2bc075

just set WindowBorderless=1 in springsettings.cfg

(thanks madrman)
0 x

User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6109
Joined: 29 Apr 2005, 01:14

Re: How I achieved fullscreen windowed mode with spring

Post by FLOZi » 06 Jul 2011, 01:30

I get a nice borderless window... but it's in the wrong place and I can't move it.
0 x

abma
Spring Developer
Posts: 3556
Joined: 01 Jun 2009, 00:08

Re: How I achieved fullscreen windowed mode with spring

Post by abma » 06 Jul 2011, 01:32

you've to edit springsettings.cfg and set
WindowPosX
WindowPosY
+ WindowState=0 (?)

currently there is no possibility to move the window, if your window-manager cant do it.

in linux you can hold alt + left mouse + move it arround...
0 x

Post Reply

Return to “Engine”

cron