SFML community forums

Help => General => Topic started by: SuperV1234 on July 30, 2010, 01:49:19 pm

Title: My game doesn't work on friend's PC
Post by: SuperV1234 on July 30, 2010, 01:49:19 pm
My game works fine on my PC and my notebook. It has an INI where you can set your stuff. By default, it's like this:
Code: [Select]
[Rendering]
Windowed=1
Width=1022
Height=900

[Audio]
Sound=1
Music=1


If Windowed is 1, the game creates a WidthxHeight window.
If Windowed is 0, the game creates a fullscreen WidthxHeight window.

If my friend starts the game with Windowed 1, the window doesn't appear, but the music starts.

If my friend starts the game with Windowed 0, the tiles are way too small for his resolution.

Why isn't a window created with Windowed 1?
Title: My game doesn't work on friend's PC
Post by: Laurent on July 30, 2010, 01:54:49 pm
You should check error messages in the standard error output, SFML certainly tells you what happens.

For example, 1022x900 is probably not a valid fullscreen resolution.
Title: My game doesn't work on friend's PC
Post by: SuperV1234 on July 30, 2010, 02:47:45 pm
But it actually works only in fullscreen. It's the windowed mode that doesn't work.
Title: My game doesn't work on friend's PC
Post by: Laurent on July 30, 2010, 02:55:16 pm
Yes it works, but SFML automatically switches to a valid resolution. So what you get is not what you expect.
Title: My game doesn't work on friend's PC
Post by: SuperV1234 on July 30, 2010, 03:42:57 pm
Quote from: "Laurent"
Yes it works, but SFML automatically switches to a valid resolution. So what you get is not what you expect.


What are the valid fullscreen resolutions? All 4:3 / 16:9 / 16:10 work?
Title: My game doesn't work on friend's PC
Post by: Nexus on July 30, 2010, 03:54:13 pm
You can obtain the valid fullscreen resolutions by calling sf::VideoMode::GetFullscreenModes() (http://www.sfml-dev.org/documentation/2.0/classsf_1_1VideoMode.htm#5a98e166f0ece70c493b06b0057beafd).
Title: My game doesn't work on friend's PC
Post by: Laurent on July 30, 2010, 03:59:46 pm
Quote
You can obtain the valid fullscreen resolutions by calling sf::VideoMode::GetFullscreenModes() (http://www.sfml-dev.org/documentation/2.0/classsf_1_1VideoMode.htm#5a98e166f0ece70c493b06b0057beafd).

This is for SFML 2.0, for 1.6 look at this page:
http://www.sfml-dev.org/documentation/1.6/classsf_1_1VideoMode.htm