Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Different device screen aspect ratio - how it works?

Author
Message
fallen one
17
Years of Service
User Offline
Joined: 7th Aug 2006
Location: My imagination!
Posted: 29th Aug 2011 14:25
I am curious as to how the App Game Kit handles the different screen sizes of all the devices. Do you build to a set aspect ratio, then for those devices that do not run at that specific aspect ratio it sticks a black bar at the top or bottom or both? Or does the AppGameKit stretch the image to fit different aspect rations? Just how does the AppGameKit handle this part of cross platform compatibility?


Steve O
AGK Bronze Backer
20
Years of Service
User Offline
Joined: 24th Feb 2004
Location: The Netherlands
swissolo
14
Years of Service
User Offline
Joined: 9th Jan 2010
Location:
Posted: 28th Sep 2011 01:06
I'd actually like to amend this question, because it doesn't deserve a new thread, but has anyone noticed that changing the AppGameKit aspect ratio actually just squishes the viewport vertially? 16/9 has properly scaled sprites, but you can tell by their rate of movement that they aren't right.... What's up with this?

swis
No, it's not pokemon.
Joined: Tues Dec 16th 2008
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 28th Sep 2011 01:41
First, you don't need to do a SetDisplayAspect() if you are using a virtual resolution, AppGameKit handles the aspect for you, and it does add black (or a color) around the edges if your device size in setup.agk is not the same as your actual device.

Second, if you DO put in a SetDisplayAspect(), make sure it's a float value. 16/9 should actually be 16.0/9.0 to make a good value.

Funnell7
12
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 28th Sep 2011 02:23
I seem to be having problems with the SetVirtualResolution... Say for example I orginally created a portrait project, but later decided to change this to landscape. By changing the setup file to 480, 320 and setting SetVirtualResolution to 480, 320, makes things go all squiffy... Like if I set the sprites y co-ordinate to 250, for some reason this is off the screen (the sprite is only 50x50) so this should be within the 480, 320 boundries... Anyone else noticed this or am I doing something wrong? Many thanks!
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 28th Sep 2011 03:47
He said "squiffy", heh heh.

If you could post the code that shows what's wrong, we can try to help, but...

of course changing the virtual resolution will make everything look different, all the old coordinates no longer appear in the same place.

swissolo
14
Years of Service
User Offline
Joined: 9th Jan 2010
Location:
Posted: 29th Sep 2011 00:20 Edited at: 29th Sep 2011 00:38
Oh Rich, I mean that the view should be sort of like the view you see out of the window of a tank (although that's nothing like how it's being applied) Wider horizontally, but squat vertically. (So, black bands really just remove some of the possible viewspace is what I'm saying) I've added setDisplayAspect to show that 1.0 actually does output the correct scale, yet 16.0/9.0 (was using that BTW ) doesn't. The 16/9 view is the width of the screen placed vertically, then smashed down. I was wondering if there was a way to alter this... Do I need an image to show? I guess I'm asking if there is a way to alter the VIEW's aspect ratio.

Edit: And a little extra I might want to add to the bug reps, the setSpriteCollideBit() command is missing

swis
No, it's not pokemon.
Joined: Tues Dec 16th 2008

Login to post a reply

Server time is: 2024-03-29 02:32:16
Your offset time is: 2024-03-29 02:32:16