The Daily Click ::. Forums ::. Klik Coding Help ::. Resolution Problem
 

Post Reply  Post Oekaki 
 

Posted By Message

Zephni

My other cars a Balrog

Registered
  17/10/2007
Points
  4019

Has Donated, Thank You!VIP MemberSonic Speed
6th May, 2009 at 14:52:16 -

Hey guys.
What im trying to do is have the app width and height quite small. and then when the app opens it doubles in size and resizes to fit window size.
if that makes sence... It gives it a good effect (i think)
games that do it that i know are the underside, and that santa 2 game thats just come out.

BUT, it seems you need to use the right sizes.. because when it goes to the double size sometimes stuff squishes a little bit in places and just doesnt look right...

SO what should the X and Y size be that i start with? like 220x180 or somthin? need answers, but maybe im just doing it wrong.. :s

i should really know this stuff but im dumb ok.

 
dont make me divide by zero...

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
6th May, 2009 at 15:02:30 -

The standard aspect ratio is 4:3. So take your X value, 220 and multiply it by 2. 440. Then, since 4 divided by 3 is 1.333 (repeating) you multiply 440 by 1 and one third.

That's about 586.6. You might want to pick a nice number that doesn't result in a decimal.

Whoops hold on let me rewrite it


Edited by OMC

 

  		
  		

Zephni

My other cars a Balrog

Registered
  17/10/2007
Points
  4019

Has Donated, Thank You!VIP MemberSonic Speed
6th May, 2009 at 15:04:07 -

Thankyou mr crazy accordian man!

 
dont make me divide by zero...

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
6th May, 2009 at 15:04:36 -

The edit is to divide instead of multiply. Here's the rewrite:

The standard aspect ratio is 4:3. So take your X value, 220 and multiply it by 2. 440. Then, since 4 divided by 3 is 1.333 (repeating) you divide 440 by 1 and one third.

That's about 330. You always want to pick a nice number that doesn't result in a decimal.

You're welcome!



Edited by OMC

 

  		
  		

Zephni

My other cars a Balrog

Registered
  17/10/2007
Points
  4019

Has Donated, Thank You!VIP MemberSonic Speed
6th May, 2009 at 15:17:54 -

Hmm, but if its divided by 1.3 its always going to be a decimal?...

i still cant find an X and Y that dont make the pixels go funny when it doubles..

 
dont make me divide by zero...

Zephni

My other cars a Balrog

Registered
  17/10/2007
Points
  4019

Has Donated, Thank You!VIP MemberSonic Speed
6th May, 2009 at 15:20:21 -

I just got rid of the header at the top and it sorted the problem :s

 
dont make me divide by zero...

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
6th May, 2009 at 15:37:06 -

Well are you using the window control object? I believe that counts the header. Try just setting the application window size in the settings. You've got to divide by 1 and one third, (1.3 repeating) so you can get numbers that don't have decimals. If you use a calculator, just put a ton of 3's. (For instance, 640 / 1.3333333333) and it will approximate the value you need. If the decimals are closer to 0 or 9 than 3 or 6, you're good. n_n

 

  		
  		

Poobical

Has some jaffa cakes in his coat pocket 3

Registered
  27/11/2008
Points
  54

360 OwnerVIP MemberLOL SignSnow
7th May, 2009 at 00:11:46 -

What I usually do is look at 320 x 200 idea which when full screened and stretched looks proportional. Then say if I want a bigger screen I'll make sure that the height is always 120 less then the width. So like 450 x 330. It usually works for me.

 
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
7th May, 2009 at 01:21:54 -

That's about a 1.36 ratio, which is close since the numbers are still relatively small. That will work until you get to bigger numbers, the proportion needs to be the same.

For instance, 1024x768. 1024-120 is 904. Way off.

 

  		
  		

Zephni

My other cars a Balrog

Registered
  17/10/2007
Points
  4019

Has Donated, Thank You!VIP MemberSonic Speed
7th May, 2009 at 13:30:10 -

Basicaly i was just being a dumbass because i didnt realise that the window object was including the header.
But ive learnt somthin anyway coz i didnt realise that the proportion was ment to be 4:3
So flippin happy days i say.

Dont do drugz

x

 
dont make me divide by zero...

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
7th May, 2009 at 13:44:31 -

*Starts singing two different Happy Days songs*

 

  		
  		

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49566

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!
7th May, 2009 at 16:36:38 -

Here's a bit of code you can paste into your resizing action to make the window double the original resolution and automatically center it.

-Set Horizontal size to: (ClientWidth( "Window Control" )*2)+(WinXSize( "Window Control" )-ClientWidth( "Window Control" ))
-Set Vertical size to: (ClientHeight( "Window Control" )*2)+(WinYSize( "Window Control" )-ClientHeight( "Window Control" ))
-Set Horizontal Position: (ScreenXSize( "Window Control" )*0.5)-(WinXSize( "Window Control" )*0.5)
-Set Vertical Position: (ScreenYSize( "Window Control" )*0.5)-(WinYSize( "Window Control" )*0.5)


Then you could go even farther with it, and make it where the window starts invisible then when it's repositioned make it visible again, so that the user won't see it jump.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click