Linux: Other programs popping a messagebox ruin the game

Linux: Other programs popping a messagebox ruin the game

Discuss everything related to running Spring on your chosen distribution of Linux.

Moderator: Moderators

YokoZar
Posts: 883
Joined: 15 Jul 2007, 22:02

Linux: Other programs popping a messagebox ruin the game

Post by YokoZar »

Spring plays fine normally, then suddenly some other program pops a message (say, Thunderbird telling me it can't connect to an email server, or Springlobby telling me it's crashed)

Then the game goes from full screen to a maximized window, but the FPS drops to about .1. Even when the game automatically returns to full screen about 30 seconds later, I can't control anything and have to kill -9 the game (since performance is so bad I can't even quit normally).

This is on Ubuntu Hardy. I don't think it did this in Gutsy, so it seems like there's some local change we can do to get Spring to recover properly.
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Re: Linux: Other programs popping a messagebox ruin the game

Post by LordMatt »

Run spring in a separate x server. :P
User avatar
Vadi
Posts: 446
Joined: 03 Jan 2008, 14:51

Re: Linux: Other programs popping a messagebox ruin the game

Post by Vadi »

Different games handle this differently... but spring really does do this the worst way :/.

I just try and close all notification-making programs before playing.
bashar
Posts: 152
Joined: 03 Dec 2006, 23:06

Re: Linux: Other programs popping a messagebox ruin the game

Post by bashar »

LordMatt wrote:Run spring in a separate x server. :P
+1
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Linux: Other programs popping a messagebox ruin the game

Post by Tobi »

How can an app even know this? Is it a standard or does it differ per desktop environment?
User avatar
Vadi
Posts: 446
Joined: 03 Jan 2008, 14:51

Re: Linux: Other programs popping a messagebox ruin the game

Post by Vadi »

Some game seem to do this "returning" mode on a timer or something. The Penny Arcade game I just got seems to have this timer fairly frequently, which is good. Worst is ETQW, who's timer takes ages to come about. Spring... ctrl+alt+backspace, unfortunately.
malric
Posts: 521
Joined: 30 Dec 2005, 22:22

Re: Linux: Other programs popping a messagebox ruin the game

Post by malric »

Even if I usually close all programs, when this happened for me I think I did "alt-tab" (without clicking ok on the notification) and the game come back again (without problems). This was some time ago though, maybe I don't remember all the details.
HAARP
Posts: 182
Joined: 06 Apr 2006, 07:18

Re: Linux: Other programs popping a messagebox ruin the game

Post by HAARP »

bashar wrote:
LordMatt wrote:Run spring in a separate x server. :P
+1
-1. I won't run a seperate process for every fullscreen application I use. The proper way is to fix Spring dropping its FPS, or stop Spring from going to non-fullscreen at all. I don't think the latter is possible.

This is a known problem for almost every game that depends on SDL. What pisses me off even more is the fact that even if I want to switch to the background, I can't. SDL-based games hog my keys and don't allow the window manager to receive key events.
The obviously best solution would be to fix SDL in that regard and stop Spring from dropping its FPS.
Another interesting fact for SDL-based games is the corruption of mouse input should the game crash. Luckily for that there's umouse...

And don't you dare to recommend a seperate X server for me. Every solution I've seen so far Is basically some hacky shit that doesn't even properly work half of the time
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Re: Linux: Other programs popping a messagebox ruin the game

Post by LordMatt »

A separate x server isn't hacky, it's an elegant solution to the problem. Since I set up mine, it has worked 100% of the time and allowed me to play spring exactly the way I want to (dual screen with different resolution than my desktop, "alt-tab" capability, etc).
HAARP
Posts: 182
Joined: 06 Apr 2006, 07:18

Re: Linux: Other programs popping a messagebox ruin the game

Post by HAARP »

Still, the only proper solution would be a seperate init script.
User avatar
det
Moderator
Posts: 737
Joined: 26 Nov 2005, 11:22

Re: Linux: Other programs popping a messagebox ruin the game

Post by det »

I think windowed + grab input (so mouse cant leave window) is the best way to run spring.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Linux: Other programs popping a messagebox ruin the game

Post by imbaczek »

windowed + fullscreen emulation or whatever it's called works very well, too.
User avatar
Vadi
Posts: 446
Joined: 03 Jan 2008, 14:51

Re: Linux: Other programs popping a messagebox ruin the game

Post by Vadi »

Savage 2 is probably the most Linux compatible game ever made. In full-screen mode, you can alt+tab out of it just fine. It doesn't stop there - ctrl+alt+arrow keys work, Compiz screen edges work, and it all does it smoothly (whereas alt+tab on windows flickers and such). It's amazing, and would really put linux ahead of windows if all apps did it.

If it helps anyone, Savage 2 creates it's window with "glXCreateWindow". Apparently it's a very very rarely used thing, but is somehow responsible for this excellent integration.
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Re: Linux: Other programs popping a messagebox ruin the game

Post by LordMatt »

HAARP wrote:Still, the only proper solution would be a seperate init script.

Code: Select all

#!/bin/bash
export SDL_MOUSE_RELATIVE=0
cd /home/matt/.spring
xinit /usr/local/games/spring "$*" -- :1 -config xorg-spring-dualscreens.conf > /home/matt/.spring/console.log
It's really that simple.
User avatar
Vadi
Posts: 446
Joined: 03 Jan 2008, 14:51

Re: Linux: Other programs popping a messagebox ruin the game

Post by Vadi »

The proper solution is to make the game handle it, not tinker with external scripts to make the game work properly...

Of course though, for LordMatt, making another X server is a "piece of cake" thing. Obviously it's the same for everyone else in his view :roll:
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Re: Linux: Other programs popping a messagebox ruin the game

Post by LordMatt »

Vadi wrote:The proper solution is to make the game handle it, not tinker with external scripts to make the game work properly...

Of course though, for LordMatt, making another X server is a "piece of cake" thing. Obviously it's the same for everyone else in his view :roll:
Cut and paste?
User avatar
Vadi
Posts: 446
Joined: 03 Jan 2008, 14:51

Re: Linux: Other programs popping a messagebox ruin the game

Post by Vadi »

Of course! Like I said, it's easy :lol: . How can everyone else possibly not get it?

/sarcasm off

Have some appreciation for people, and lose snarky comments. At best, someone who doesn't know what they're doing will screw up, and, they shouldn't even have to use this "solution".
User avatar
LordMatt
Posts: 3393
Joined: 15 May 2005, 04:26

Re: Linux: Other programs popping a messagebox ruin the game

Post by LordMatt »

God forbid Linux users actually have to learn something. I set up a separate x server within a couple of weeks of starting to use Linux (and there was no resource to cut and paste from, I had to ask in #xorg). But if you think spring should change, feel free to submit patch. ;)
HAARP
Posts: 182
Joined: 06 Apr 2006, 07:18

Re: Linux: Other programs popping a messagebox ruin the game

Post by HAARP »

LordMatt wrote:
HAARP wrote:Still, the only proper solution would be a seperate init script.

Code: Select all

#!/bin/bash
export SDL_MOUSE_RELATIVE=0
cd /home/matt/.spring
xinit /usr/local/games/spring "$*" -- :1 -config xorg-spring-dualscreens.conf > /home/matt/.spring/console.log
It's really that simple.
1. It doesn't take your distro's usual way to start the X server into account
2. This script is based on bash. Not every distro uses bash init scripts
3. It's optimized for your user. An init script has to be universal
4. It's starting the game. A proper script will just start an X-server and leave it at that
5. This script needs your password

Of course, it's possible to solve all this. But I don't see why I should invest my time into it when the proper solution is fixing Spring.
User avatar
Vadi
Posts: 446
Joined: 03 Jan 2008, 14:51

Re: Linux: Other programs popping a messagebox ruin the game

Post by Vadi »

LordMatt wrote:God forbid Linux users actually have to learn something. I set up a separate x server within a couple of weeks of starting to use Linux (and there was no resource to cut and paste from, I had to ask in #xorg). But if you think spring should change, feel free to submit patch. ;)
BINGO! That's the attitude! Want to get better drivers? Hardware support? Program support? Keep that attitude up!

*insert cheering smiley here*

/lulz, this is exactly why linux wasn't getting anywhere on the desktop for a long while.
Post Reply

Return to “Linux”