screensize bugs

screensize bugs

Postby ctdabomb » 03 May 2012, 00:06

several bugs about different resolutions:

1. can make your resolution bigger than your monitor.

2.when bug one happens, the save button is out of sight, and there is no way to manually fix the window size.

3.on bigger resolutions, icons and buttons disappear. (see picture(record image missing))
Attachments
Screenshot-3.png
Some people are like slinkies... not really good for anything, but you still can't help smiling when you shove them down the stairs.
ctdabomb
 
Posts: 1075
Joined: 13 Dec 2011, 21:21
Location: halfway there

Re: screensize bugs

Postby acme_pjz » 03 May 2012, 05:22

:| ............. :think: I think we should use SDL_ListModes() instead of hardcode a lot of predefined screen resolutions :| And we should use the sizable window under non-fullscreen mode...
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 665
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: screensize bugs

Postby Edward_Lii » 03 May 2012, 06:49

Hello ctdabomb,

ctdabomb {l Wrote}:2.when bug one happens, the save button is out of sight, and there is no way to manually fix the window size.

In most window managers you can move the window beyond the screen edges by holding the alt-key while dragging the window.
This way you can move the window in a way that you can reach the Save Settings button.

acme_pjz {l Wrote}::| ............. :think: I think we should use SDL_ListModes() instead of hardcode a lot of predefined screen resolutions

I see you've implemented this, one problem is that most monitors support 640x480 which is lower than our minimum supported resolution (800x600).
We should filter out resolutions that are smaller than 640x480.

acme_pjz {l Wrote}:And we should use the sizable window under non-fullscreen mode...

That's a great idea, I assume upon resizing the game would receive an event from SDL?
From,
Edward_Lii
User avatar
Edward_Lii
MnMS Moderator
 
Posts: 777
Joined: 20 Dec 2010, 16:46

Re: screensize bugs

Postby acme_pjz » 03 May 2012, 07:24

Hi,

Edward_Lii {l Wrote}:I see you've implemented this, one problem is that most monitors support 640x480 which is lower than our minimum supported resolution (800x600).
We should filter out resolutions that are smaller than 640x480.


OK, fixed in latest SVN.

Edward_Lii {l Wrote}: acme_pjz wrote:And we should use the sizable window under non-fullscreen mode...


That's a great idea, I assume upon resizing the game would receive an event from SDL?


Yes, we'll receive SDL_VIDEORESIZE event, but during gaming I'm not sure if we can recreate the bitmap :|
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 665
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: screensize bugs

Postby Edward_Lii » 03 May 2012, 07:31

Hello acme_pjz,

acme_pjz {l Wrote}:OK, fixed in latest SVN.

Great work. :)

acme_pjz {l Wrote}:Yes, we'll receive SDL_VIDEORESIZE event, but during gaming I'm not sure if we can recreate the bitmap :|

What do you mean with bitmap, the background image?
I think the biggest problem is that when we change the resolution the GUIObjects will be placed wrongly.

Perhaps we should a resize() method to GameState and the let the screen implement the rearranging of the elements?
From,
Edward_Lii
User avatar
Edward_Lii
MnMS Moderator
 
Posts: 777
Joined: 20 Dec 2010, 16:46

Re: screensize bugs

Postby acme_pjz » 03 May 2012, 07:41

Edward_Lii {l Wrote}:What do you mean with bitmap, the background image?


Yes, and some buffer surface created in createScreen() function...

Edward_Lii {l Wrote}:I think the biggest problem is that when we change the resolution the GUIObjects will be placed wrongly.

Perhaps we should a resize() method to GameState and the let the screen implement the rearranging of the elements?


Maybe. IMHO first try if dynamic resize window works, after that we add some GUI resize code...

BTW: Is OpenGL hardware acceleration usable?
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 665
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: screensize bugs

Postby Edward_Lii » 03 May 2012, 07:47

Hello acme_pjz,

acme_pjz {l Wrote}:Maybe. IMHO first try if dynamic resize window works, after that we add some GUI resize code...

I think the best solution would be to only rearrange/scale when the user is done resizing.
This will probably be too hard to detect properly, but it prevents the tempSurface and screenSurface to scale every time.

acme_pjz {l Wrote}:BTW: Is OpenGL hardware acceleration usable?

Yes it's usable, it gives a nice performance boost.
Basically it just converts the screen Surface to a texture and puts it on a fullscreen quad, but it gives enough performance gain that it's worth it.

And I think it doesn't even require openGL 2.1. ;)
From,
Edward_Lii
User avatar
Edward_Lii
MnMS Moderator
 
Posts: 777
Joined: 20 Dec 2010, 16:46

Re: screensize bugs

Postby acme_pjz » 03 May 2012, 07:57

The compiler complains about GL_BGRA undefined :|

[EDIT] Fixed in latest SVN.
Last edited by acme_pjz on 03 May 2012, 08:25, edited 1 time in total.
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 665
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: screensize bugs

Postby Edward_Lii » 03 May 2012, 08:02

Hello acme_pjz,

acme_pjz {l Wrote}:The compiler complains about GL_BGRA undefined :|

Strange, it should be in the GL library <GL/gl.h>.

There aren't any other problems?
Does GL_RGBA work instead of GL_BGRA?
From,
Edward_Lii
User avatar
Edward_Lii
MnMS Moderator
 
Posts: 777
Joined: 20 Dec 2010, 16:46

Who is online

Users browsing this forum: No registered users and 1 guest