The Daily Click ::. Forums ::. Klik Coding Help ::. Full Screen resizing
 

Post Reply  Post Oekaki 
 

Posted By Message

vinicio



Registered
  11/04/2015 21:20:09
Points
  142
11th June, 2015 at 11/06/2015 02:20:27 -

so in my making my first game and the frame size is 320x240.
i want to make my game at least fit more of the screen because it seems that the size is kind of small.
could anybody tell me how to do this.

 
n/a

Piot



Registered
  12/06/2015 11:28:57
Points
  2
12th June, 2015 at 12/06/2015 13:14:21 -

Change settings by clicking on the name of the application window tab -> Size

 
n/a

vinicio



Registered
  11/04/2015 21:20:09
Points
  142
13th June, 2015 at 13/06/2015 21:51:55 -

thanks for the answer but i was looking more for a way to rescale the screen so it fits.

 
n/a

Fifth

Quadruped

Registered
  07/05/2003
Points
  5818

VIP MemberGOTW JULY 2010 WINNER!Kliktober Special Award TagGOTW HALLOWEEN 2011 WINNERPicture Me This Round 51 Winner!
14th June, 2015 at 14/06/2015 10:21:43 -

If you just want your game to stretch based on the window's size, you want to look in the application's Properties > Window (the second tab, looks like a monitor) > Options... (near the bottom) > Resize display to fill window size. This is just to stretch the game to the window, though, which at this point the user has to do himself.

If you want to automatically adjust the window's size to something convenient, you'll want the Window Control Object. You can use it to resize/reposition the window during runtime. But there's a little trickiness to it, because you have to account for the header/menu bar/frame to get the sizes perfect.

This is what I've been using. It should do the trick. Right now it will double the window's size ( 320 * 2 ), but if you want it tripled or whatever just adjust the * 2 bits.

Set Horizontal Size to
320 * 2 + ( WinXSize( "Window Control" ) - ClientWidth( "Window Control" ) )
Set Vertical Size to
240 * 2 + ( WinYSize( "Window Control" ) - ClientHeight( "Window Control" ) )
Set Horizontal Position to
Max(Int(( ScreenXSize( "Window Control" ) / 2 ) - ( ( 320 * 2 + ( WinXSize( "Window Control" ) - ClientWidth( "Window Control" ) ) ) / 2 ) ), 0 )
Set Vertical Position to
Max(Int(( ScreenYSize( "Window Control" ) / 2 ) - ( ( 240 * 2 + ( WinYSize( "Window Control" ) - ClientHeight( "Window Control" ) ) ) / 2 ) ), 0 )

 
Go Moon!

vinicio



Registered
  11/04/2015 21:20:09
Points
  142
16th June, 2015 at 16/06/2015 00:58:40 -

thanks, however i have a problem, it seems that when i write this it keeps giving me a syntax error.
i tried writing it without any spaces in between, i copied it directly and it doenst seem to work any idea why this is happening?

 
n/a

Fifth

Quadruped

Registered
  07/05/2003
Points
  5818

VIP MemberGOTW JULY 2010 WINNER!Kliktober Special Award TagGOTW HALLOWEEN 2011 WINNERPicture Me This Round 51 Winner!
16th June, 2015 at 16/06/2015 16:00:13 -

I can't imagine why. I tried copy-pasting it myself and it works just fine.

You're grabbing each full line of code and nothing but, right?

 
Go Moon!

vinicio



Registered
  11/04/2015 21:20:09
Points
  142
16th June, 2015 at 16/06/2015 16:25:30 -

yes i just copied the codes.
maybe there is something in the application settings that i need to check or something like that?
i also noticed that "WinXSize" does not highlight when i copy or write it.

Edited by vinicio

 
n/a

lembi2001



Registered
  01/04/2005
Points
  608

VIP MemberIt's-a me, Mario!Wii OwnerI like Aliens!Has Donated, Thank You!PS3 OwnerI am an April Fool
16th June, 2015 at 16/06/2015 20:34:10 -

Stupid Question Alert.......

You do have the Window Control Object in your frame don't you??

 
n/a

vinicio



Registered
  11/04/2015 21:20:09
Points
  142
16th June, 2015 at 16/06/2015 21:36:49 -

yes i do, it seems that is the WinXSize part of the code.
maybe it is written in another way?

 
n/a

Fifth

Quadruped

Registered
  07/05/2003
Points
  5818

VIP MemberGOTW JULY 2010 WINNER!Kliktober Special Award TagGOTW HALLOWEEN 2011 WINNERPicture Me This Round 51 Winner!
17th June, 2015 at 17/06/2015 15:50:32 -

Yeah, I'm not sure what it could be, then. What program are you using? MMF 2? 2.5? Is your Window Control Object up-to-date? Did you rename the object as something else?

In any case, you could always just re-enter the code into your own game. It shouldn't be too hard to find the right expressions through MMF.

 
Go Moon!

vinicio



Registered
  11/04/2015 21:20:09
Points
  142
17th June, 2015 at 17/06/2015 20:07:44 -

so after trying everything i finally could figure it out.
when writing the code i used "retreive data from an object" on the window control object it gave me the options of size and position so the codes ended like this:
320*2+(Window X size( "Window Control" )-ClientWidth( "Window Control" ))
anyway thanks a lot for your help, is nice to see that people in here really help a lot.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click