Posted: 2nd Sep 2011 16:41
Hi all,

Just got the AppGameKit and been trying to learn up on the teir 1 side of things. Just when I thought I had worked out the resolution / display side I come across this.

If I designed my GFX at a res of 1024 x 600. Then in my project setup I set it to 1024 x 600 and lastly I use the following:

SetVirtualResolution( 1024, 600 )
SetDisplayAspect( 1024/600 )

Shouldnt I expect a sprite that is 1024 pixels wide to take up the entire width of the window (which is 1024 wide). When I try it the sprite (and any other sprites for that matter) are shrunk down leaving borders on the left & right.

Makes me think I am doing something wrong or not understanding the whole virtual resolution thing correctly.

Heres a screeny if it helps....


Thanks for any input to help me lift this fog
Posted: 2nd Sep 2011 16:44
The SetDisplayAspect() call is redundant as SetVirtualResolution() automatically sets the aspect ratio to your chosen resolution.

In this case I think the error is cause by 1024/600 producing and integer result instead of a float one, 1024.0/600.0 might fix it, but removing the call altogether should work.
Posted: 2nd Sep 2011 16:47
Thanks paul as i whas fooling around with this last night!

Then do i only nead set virtual resolution
Posted: 2nd Sep 2011 16:48
you were right it was an integer rounding issue on the aspect, and also removing it works all happy again

Many thanks