Trine2 for Linux - window mode

For discussion about Trine 2, released in December 2011 on Windows, Mac, Xbox, PlayStation Network and later on Linux and Wii U.
jose1711
Posts: 20
Joined: Wed Apr 20, 2011 11:15 pm

Trine2 for Linux - window mode

Postby jose1711 » Mon Apr 02, 2012 10:41 am

i purchased t2 for linux yesterday. it is a bit choppy in fullscreen and on lowest detail settings on my nvidia 9500gt (binary driver) so i tried window-mode. unfortunately in window mode i do not see the scene (only character icons in upper left corner and selected weapon in lower right). anyone has an idea what is going on? thank you, jose

User avatar
fb_jpk
Posts: 140
Joined: Thu Jun 16, 2005 8:05 pm

Re: Trine2 for Linux - window mode

Postby fb_jpk » Mon Apr 02, 2012 3:33 pm

I'm sorry to hear that you're having problems running the game... I'm not sure what could be causing the game to work in fullscreen, but not in windowed mode (the more common issue is not getting the fullscreen to work while the windowed mode works fine), however, I could make a few random suggestions to see if any of them might be of help:

- If you have windows effects enabled for your desktop/window manager, try disabling them.

- Try to select different resolutions for the windowed mode game. For example, a window resolution that is too large compared to your desktop resolution might perhaps cause it to fail. Also, certain too low resolutions are not currently supported (and those should not be even listed in the launcher, but can be modifed the options file manually). Try to set at least the 800x600 resolution or a higher one.

- The quality settings and even more importantly the anti aliasing settings might perhaps have some effect.. Trying different ones might solve the issue.

- Check that you do not have any anti-aliasing, etc. settings forced on from your display driver settings. Also, check that the your selected desktop display color depth is 24 (or 32 bits, rather than 16 bits).

The fact that the game still manages to render the character icons and such, would indicate that its only the 3D scene rendering that fails, but the 2D GUI gets rendered correctly. The most probable reasons for that would seem to be that the game somehow fails to create the some appropriate rendertargets (that's why the selected screen size primarily comes into mind).

Any additional info about your linux distribution or the hardware its running on might help us pinpoint and solve the problem.

jose1711
Posts: 20
Joined: Wed Apr 20, 2011 11:15 pm

Re: Trine2 for Linux - window mode

Postby jose1711 » Wed Apr 04, 2012 9:56 am

thank you (joel?), using 800x600 works fine at 30fps on lowest details. sometimes fullscreen switches to borderless window mode (could be gnome-shell dependent) but as long as the game does not crash, it is okay. one other thing i noticed is that after quitting trine2 my monitor refresh rate changes from 75 to 60 Hz. this however can be easily fixed by running nvidia-settings.

crobe
Posts: 4
Joined: Wed Apr 11, 2012 1:10 pm

Re: Trine2 for Linux - window mode

Postby crobe » Wed Apr 11, 2012 1:14 pm

Any plans to support 640x480 resoluation? I also just get a black screen when I try to start the game in this resolution. And yeah, NVIDIA 8400M GS is not the latest high end card ;) The launcher offers this resolution, which is a flaw I guess.

User avatar
fb_jpk
Posts: 140
Joined: Thu Jun 16, 2005 8:05 pm

Re: Trine2 for Linux - window mode

Postby fb_jpk » Wed Apr 11, 2012 2:46 pm

crobe wrote:Any plans to support 640x480 resoluation? I also just get a black screen when I try to start the game in this resolution. And yeah, NVIDIA 8400M GS is not the latest high end card ;) The launcher offers this resolution, which is a flaw I guess.


I'll have to re-check that.. If the launcher offers the 640x480 resolution, it should also be supported... But there might have happened some little "oopsie" with it, and 640x480 was not really supposed to be there. (Currently, at least on specific nvidia cards, there is a minimum resolution that is supported in the Trine 2 Linux build. The resolution was either 640x480 or 800x600 - I don't quite recall which one it was right now.)

I assume the game still works on 800x600 though? (If so, we're probably dealing with the minimum resolution limit.)

If that is the case, then I think we'll be able to fix it. Its caused by some of the larger shadow buffers failing on lower resolutions - and it should be fixable by adding a failsafe in the next patch that allows smaller resolutions by adjusting the shadow resolutions smaller in that case (it might cause some small flickering pixels to the shadows and some general decrease in shadow quality, but those probably won't be very noticeable on 640x480 resolution anyway. ;)

crobe
Posts: 4
Joined: Wed Apr 11, 2012 1:10 pm

Re: Trine2 for Linux - window mode

Postby crobe » Wed Apr 11, 2012 2:52 pm

Thanks for the fast reply.

Yeah, 800x600 runs playable but not smooth for me, that's why I asked.

User avatar
fb_jpk
Posts: 140
Joined: Thu Jun 16, 2005 8:05 pm

Re: Trine2 for Linux - window mode

Postby fb_jpk » Wed Apr 11, 2012 3:19 pm

I just checked the launcher... And it does have the 640x480 intentionally enabled and the game is actually supposed to work on that resolution.

I'll have to test it out on some linux distributions on 640x480, but at least it has been working with that resolution before (The minimum got lowered at some point from 800x600 -> 640x480). So this sounds like its possibly some other issue after all.

Assuming that you have a desktop resolution of 800x600 or greater... Have you tried running the game in a 640x480 window rather than in fullscreen? (This might give us some hint about what the actual problem might be).

Alternatively, you can actually run the game in a larger resolution, say 800x600 or 1024x768, but make the game internally render the 3D scene in a lower resolution (and then just get that stretched on the screen). This usually gives almost the same performance boost as simply lowering the resolution, but keeping the GUI and texts sharp, and thus more readable.

If you either set the quality setting to the low or very low setting in the launcher, the game will drop the internal rendering resolution a little bit. Or if you don't want to drop the overall quality, but just need the lower resolution, you can edit the ~/.frozenbyte/Trine2/options.txt manually.

Change the line:

Code: Select all

setOption(renderingModule, "ResolutionReduction", 0)


To some value between 1 and 3. This will cause the 3D rendering resolution to be made smaller. A value of 3 is the maximum and apparently will halve the resolution, so selecting 1024x768 resolution with the reduction value of 3 will actually render the 3D scene at 512x384 resolution and stretch that on the screen.

crobe
Posts: 4
Joined: Wed Apr 11, 2012 1:10 pm

Re: Trine2 for Linux - window mode

Postby crobe » Wed Apr 11, 2012 3:56 pm

Hi,

I tried to run the game now in windowed mode ( didn't find the option at first, so I changed the config and found the option afterwards in the GUI :) ), but changing ResolutionReduction did not change the framerate, it stays at 15 fps like in screenshot 2.

Screenshot 1 shows the "game" when starting with 640x480, everything is there except for the graphics :) I tried this with ResolutionReduction set to 0 and waited long enough for the background to appear. Umm, I cannot append images here?

http://imageshack.us/photo/my-images/29/trine2bug.jpg/
http://imageshack.us/photo/my-images/60 ... 2bug2.jpg/

User avatar
fb_jpk
Posts: 140
Joined: Thu Jun 16, 2005 8:05 pm

Re: Trine2 for Linux - window mode

Postby fb_jpk » Wed Apr 11, 2012 4:22 pm

Ok,

I just tested the resolution reduction option, and it seems to have no effect on Linux... So, that didn't quite go as planned. :(
It is supposed to be enabled for Linux as well, but clearly there is some screwup somewhere in the code.

Also, I tested the 640x480 resolution, and yes... it seems to be broken on at least specific nvidia cards.

(Incidentally when the super-sampling anti-aliasing is on, it works, but thats basically because then it will at least double the rendering target sizes, causing a huge performance hit, same as if you would be running at a higher resolution, a bigger one than just running at the 800x600 resolution with no super-sampling. So the anti-aliasing is of no use when performance is the issue.)

We'll be looking more into these issues.

User avatar
fb_jpk
Posts: 140
Joined: Thu Jun 16, 2005 8:05 pm

Re: Trine2 for Linux - window mode

Postby fb_jpk » Thu Apr 12, 2012 3:00 pm

Hi again,

I've just been testing this issue and it seems that though the 640x480 resolution (without anti-aliasing) occasionally seems to work for nvidia cards (I haven't been able to determine what the exact logic is), most of the time it will fail with a fully black screen. (And the reason for this is that the creation of the 512x512 shadow buffers that the game attempts to create, will fail - because it is larger than the screen).

We can fix this for the next patch, by scaling down the shadow buffers appropriately to a smaller resolution, but for the time being... If the 800x600 resolution gets too heavy performance wise, and the 640x480 just gives a black screen, there are some intermediate resolutions between those that can be used.

Most of these resolutions are not listed by the launcher, so one has to hand-edit the
~/.frozenbyte/Trine2/options.txt file and modify the ScreenWidth and ScreenHeight settings there appropriately.

Assuming that your graphics card / driver supports these, at least some of the resolutions that work on the nvidia card I tested to work were:

- 640x512 - this has no significant performance difference to 640x480, but it will work as the height is at least 512. This will cause the 2D GUI to look somewhat stretched, but the 3D scene will be okay when running in windowed mode. The 3D scene may look stretched though, if the game is run in fullscreen mode and the display scales this improperly to some 4:3 display

- 720x525 or 720x576 (something in between 640x480 and 800x600, with close to 4:3 aspect or 5:4 aspect)

Additionally, there are several other supported resolutions between 640x480 - 800x600. Any resolution with a width and height of at least 512 should work. (You can use your Nvidia X Server Settings application to see which resolution you graphics card / display supports.)

When running in windowed mode, pretty much any of the resolution choices are ok, such as the 640x512, but while in fullscreen you may have to be more selective to get a proper aspect ratio for your display (unless your display is capable of showing the content letterboxed.).

Sorry about all of this hassle :oops: - but I hope that some of the "custom" resolutions above might do the trick of getting adequate performance until we get the 640x480 working properly.

crobe
Posts: 4
Joined: Wed Apr 11, 2012 1:10 pm

Re: Trine2 for Linux - window mode

Postby crobe » Thu Apr 12, 2012 3:09 pm

Thanks for the exhaustive explanation, I'm running 640x512 now (Card and display support it) and it runs quite well ( The swamps gave another bigger performance hit on my good ol' XPS M1330 and I don't care that much about the aspect ratio ).

I'm still glad I bought this game!


Return to “Trine 2”

Who is online

Users browsing this forum: No registered users and 7 guests