Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Resolution pitfall


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Sollum   GDNet+   -  Reputation: 759

Like
0Likes
Like

Posted 06 August 2013 - 10:40 AM

Good evening lads,

 

 

Recently i have released an android game, few hundred of people downloaded it and THEN i understood that i screwed up.

At first, i was making my game for PC, with 480x800 ress. Then i thought "Hey, LISTEN! Lets port this to android!". So i did. I set android manifesto to support normal screens.

 

And then, after i released my game, i started getting messages that my game, looks too small on Samsung S3. Turns out its "normal" screen but with "high" density! 720p!

I was testing out my game mainly on 480p phones i had access to, and i cant run droid emulators (they take FOREVER to load and even if they load up, my application wont run on them).

 

Of course, i will simply make additional textures and UI for 720p, but i don't want to stumble into same pitfall again. How do you guys manage such things? Letting app go simply full screen screws up textures, as a lot of phones have their custom screen dimension standards (like mine for example), so i simply forced screen to go into 480x800 and have a black border around.

 

Are there any good or at least "ok" free libraries out there?



Sponsor:

#2 Sik_the_hedgehog   Crossbones+   -  Reputation: 1833

Like
2Likes
Like

Posted 07 August 2013 - 01:12 AM

Generally, the best option is to just make it resolution independent, i.e. never rely on pixel-level accuracy at all. Plan for this beforehand and then you won't have much trouble with the graphics later, just make sure you scale the coordinates accordingly (if you're using hardware rendering the GPU will even do it from you, since the coordinate range is from -1 to 1 regardless of resolution).

 

Aspect ratio is a whole different problem you'll also stumble upon, though. Simply scaling won't help you here. You'll need to plan ahead of time and see how you can arrange the objects on screen. Generally you'll want to position everything relative to something else (e.g. one of the borders of the screen, the center of the screen, putting things next to another object, etc.).


Don't pay much attention to "the hedgehog" in my nick, it's just because "Sik" was already taken =/ By the way, Sik is pronounced like seek, not like sick.

#3 Sollum   GDNet+   -  Reputation: 759

Like
0Likes
Like

Posted 09 August 2013 - 03:05 PM

I have a question about... why my images become "quady".

 

Today i bought Nexus 7.

Tried displaying simple image and it became "jagged" and "quady" for some reason.

 

thefuck.png

 

Code i use for texture loading

GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_NEAREST);
GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MAG_FILTER, GLES20.GL_NEAREST); // if i remove this line, it will look better, but i dont get it, why?
GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_S, GLES20.GL_CLAMP_TO_EDGE);
GLES20.glTexParameteri(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_WRAP_T, GLES20.GL_CLAMP_TO_EDGE);

Blending code:

GLES20.glEnable(GLES20.GL_BLEND); 
GLES20.glBlendFunc(GLES20.GL_SRC_ALPHA, GLES20.GL_ONE_MINUS_SRC_ALPHA);
//GLES20.glBlendFunc(GLES20.GL_ONE, GLES20.GL_ONE_MINUS_SRC_ALPHA);
GLES20.glEnable(GLES20.GL_DEPTH_TEST);

Thing is, texture is 400x400 and is placed as 400x400 object. But it just doesnt look right :/

 

Edit: Solved


Edited by Sollum, 10 August 2013 - 12:44 PM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS