ZenGL is discontinued,but stable enough for rapid Android games development using Pascal programming language. There is a function scr_CorrectResolution which keeps aspect ratio on all DPIs,but leaves empty black borders. There should be some tricks for adjusting game screen perfectly.
Vector graphics is the best way to go but I don't really know what sort of game your planning. with opengl you can change the viewport/aspect but I don't know what that would really look like.
google would be your best source.
http://developer.android.com/guide/p...s_support.html
There is one method, but you need to modify the code of ZenGL and do some calculation E.g. you have real resolution 1280x720. This is a 16:9 aspect. Take any demo, there is resolution 800x600. For aspect 16:9 you need only 800x450. So, you call in your Init this:
But as a result you won't see the bottom of scene. E.g. you need to see center of it, so open scr_CorrectResolution and add there this line(before SetCurrentMode):Code:zgl_Enable( CORRECT_RESOLUTION ); scr_CorrectResolution( 800, 450 );
-75 - this is ( 600 - 450 ) / 2. So, if idea is clear then you can modify the code a bit an extend it for your needsCode:scrAddCY := Round( -75 * scrResCY );
Last edited by Andru; 08-05-2014 at 07:25 AM.
Thanks for the answer. I will try to center all the UI in safe area and leave some pixels around for the background.
Mystic Diary - Hidden Object has good stretching on all resolutions with status bar and without it.
Mystic Diary has been made without saving the aspect(this is a default practice of published on BFG games), but because of content it's not so clear
Bookmarks