The Daily Click ::. Forums ::. Klik Coding Help ::. Best way to double resolution?
 

Post Reply  Post Oekaki 
 

Posted By Message

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
15th June, 2014 at 15/06/2014 10:52:42 -

I'm using the Window Control Object to double the size of my games resolution. I originally was using the "Window Size" option, and seemingly had to specify the additional pixel in the actual window size for it to work properly, and couldn't get it right.

I've also tried current screen size*2 but it's not doubling the size, it's just setting it to my computers resolution. How do I do this properly?

Edited by -Liam-

 
Image

Tell 'em Babs is 'ere...

nim



Registered
  17/05/2002
Points
  7233
15th June, 2014 at 15/06/2014 11:41:03 -

There's a little calculation to subtract the window's frame width and title bar etc. hang on

http://www.create-games.com/forum_post.asp?id=223490


^ In case that's not clear, here's how I do it:

My game's native width is 320x200 but I double the width and height using this:

[Window Control object]:
640+(WinXSize( "Window Control" )-ClientWidth( "Window Control" ))
400+(WinYSize( "Window Control" )-ClientHeight( "Window Control" ))

Edited by nim

 
//

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
15th June, 2014 at 15/06/2014 14:01:40 -

Thanks nim, this has helped out a lot.

Edited by -Liam-

 
Image

Tell 'em Babs is 'ere...

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
15th June, 2014 at 15/06/2014 14:45:56 -

... But now I have another problem. It's frustrating as I'm sure I had this part working properly this morning, but since trying this new technique it's messing up the screen area.

Frame Editor:
http://i298.photobucket.com/albums/mm280/whatpixelyouon/pic1_zps50e50dfb.png

Running the application:
http://i298.photobucket.com/albums/mm280/whatpixelyouon/pic2_zps29977f88.png

Notice how the resolution remains the same as the graphic in the frame editor. However, everything in the screen area is now reduced by half size.

"Resize display to fill window size" is checked when this happens. Unchecking it corrects the problem. But I need it checked to stretch the pixel art frames. Can I enable/disable this during runtime?



Edited by -Liam-

 
Image

Tell 'em Babs is 'ere...

Maltar Draco



Registered
  22/08/2013 19:25:19
Points
  215
17th June, 2014 at 17/06/2014 09:44:03 -

I know I have done this recently.

The game I am currently working doubles the resolution perfectly.

*Looks at Code*

*Writes Code below*

Start of Frame
(Window Control) : Set horizontal size to WinXSize( "Window Control" )*2
(Window Control) : Set vertical size to WinYSize( "Window Control" )*2
(Window Control) : Set horizontal position to WinXPos( "Window Control" )-(WinXSize( "Window Control" )/4)
(Window Control) : Set vertical position to WinYPos( "Window Control" )-(WinYSize( "Window Control" )/4)

 
Maltar Draco, I do PC gaming.

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
19th June, 2014 at 19/06/2014 22:22:10 -

Thanks Maltar Draco, but it still has the same problem. For whatever reason, all my graphics are squashed down to half their actual size, when the window is doubled in size.

 
Image

Tell 'em Babs is 'ere...

SolarB



Registered
  26/12/2011
Points
  564
25th June, 2014 at 25/06/2014 06:28:19 -

I hope this can help, http://community.clickteam.com/threads/72630-Change-window-size-and-switch-aspect-at-runtime

 
My Open Source Examples: http://bit.ly/YyUFUh

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
26th June, 2014 at 26/06/2014 12:59:25 -

Thanks SolarB, this looks like it could be very useful in the future. Unfortunately, it doesn't cover my issue - I don't think Fusion is capable of what I'm wanting to do.

 
Image

Tell 'em Babs is 'ere...
   

Post Reply



 



Advertisement

Worth A Click