View Issue Details

IDProjectCategoryLast Update
0006260Valley 1Suggestion - UI IdeasFeb 29, 2012 3:37 pm
ReporterTNSe Assigned ToChris_McElligottPark  
Status consideringResolutionnot fixable 
Product Version0.586 
Summary0006260: Allow setting a different resolution than your game is displayed at.
DescriptionThis suggestion is somewhat related to id 4181, although I find it to be dissimilar in some ways.

I would like to set a resolution to render the game at (like 1680x1050), and then have it shown in WINDOWED mode at 1024x640.

In effect, you would render to a surface that is 1680x1050, but then scale it down to the 1024x640 display window when flipping to screen for windowed.
TagsNo tags attached.
Internal WeightNew

Activities

Chris_McElligottPark

Feb 29, 2012 12:29 pm

administrator   ~0020028

I don't even begin to know how to do that, especially with the unity engine.

TNSe

Feb 29, 2012 1:13 pm

reporter   ~0020029

I can't really help you with the unity engine, but in generic OGL/D3D programming it should be fairly simple.

Chris_McElligottPark

Feb 29, 2012 1:15 pm

administrator   ~0020030

Do you have any links to that topic?

TNSe

Feb 29, 2012 2:44 pm

reporter   ~0020034

This is rather simple to do, but might be performancedegrading.

Basically, you need to render to a target buffer, and then render this buffer to the backbuffer (can replace the glClear) before SwapBuffers.

Sadly I do not know OpenGL well enough anymore, but think of it this way:

You render to a virtual screen (1680x1050) (a buffer -> texture) and later you render this texture onto a square (the Windows window) with the above texture.

Obviously will eat more fillrate, but will allow me to play windowed mode without getting part of the game view occluded.

Chris_McElligottPark

Feb 29, 2012 2:46 pm

administrator   ~0020036

Unlikely prior to 1.0, but thanks for the info.

TNSe

Feb 29, 2012 3:03 pm

reporter   ~0020040

I had a hard time finding a link, as most tutorials and samples render 3D worlds, and do not need to deal with this.

This is the closest I get.
http://www.swiftless.com/tutorials/opengl/framebuffer.html

Optionally, you might get away by rendering the 2D tiles of the world with a scalar. ie, if you are using
glBegin(GL_QUADS);
glVertex2f(x1, y1);
glVertex2f(x2, y1);
glVertex2f(x2, y2);
glVertex2f(x1, y2);
glEnd();

you'd prescale x1/x2 and y1/y2 by a scalar.

xScalar = windowSizeX / renderSizeX;
yScalar = windowsSizeY / renderSizeY;

Chris_McElligottPark

Feb 29, 2012 3:10 pm

administrator   ~0020041

None of that will work with Unity directly, unfortunately, but I imagine I can get a similar effect with render textures there. That messes with the system requirements, however, and adds some other complexity, so it's something that would have to be optional-on for folks like yourself that wanted it. And remember that it would be scaling down the text and other GUI elements, too, not just the regular view... unless we added in yet more complexity.

Hence my reluctance to do that anytime soon, especially when we have three weeks to finish the rest of everything prior to 1.0.

TNSe

Feb 29, 2012 3:37 pm

reporter   ~0020042

Fair enough, this is just a simple request, not a showstopper.

I like watching videos while playing games, and the playingfield gets too small in windowed mode. (Bosses are like way off screen, but visible in fullscreen).

Issue History

Date Modified Username Field Change
Feb 29, 2012 12:28 pm TNSe New Issue
Feb 29, 2012 12:29 pm Chris_McElligottPark Internal Weight => New
Feb 29, 2012 12:29 pm Chris_McElligottPark Note Added: 0020028
Feb 29, 2012 12:29 pm Chris_McElligottPark Status new => closed
Feb 29, 2012 12:29 pm Chris_McElligottPark Assigned To => Chris_McElligottPark
Feb 29, 2012 12:29 pm Chris_McElligottPark Resolution open => not fixable
Feb 29, 2012 1:13 pm TNSe Note Added: 0020029
Feb 29, 2012 1:15 pm Chris_McElligottPark Note Added: 0020030
Feb 29, 2012 2:44 pm TNSe Note Added: 0020034
Feb 29, 2012 2:46 pm Chris_McElligottPark Note Added: 0020036
Feb 29, 2012 2:46 pm Chris_McElligottPark Status closed => considering
Feb 29, 2012 3:03 pm TNSe Note Added: 0020040
Feb 29, 2012 3:10 pm Chris_McElligottPark Note Added: 0020041
Feb 29, 2012 3:37 pm TNSe Note Added: 0020042