Hello,
I know that there are many postings about the screen resolution. I read many of them but did not find enough information.
My situation:
I programmed a 2D game that is already almost completed. I used DRAWSPRITE, DRAWANIM etc. and all the sprites are optimized for a resolution of 800x480.
Now I want that the game runs in FULLSCREEN on all devices.
I tried to use create a virtual screen of the size 800 x 480 created with the command CREATESCREEN and resize it to full screen by using STRETCHSPRITE and GETDESKTOPSIZE.
Of course, it looks not nice when having a big PC display.
Therefore I decided to use 1920 x 1080 as standard resolution and shrink the screen to the display resolution of the device by using STRETCHSPRITE and GETDESKTOPSIZE.
It seems to work on PC, but when trying an Android smart phone with a display resolution of 800 x 480 it does not work. I just see a part of the screen insted of the complete screen. The shrinking seems not to work on Android 2.3.x.
My questions:
1. What do you think about my idea to use 1920 x 1080 as standard resolution and to shirnk it to the device resolution?
2. Are the compatibility issues?
3. Are there performance issues on smart phones?
4. There are several different ratios between width and height of various screen resolutions. What is better: to resize to full screen even if this means to distort the graphics in case of some resolutions or to use black borders? What looks better?
My target devices are Windows PC, iOS and Android 2.3 and newer.
Thanks for any advices in advanced! :-)
Best wishes,
Miroslav
use this (GREAT) system to resize the sprite: http://www.glbasic.com/forum/index.php?topic=7145.0
:booze:
N.B: This system use the polyvector!
It all depends on the kind of 2d you have going.
1- To use 1920x1080 you might struggle on less powerful machines, If your game is native 800x480, you have no gain and scaling costs processor too. So unless you need all pixels on the 1920x1080 resolution, I´d avoid it.
2- I think not.
3- There may be, is your game an action type in 60fps.
4- This issue almost deserves a self forum :P It depends on your game. Mine is a single screen action game in 320x240, my solution was to up the resolution to 428x240 and acomodate gfx without any scalling. It seems to fit all target resolutions I need on android without distortion. On 320x240 displays, I simple cut off bits on the borders. Code also takes into account the play area. This issue is actually game related. If your game is top down for example, you can show more of the map.
Take a look at this tables to have a better idea on resolutions to check:
http://screensiz.es/phone
Scaling from high to low on devices cost very much perforcement, yes. You might want to uses a halve texture as well and scaling from that.
In greedy mouse I'm used 3 set of textures to scaling from (512x512, 1024x1024 and 2048x2048 example). Howover it's can been compliced as well and can been a but nightmare.
If you uses offbuffer, you might see slowdown issues too.
Hello,
Thanks for all your advices!
About my game:
It has no scrolling, but there can be many sprites moving on the screen, up to 30 sprites.
The game is optimized for 60 FPS.
The sprites are seperate PNG images that I load with LOADSPRITE or LOADANIM. The background of a level is one big PNG image.
If I use the Z Project and optimize the graphics (background images and sprites) for 1920 x 1080, will there be performance issues on slow Android smart phones with only one CPU core?
I read that the Z Project uses faster strech methods than when scaling the whole virtual screen.
But would it be fast enough?
Best wishes,
Miroslav
There might be a hit on performance. It depends on how heavy your game is and how fast this phone can handle.
It is hard to know, If you need a precise answer best is to do a test code prototype and run on the target devices just to check.
It's allways hit perforcement on lower powered devices. Ouya is a example, which I'm had that issue, but got fixed later. Its seen filtrate was limited on 1080p, so I'm fixed surface to 720p, and then it's ran back to 30fps).
It's a great idea to do a frameskip thing, so the game can run correctly on lower framerate (example 30fps). You could also uses two set of textures, other set in the half resoulution and scaling from there.
But that depend on your game. Erico's is a retro lowres game and is a no issue upscaling that, even it's blocky, but it's with that in mind.