The Daily Click ::. Forums ::. Klik Coding Help ::. Full screen giving massive trouble.
 

Post Reply  Post Oekaki 
 

Posted By Message

Mr. Ksoft



Registered
  02/07/2005
Points
  125
19th October, 2008 at 22:38:08 -

Okay, so I posted this a while ago at the official Clickteam forums and was unable to get a response, so I decided I'd turn to here since it's the next big MMF/etc. community I could think of.

(For the record, this is to do with MMF2 standard)

I've been having some problems with full screen mode.

My game has an actual screen resolution of 160x120 pixels. This is stretched to a 320x240 pixel area (exactly double the size) using the Window Control object, combined with the application option "Resize display to fill window size".

I've set up a toggle between windowed mode and full screen. The problem here is that I cannot for the life of me get the full screen mode to display properly. On every monitor I own (and all the ones that I don't own that I've tried it on), CRT or LCD, it displays only in a 320x200 area (instead of 320x240) on-screen and squishes everything down to fit.

In the past, I have made SEVERAL applications in MMF (1.x and 2.0, in fact) that use 320x240 pixel display areas and they all display completely fine in full screen mode, so it's not that the monitors can't support the mode. In fact, my monitor claims to be displaying in 640x480 mode (it's an LCD) even though taking a screenshot and pasting into paint reveals that Windows itself is set in a 320x200 screen mode... which is wrong.

Now, it gets weirder from here. If I move between frames in the application, the screen changes and instead of stretching everything to fit it starts cutting off the bottom 40 pixels. Everything that's on screen looks fine and unstretched at this point (which it should) but without the bottom 40 pixels where the game's displays are located the game is unplayable.

I've tried several different ways of attempting to fix this, including rescaling the window back to 160x120 before going full screen or, in an opposite attempt, quadrupling it to 640x480 first and then seeing if it would just display properly in that. Neither way worked.

I need the scalable window so that the game area is viewable on large screens without the requirement of full screen mode, but I want full screen mode to be there if it's wanted. What should I do to solve this problem?

 
n/a

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
19th October, 2008 at 23:06:19 -

Personal opinion: Ditch MMF2 and go with TGF.

Widely-accepted opinion: MMF2 is still a bit buggy, and/or post some source.

 

  		
  		

Mr. Ksoft



Registered
  02/07/2005
Points
  125
19th October, 2008 at 23:25:19 -

Well, I'm not posting the full source of the game, however I just took all the code related to the screen switching and dropped it into a blank program and you can still see what happens.

http://ksoftgames.isamedia.org/files/Fullscreenbug.zip

For MMF2 standard. Requires the INI plus plus object (that's odd, I couldn't just use two plus symbols... they disappeared when I previewed my post...) because I load display settings from a settings file, which is included.

Try switching between the two frames in this example and the bug should show its ugly face.
All the events relating to the screen mode switching are placed in the global events.

 
n/a

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
19th October, 2008 at 23:32:38 -

Unfortunately, I do not own MMF2. >_> I cannot open that with the Ini plus object in there. <_< >_>

 

  		
  		

Mr. Ksoft



Registered
  02/07/2005
Points
  125
19th October, 2008 at 23:38:00 -

Here's the same thing with all the INI stuff taken out. Bug still functions. I'd just left the stuff in there because that was how it was done in the game to start, but I guess that it actually doesn't affect the bug.

http://ksoftgames.isamedia.org/files/Fullscreenbug2.zip

 
n/a

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
20th October, 2008 at 00:29:44 -


Originally Posted by OldManClayton
Personal opinion: Ditch MMF2 and go with TGF.

Widely-accepted opinion: MMF2 is still a bit buggy, and/or post some source.



Now see, I HATE when people give stupid advice like this. For christ sake, you're not better then someone on XP telling someone on Vista to "Upgrade" to XP. It's annoying, pointless, and just makes you look stupid for even saying it.. despite how right you and other people might think you are. MMF is better then TGF, at least MMF2 is. It just is. If you think the interface is too complex, then go try out 3D Studio Max or any other number of higher end pieces of software.

 
http://www.facebook.com/truediamondgame

Codemonkey

Always Serious

Registered
  06/11/2007
Points
  164

Code MonkeyKlikCast StarVIP MemberAttention GetterWii Owner360 OwnerThe Cake is a LieCardboard BoxHero of TimeI'm a Storm Trooper
I'm on a BoatIt's-a me, Mario!PS3 OwnerSonic SpeedGOTM - SEPTEMBER 2009 - WINNER!Evil klikerPokemon Ball!I am an April Fool
20th October, 2008 at 01:03:48 -

Well you have to give him some points for saying it was his opinion.

 
You can log off any time you like, but you can't ever leave.

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
20th October, 2008 at 01:34:39 -


Originally Posted by BrandonC

Originally Posted by OldManClayton
Personal opinion: Ditch MMF2 and go with TGF.

Widely-accepted opinion: MMF2 is still a bit buggy, and/or post some source.



Now see, I HATE when people give stupid advice like this. For christ sake, you're not better then someone on XP telling someone on Vista to "Upgrade" to XP. It's annoying, pointless, and just makes you look stupid for even saying it.. despite how right you and other people might think you are. MMF is better then TGF, at least MMF2 is. It just is. If you think the interface is too complex, then go try out 3D Studio Max or any other number of higher end pieces of software.



Now see, this is why Adam hates you. I was just joking dude, take a chill pill and come back later. It is all just a matter of opinions, yours and mine, and it's really not relevant to the problem. The amount of hypocrisy in that post is actually pretty funny.

I shall now take a look at the source code.

btw, I never said MMF2's interface was too complex. I said it wasn't as streamlined as it could be. I am entirely aware that MMF2 is better. Talk about looking stupid.

Image Edited by the Author.

 

  		
  		

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
20th October, 2008 at 01:54:37 -

It's strange. It says "the object below should be cut off", except for it's not. It's still there.

Like you said though, the aspect ratio is wrong - 320x200.
After changing the window size to 160x100, it looked perfect in fullscreen mode, but then it was stretched vertically when windowed.

Anyway, I can't help you, and it doesn't seem like the sort of thing there's going to be an easy fix for. Especially if it's not even consistent on different computers.

I think scaling etc is something clickteam haven't got quite right yet - for me, "Mr Treasure Hunter" didn't even function in fullscreen.

 
n/a

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
20th October, 2008 at 01:57:17 -

I've got a general idea of what's wrong-- I just need to figure out how to globally fix it.

 

  		
  		

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
20th October, 2008 at 02:08:01 -

use the viewport object.

 
n/a

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
20th October, 2008 at 02:08:58 -

Fixed it. Let me post the solution.

 

  		
  		

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
20th October, 2008 at 02:15:11 -


Originally Posted by Mr. Ksoft
Here's the same thing with all the INI stuff taken out. Bug still functions. I'd just left the stuff in there because that was how it was done in the game to start, but I guess that it actually doesn't affect the bug.

http://ksoftgames.isamedia.org/files/Fullscreenbug2.zip

i get a different problem when i try this...
Going to frame two is fine, but after i go back to frame 1 i get the top left quarter of the frame stretched to full screen.

 
.

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
20th October, 2008 at 02:20:57 -

Ok, in the global events:

-In the "Upon Pressing 'F4'" and "Upon Pressing 'F3'" conditions, delete the window object resizing action.

So the only thing that sets the window size is start of frame.

-Now, Replace "Start of frame" with something that will only happen once at the beginning of the game. I used Global values. Example: Global Value A = 0 >> (Insert here the window resizing command) AND Set Global Value A to 1. You can use whatever system you need to prevent it from happening at the start of every level.

I think it had something to do with either the taskbar or the strange end numbers in today's larger screen sizes. Set some counters to the value you have for Screen resizing and you'll see that it's not perfect 320x240.

It's really rather simple when you think about it. Just set the size once, and toggle fullscreen/windowed.

Alternatively, you can just skip the window resizing altogether, set the app's size to 320x240 from the get-go, and just toggle fullscreen/windowed mode on pressing of the function buttons. However, that created a different screen aspect ratio for me and may not look right for your game. Good Luck!

AndyUK: Yup.

Image Edited by the Author.

 

  		
  		

Mr. Ksoft



Registered
  02/07/2005
Points
  125
20th October, 2008 at 03:12:01 -

I really overthought that one. Thanks.

However, it's sort of only a half fix. At least on my computer, it's still squishing everything into a 320x200 box instead of 320x240. It doesn't change and cut things off any more, so I guess it may be acceptable. However, I'd love to get this last bit fixed so it displays 320x240 proper. And anyway, it is a true 320x240 at least in windowed mode, because I can take screenshots and they are the correct size and they can then be reduced in size to 160x120 without any detail being lost.

@Sketchy: I noticed it didn't happen immediately but if you switched back and forth a few times it does happen. It isn't really inconsistent at all-- I tried my game on 5 different computers personally and about ten of my friends who are beta testing it tried it on their computers and we all got the same results in the end.

@cecil64: Please elaborate. Are you meaning, like, run the game in 320x240 but use the viewport to take the upper-left 160x120 pixels and double the size? It could work...
EDIT: It works great... as long as you don't need the screen to scroll. At that point it tries to scroll via the 320x240 resolution which obviously doesn't work.

Image Edited by the Author.

 
n/a

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
20th October, 2008 at 13:16:01 -

If you do what I said under "alternatively..." it should do it with the correct ratio. Set the app's frame to 320x240 in the settings, and it will automatically resize the smaller levels. Then you can just toggle fullscreen.

Image Edited by the Author.

 

  		
  		

Mr. Ksoft



Registered
  02/07/2005
Points
  125
20th October, 2008 at 21:42:06 -

Yes, but this is a scrolling game. If I enlarge it to 320x240 it's going to display those levels in 320x240 because the levels are larger than the screen size. It'd work great for everything else, but in this case the actual levels' pixel size would be shrunk down.

Maybe I should post some comparison images to demonstrate what I mean...

 
n/a

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
21st October, 2008 at 02:40:46 -

You should. Either my brain is too tired or too impatient to try to figure out what you mean.

 

  		
  		

Mr. Ksoft



Registered
  02/07/2005
Points
  125
21st October, 2008 at 03:43:03 -

Okay, this demonstrates.
I've put up two images, the first of a logo screen which is a 160x120 pixel frame, the second of gameplay, which is a larger than 320x240 pixel area.

On the left is how it has been done-- 160x120 with Window Control enlarging the window.
On the right is how you suggested-- setting the game's window size to 320x240.

While the two logo images look almost identical, when you get to scrolling levels it becomes uber-obvious what the problem is with that method...

Image

Also an odd thing to note: when run in normal old 320x240 MMF cuts off three pixels horizontally and vertically. If you chop out both screens on the right from their window borders you'll see they're only 317x237! That problem doesn't occur with my method...

 
n/a

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
21st October, 2008 at 13:48:20 -

I thought maybe that's what you meant. I'm thinking you're setting the wrong value for resizing the playfield, but I'm not sure and I can't check at the moment. I'll look into it after class today.

 

  		
  		

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49567

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
23rd October, 2008 at 20:26:09 -

I made a little example using your original example which uses the Big Box object to change the resolution directly, I didn't try it with scrolling but it should work if you implement it properly

http://www.jsoftgames.com/Fullscreen_example_fix.zip

 
n/a

Mr. Ksoft



Registered
  02/07/2005
Points
  125
23rd October, 2008 at 23:28:48 -

It most certainly works!

At least in the example. I copied it all over to my game and incorporated it with my settings loading from an INI... didn't work 100%. The biggest problem was that if it started in full screen mode based on the settings, it would tend to get stuck in 320x240 screen resolution even after quitting, and when returning to windowed mode it would display in some odd mode... looked like 160x6 pixels?

I just thought some more and realized exactly why these happened, though, so I think it can all be worked out and things will be perfect! Thanks!

Edit: Although, I just realized that the resolution change screwed up my desktop icon configuration (since I don't have mine set to auto-arrange), and that ticks me off. Dunno if that was from when it got stuck, but if it happens every time I'll have to drop it. Such messings with the icons are not really a good thing.

Image Edited by the Author.

 
n/a

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
23rd October, 2008 at 23:42:53 -

This could be a predicament. >_O I looked at it again... I know there's a feature that stretches the level out to fill the window... why is it resizing the whole thing?? O_o Confuzzling.

 

  		
  		

Mr. Ksoft



Registered
  02/07/2005
Points
  125
23rd October, 2008 at 23:44:12 -

As it turns out, this resolution change does indeed screw up desktop icons. I liked MMF's built in res-changing because it was very good about leaving icons be. Unfortunately, I don't think anyone who plays my game would really enjoy having their icons screwed with every time they play, so I can't use this. The squished screen will have to be acceptable, or I'll have to go with plain old stretched maximizing and hope to god that it doesn't run too slow. (or HWA helps make it run not slow...)

 
n/a

JustinC



Registered
  02/04/2006
Points
  1517

GOTM - MAY 2009 - 3RD PLACE!
24th October, 2008 at 00:12:24 -

Another problem with screen resizing in this day and age is the fact that there's both 4:3 monitors and 16:9. I've got a 16:9 so when I full screen a game it ends up distorted. I wish there was a way to swap between aspect ratios and give the player a wider view of the level in 16:9 mode. . .

 
Image

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
24th October, 2008 at 00:14:33 -

That could be a nightmare with some games. Using off-screen resources and whatnot...

 

  		
  		

Mr. Ksoft



Registered
  02/07/2005
Points
  125
24th October, 2008 at 00:16:02 -

Unfortunately, that will always be a problem.
The good news, though, is that my game is retro styled-- and it'll look just like an old game console looks on a brand new widescreen TV! (...hahah)

 
n/a

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49567

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
24th October, 2008 at 01:16:26 -

Hmm, i messed up your icons you say? That is odd, I've been using that method for a while and I've never experienced this. ah well, I guess I'll have to give it another look

 
n/a

Mr. Ksoft



Registered
  02/07/2005
Points
  125
24th October, 2008 at 02:51:38 -

It's one of those things that happens when you arrange your icons manually, like I do. I arrange things into little blocks on my desktop by category. But anyway, this manual positioning is lost when the resolution changes because it literally shrinks the size of the desktop, so those icons are pushed into the new available area... it makes total sense. I'm guessing MMF2 avoids making this happen using its full screen mode because it seems to do it through DirectX (even without DX graphics mode on. My old MMF1.5 programs from 2002/3 used to never work on computers in full screen without DX installed) which is designed for games and doesn't literally change the desktop size. The Big Box just flat out changes the resolution...
This icon messing up usually isn't noticed because people have their icons set to automatically position themselves.

At least, that's my guess. It makes sense.

 
n/a

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49567

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
24th October, 2008 at 03:33:29 -

Oh, your right! I tried it myself and it affected my icon placement, well back to the drawing board!

 
n/a
   

Post Reply



 



Advertisement

Worth A Click