If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Poor Performance For Unity 3D and Adobe Air .apks

Good day, I am new to developing games for the Ouya console but am familiar with making and optimizing games for mobile.

I am currently working on porting some of my android phone projects to the Ouya but I've found almost all of them run poorly on the Ouya 2013 console regardless of the optimizations I have already made.

My Unity 3D first person game runs at 15-20 FPS on Ouya even though it runs at 35-45 FPS on my weak Moto G 2013 phone. Some of the ways I've optimized the game are:

• Setting the game's quality to fastest performance
• Lowering the polygon count to 20 000 polygons
• Having all lights cast no shadows
• Setting all non moving game objects to static

I also use Adobe Animate CC (flash) with Adobe Air to make sidescrollers, and I found those games run at 8-14 FPS on Ouya but run considerably better at 50-60 FPS on my Moto G. The optimizations I made were:

• Converting all the game's visuals to bitmaps
• Publishing the game with GPU rendering mode.
• Object pooling and minimum use of event listeners.

So far only my Unity 2D sidescroller game has been able to run smoothly at 30 FPS on the Ouya console which makes me wonder if there something I am missing or if the Ouya is simply weaker than most phones.

I have not used any Ouya packages or any code specific to the Ouya console for these games. I am solely using the input manager in Unity and keyboard arrow keys events in Animate CC to make the games playable with the Ouya controller.

Is there any procedures I am missing or anything more I can do? Any assistance is very much appreciated.

Thanks for the suggestion. I changed all my materials to have mobile diffuse shaders and I did find a significant improvement in the framerate. I can now get the Unity3D game to run up to 50 FPS which is far more than I expected but of course it doesn't look as nice.

For the next while I will be researching more about balancing graphics and performance in Unity. I'm still very new to it. However, this still leads me to wonder why I have such poor performance for Flash Mobile Games in comparison to Unity Games.

I have a basic sidescroller prototype below with only an animated character and a scrolling background. Publishing it as an .apk with GPU rendering usually brings the frame rate to 60 FPS on other devices but not on the Ouya. I only get around 14 FPS when moving the character.

you need to give more information, you are not giving us much to work with.

granted you are giving us what appears to be a demo of your game, but i dont have the time to plug my ouya and all that is required to run it.
how about some screenshots?

also, you are changing the subject talking about 2 different games, xD.

ill answer you about the 3d game, since i know nothing about flash.

long time ago i was working on a 3d game, and did a build for ouya, i had over 130.000 poligons on screen and it was running at 42 Fps.

how? well you have to write your own shaders. Unity shaders are pure crap.

if you dont know anything about shader, its a good time to start learning, download the source code of the unity shaders, and start by editing them (not that hard).

i can give a quick tip, there is a macro for multiplying the uv of the texture by its tiling (Cant remember the name now), i doubt you are using any tiling at all, so it should be safe to remove from the shader.
you will gain an instant 5 fps by doing so.

you need to keep in mind when working with ouya:

- the OUYA has only 12 unit shaders, so any pixel processing is forbidden. even post-processing.... especially post processing!!!
- 3D and 1080p is too hard for the device, unless you have excesively simple textures and/or no lights, i suggest you to reduce resolution to 720.
- the same goes for the shadows. they are forbidden unless you have very simple scenes, and even then you will feel the pain
- dinamic lights are plausible, if you optimize your shader but keep in mind that you cant have more than 4.
- unity lightmaps will give you a very nice looking scene, but they will eat your fps, if you cant optimize your shader then forget it

suggestions for optimization:
- reduce the range of the lights and increase their strenght, this will reduce the amount of poligos it affect hence increasing fps.
- remove as much transparencies and cutout as possible (trees and stuff)
- no reflections.
- ambient light source should be a color

I did what you suggested and made my own shader using the mobile diffuse shader as a reference. I agree the standard unity shaders are not very good for performance at all. You have definetly given me a good amount of infomation to research and I apperciate the time you put into writting up those guidlines for me.

It may not be useful now, but to the answer the questions from before:

Which shaders are you using?
Currently, I am using my own version of the mobile diffuse shader for all my materials except for the light bulb material. It has a standard shader for an emissive light effect.

How simple/complex are your materials?
They are simple materials with bitmaps with no specular or reflections. The tiling is just the tiling I used in 3DS max when I made the models. It shouldn't be anything over than 5. https://drive.google.com/open?id=16V...drIqkUojwRY3Lh

*ver important* how many drawcalls you have?
If I am not mistaken, draw calls are how many objects are drawn to a scene but I haven't found out how to find that in Unity yet. Will this rendering statistics window do?https://drive.google.com/open?id=18v...l8D0UyngGM1Gvz

switch all your shaders to "unlit" then tell me how many fps you get?
I got 45-50 Fps but it didn't look as nice as mobile diffuse shader, so I used that shader instead and got similar performance with better visuals.

I should have enough suggestions to research for the next while and I believe I will be putting a hold on flash mobile development unless someone else who is familar with Adobe Air replies. Thank you for your help meganuke.

I opened your Flash-File in Flash Professional CS6, and maybe, somethings are not handled well in CS6, because it's not Animate CC, but ... here some ideas:

- Your project is in Portrait-Mode (try 720p Landscape, crop the rest)
- don't use to much layers of movie-clips in movie-clips (don't nest in nest in nest ... if possible)
- If you are using "Smart-Objects", maybe convert them to standard Bitmaps, you know your export-size.
- don't use dynamic text, if possible
- can't say, if you are exporting to "use CPU" or "use GPU"

That were my first impressions. Didn't use Flash for a long time and had to figure out some p12-certification-things. I also got a warning. So a compiled SWF or APK would be nice for us, to test it easier. (you don't have to include all levels or so)

There was a warning because of some compression. Sometimes Flash could get realy slow if you "generate" your Movie-Clips on the fly or use massive transparency effects.

Hope, I told you now nonsense and it was not to late, since this post is from last year :-)