Close
Advertise Here
Results 1 to 9 of 9
  1. #1


    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.

  2. #2


    what you have mentioned as "optimization" i would call it "common sense"

    its not really mobile optimization.

    how many lights do you have in your scene?
    which shaders are you using?
    how simple/complex are your materials?
    *ver important* how many drawcalls you have?

    switch all your shaders to "unlit" then tell me how many fps you get?

  3. #3

  4. #4


    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.

    Is there anything more I can try?

    Sidescroller Prototype Adobe Flash

  5. #5


    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

  6. #6


    Quote Originally Posted by meganuke View Post
    how many lights do you have in your scene?
    which shaders are you using?
    how simple/complex are your materials?
    *ver important* how many drawcalls you have?

    switch all your shaders to "unlit" then tell me how many fps you get?
    also, you havent answered those questions

  7. #7


    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:

    how many lights do you have in your scene?
    1 spot light set to baked and no shadows, and 1 directional light situated outside the room with the same settings.
    https://drive.google.com/open?id=1Hu...t1xo5aucbBn1Zx

    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.

  8. #8


    Drawcalls = Set Pass calls, sorry i forgot how unity keeps changing names xD

    you are not using tiling at all, remove the tiiing macro, it was called TransformSomething if i recall. it should be along the Tex2D instruction, something like:

    fixed4 color = tex2D(_MainTex, UNITYSHITTYMACROTRANSFORM(uv) );
    or similar....
    just remove the macro and use the uv coordinates you already have\

    also you said you are using a baked light.

    as i said before, lightmaps will kill your performance, iin this case, that scene is very simple, so you wont have any problem, but if it grows you will see a slowdown.

    got to the lightning section clear the lightmaps and disable all that realtime, global illumination and mixed lightning stuff. that things are not OUYA friendly.

    and finally good luck! and keep us up to date with your progress.

    EDIT:
    TRANSFORMTEX!!! I remembered!! thats the one!! just remove it
    Last edited by meganuke; 2 Weeks Ago at 05:23 AM.

  9. #9


    oops, i gave you misleading info xD sorry!!! (its been some time since i wrote those shaders)

    the lightmaps are not what are going to eat your fps, but the new PBS global illumination things!!

    burn the lightmaps then access them in your shader

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •