Does anyone know how to force an android app to render at a lower resolution?
As it stands I can't seem to get a great frame-rate out of 1080p, I want my game to render at say a quarter the resolution while still being full-screen.
I'm not too familiar with the Android Manifest options, so I was wondering if anyone here has a clue what I can do?
Comments
I am coding using 720p as my target, and all my stuff is properly scaled when outputing at 1080p:
(CODE FRAGMENTS)
on my game screen creation I do:
stageSize=DisplaySize._720p.size();
gameStage=new StageBase(stageSize.w, stageSize.h, false);
when my game gets the reported screen size:
@Override
public void resize(int width, int height) {
float scale_h;
float scale;
float newWidth;
float newHeight;
/*
* http://www.badlogicgames.com/forum/viewtopic.php?f=11&t=3422
*/
scale = (float) stageSize.w / (float) width;
scale_h = (float) stageSize.h / (float) height;
if (scale_h > scale) {
scale = scale_h;
}
newWidth = (float) Math.ceil(scale * width);
newHeight = (float) Math.ceil(scale * height);
if (isDebug()) {
System.out.println("=============================");
System.out.println("scale: " + scale);
System.out.println("Width: " + newWidth + ", Height: " + newHeight);
System.out.println("=============================");
}
gameStage.getCamera().viewportHeight = newHeight;
gameStage.getCamera().viewportWidth = newWidth;
gameStage.getCamera().position.set(stageSize.w / 2, stageSize.h / 2, 0);
}
I then set my camera to scale to whatever is reported as the display size.
CEO, Rocket Bunny Games
CEO, Rocket Bunny Games
And then I tried Unity. Been in love ever since.
The thing about those libraries is that even if you can wrap your head around the rendering engine (which can be a challenge all by itself), you still then need to create some kind of GUI framework, particle systems, animations, level formats and editors, physics engines, audio, multiplayer, input, etc etc
You still have to build an entire game engine on top of the rendering engine, which is not trivial and the result isn't going to be anywhere near as fully featured as engines such as Unity.
I would highly recommend going with Unity. If you can't afford the price of Pro (for Android Pro that's a grand total of $3,000) you can start developing the core features of your game now on Unity Free, and then later you can create some kind of funding campaign (Kickstart or IndieGoGo perhaps) to purchase a Unity Pro / Android Pro license, as well as a few extra plugins (I highly suggest purchasing NGUI for your game HUD, it's far far better and more efficient than the built-in GUI), because the end result is worth every penny. It's pretty well optimized, too, and you get get some fairly badass graphics even for an OUYA game - it's got Beast lightmapping, light probes, occlusion culling, etc - a hell of a lot more than any of those flash engines offer.