jPCT-AE - a 3d engine for Android > Support

Different screen resolutions

(1/1)

Kaiidyn:
Just some thoughts here.

I am developing on a SGS with a screen res of 800x480...
I was thinking about blitting etc for graphical user interface (menu, hud, etc)
But how can I take different screen resolutions into account, eg 480x320...


edit: I got a loading texture 800x480 that I want to blit, but Texture says that 800 is unsupported width, how would I go about making loading texture?

EgonOlsen:
The smartest solution would be to do the blitting in normalized screen space ([0..1]) and calculate the real screen coordinates based on the actual resolution. In Alien Runner, i didn't use normalized coordinates but i recalculate coordinates based on the actual resolution compared to the resolution that i used for development. For example a blit to x=400 on my 480*320 screen is blitted to 400*(800/480)=666 on a screen with a width of 800.

BennyFrandsen:
Hey guys,
i am from germany, therefore sorry for my poor english :'(
I started with jPCT few weeks ago and i also have a short question about screen resolutions.

The 2D Interface blitting thing is clear but for example i load a skybox modell and place this far away . The only thing i have to do to make this screen size indepent is to calculate for each screen size the scaling value from the 3dModell.
On a device with a 480x320 i would use for example the scaling factor 2
On a device with 800x480 i would use the scaling factor ~3.5
Is this the correct way?
Thanks

EgonOlsen:
3d will look the same no matter which resolution the output device uses (just more jagged). No need to scale it.

Navigation

[0] Message Index

Go to full version