Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to lower screen resolution on mobile to render app faster? #35

Open
CrazyFlasher opened this issue Nov 7, 2019 · 4 comments
Open

Comments

@CrazyFlasher
Copy link

For example mobile screen is 2000x1500, but I want to run app fullscreen with 320x240 resolution for better performance. But strech to fullscreen.
Is it possible? If yes, then how?

@peteshand
Copy link

Should be possible, but sorry don't have an example for you.

If you're looking to improve performance make sure you have anti aliasing turned off and also if you're targeting html probably worth taking a look at changing 'initial-scale' meta:

@CrazyFlasher
Copy link
Author

I am targeting Android. I did this

<window background="0x000000" orientation="landscape" allow-high-dpi="false" color-depth="16" resizable="false" />
	<window width="640" height="480" />
/**
	 * stage listener for resize events
	 */
	private function onResize(event:Event = null):Void
	{
		trace("Lib.application.window.scale ", Lib.application.window.scale, stage.stageWidth, Lib.application.window.width);
		view.width = Lib.application.window.width;
		view.height = Lib.application.window.height;
		awayStats.x = stage.stageWidth - awayStats.width;
	}

view.width will be in this 2650 instead of 640.

if I remove this lines:

view.width = Lib.application.window.width;
view.height = Lib.application.window.height;

view will be smaller than stage

@CrazyFlasher
Copy link
Author

I need to strech view3D somehow with quality losses, but without performance losses

@jgranick
Copy link
Member

jgranick commented Nov 7, 2019

I'm not sure how SDL handles this but you might be able to do display mode switching

I think the API in Lime is like this (when fullscreen):

var display = stage.window.display;
var supportedModes = display.supportedModes;
for (mode in supportedModes)
{
    // Select the mode you want
    display.currentMode = mode;
    break;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants