The Daily Click ::. Forums ::. Klik Coding Help ::. Resolution, resizing windows, and fullscreen questions.
 

Post Reply  Post Oekaki 
 

Posted By Message

Kaze



Registered
  22/04/2012 19:10:37
Points
  2
16th June, 2012 at 16/06/2012 15:11:33 -

More specifically: How do I do these things?

I'm really new to MMF2 and I'm trying to make my first project, but one problem I ran into was that I know next to nothing about resolution types or how to upscale/downscale a window in MMF2. I'm working on a game, and I'd like it to be playable and accessible on many PCs, and one thing I realized that ould involve would be to figure out how to make it so that people can scale the window to their monitor, and another concern I have is that this game will be made with pixel art - because it's my first game, not because I have any love for pixel art - and pixel art tends to be tiny, and I'd like to know how I can "magnify" everything on the screen. This is especially a concern with text.

Not sure if this was already answered elsewhere.

As a bonus question, because I don't feel like it's worth its own topic, does anyone have advice for drawing and animating vector graphics? This is for a later project I want to do, not this one.

 
http://kazeskyfox.deviantart.com/

Fifth

Quadruped

Registered
  07/05/2003
Points
  5815

VIP MemberGOTW JULY 2010 WINNER!Kliktober Special Award TagGOTW HALLOWEEN 2011 WINNERPicture Me This Round 51 Winner!
16th June, 2012 at 16/06/2012 19:45:56 -

Okay, to start, there are some options you can set up in the application itself. You'll find all the window properties by clicking on your game's name over on the left, then selecting the monitor icon in the properties pane beneath it. Some properties to note:

(O) Heading: this will let the user to move around the window, which is typically a good thing.
(X) Heading when maximized: you probably want this off, as it just takes up space when it's fullscreen.
(O) No thick frame: the thick frame lets the user stretch the window to whatever size. If you want the screen locked to more sensible sizes/proportions, then it's a good idea to check this to disable the thick frame.
(X) Change resolution mode: this is usually more of a pain to deal with than it's worth. It will change Windows' resolution, and doesn't always work the way you'd want. I'd keep it unchecked.
(O) Allow user to switch to/from full screen: self-explanatory, but is usually a nice thing to allow.
(O) Resize display to fill window size: This is the big one that you'll need checked, so that you can actually stretch your game's image to the larger window.

Now, to do the actual resizing, you'll need the Window Control Object. This object allows you to change the window size during runtime.

Now, the one thing to note about changing the window size is that it changes the entire window to the specified size, including the header and the frame. So if you set your window's width to 640, the game's frame will actually end up being a little smaller, like 636 or something. This results in an imperfect stretch.

To fix this, you can set the window's size by using something like this (just replace the 640 and 480 with your own resolution):

Set Horizontal Size to

640+(WinXSize( "Window Control" )-ClientWidth( "Window Control" ))

Set Vertical Size to
480+(WinYSize( "Window Control" )-ClientHeight( "Window Control" ))


Additionally, you can use the Window Control Object to center the game's window after you've resized it. It's just a tidy thing to do.

Set Horizontal Position to

Max(Int((ScreenXSize( "Window Control" )/2)-((640+(WinXSize( "Window Control" )-ClientWidth( "Window Control" )))/2)), 0)

Set Vertical Position to
Max(Int((ScreenYSize( "Window Control" )/2)-((480+(WinYSize( "Window Control" )-ClientHeight( "Window Control" )))/2)), 0)


Then you can set up events to adjust the window's size as you see fit. Just try to keep it to pure resizes (like x2, x3, not x1.5) of the game's actual size for the best result.

Let me know if you need anything clarified.

 
Go Moon!

Kaze



Registered
  22/04/2012 19:10:37
Points
  2
16th June, 2012 at 16/06/2012 19:59:48 -

That was extremely helpful! Thank you so much, now I feel much more confident about progressing with incorperating sprites into the actual game as actives.

 
http://kazeskyfox.deviantart.com/

Fifth

Quadruped

Registered
  07/05/2003
Points
  5815

VIP MemberGOTW JULY 2010 WINNER!Kliktober Special Award TagGOTW HALLOWEEN 2011 WINNERPicture Me This Round 51 Winner!
16th June, 2012 at 16/06/2012 22:12:59 -

Make it happen!

 
Go Moon!
   

Post Reply



 



Advertisement

Worth A Click