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
   

Post Reply



 



Advertisement

Worth A Click