Screen Resolutions

Previous topic - Next topic

tagoror

I had a problem submitting our game to HP App Catalog for a screen resolution problem. The app does not fill the entire screen in HP Pre 3 and for HP Veer parts of the app are cut off due to the small screen size.

We can prepare the graphics and adapt the game for several screen sizes. I checked GLBasic allow me to detect the desktop size with " GETDESKTOPSIZE ", but there are any way to work with only one set of graphics? I would like to avoid to prepare multiple versions of the graphics for the same game.

Our game is in 2D. Any idea?

Regards and thank you,

Javier

MrTAToad

I dont think anyone here has a Pre 3, so the results may vary, but you could scale the graphics depending on the difference between the Pre 3 and whatever you originally designed the graphics for.

For example my graphics were designed for a 640 x 480 screen, so on a 320 x 480 resolution they would be scale by 320/640 (the largest of horizontal and vertical values).

Crivens

I posted a routine a little while back that resizes everything to the target resolution. It can look a little squished on different ratios, but it seems to work. http://www.glbasic.com/forum/index.php?topic=6415.0Must update it to allow a progress bar or something as this nicely resizes everything when first loaded and then uses the resized versions for ever more (or until you make a new release with a new version number) so is pretty quick (after the first load) and uses up the least amount of memory for your resolution.

Note that it keeps the full alpha settings, but there appears to be a problem with colours for jpg files, which looks to be a GLB problem. PNG works fine though.

Cheers
Current fave quote: Cause you like musicians and I like people with boobs.

monono

I go with the "largest of horizontal and vertical values" as MrTAToad. If u just calculate the positions from the center or add the offset from the left to every calculation you can even have different aspect ratios. For that you have to catch if the longest side of your first resolution stayes the longest in the final aspect ratio. Otherways you have to use x1/x2 instead of y1/y2 for scaling. I don´t have much mobile application experience, but on win I can run my apps in any resolution or aspect ratio that way.