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 / Graphics Sizes

Author
Message
blueFire
13
Years of Service
User Offline
Joined: 23rd Jan 2011
Location: North Carolina
Posted: 5th Feb 2012 23:15
I have set the display aspect to 1.33 in an effort to try to create all the graphics to look correct if the display is 1024x768.

When I create the graphics to make them look right on all devices on all screen sizes I am assuming I need to set the graphic's width at 1.33 times what the height is.

For example, if I had a graphic with a height of 100 I would need to make its width 133.

Another example, if I had a graphic with a height of 70 I would need to make its width 93.

1. Is this correct?

2. Is there anything else I need to know to make the graphics look correct (and the same) on all screen sizes?

Jason
Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 6th Feb 2012 00:08
I have been working on solutions for this for the past month or two now ranging from scaling everything in proportion to the screen from creating my own borders (to replace black borders). I've come to the conclusion that there will always be a 'catch' to run an app on all screen sizes.

I've narrowed it down to 3 basic 'catches':
1: The sprite is either squished or stretched. e.g a circle will become an oval.

Small example (try different resolutions via setup.agc ):


2: Scale the sprites but keep their sizes in proportion. The problem with this is background sprites may have parts of the image not visible on the screen and other sprites will appear slightly larger or slightly smaller than normal.

3: Put up with borders.

I'm afraid there will always be a catch but if your artist (or yourself) is clever, you can minimize the effects of these issues.

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 6th Feb 2012 09:56
Another way of setting the size of a sprite is like this.
setSpriteSize(spriteID, 80, -1)
...or
setSpriteSize(spriteID, -1, 80)

The first example sets the width of the sprite to 80 and tells AppGameKit to set the height automatically, the second example sets the height of the sprite to 80 and tells AppGameKit to set the width automatically.

I set the size of all my sprites this way (pretty much).

Login to post a reply

Server time is: 2024-05-05 23:32:42
Your offset time is: 2024-05-05 23:32:42