Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Rendering Optimization

Discussion in 'Windows' started by Mintah, Aug 28, 2013.

  1. Mintah

    Mintah

    Joined:
    Aug 20, 2013
    Posts:
    20
    Hello All,

    I'm having a serious problem getting high frames solely on Windows Phone 8. My game runs fine even on old iOS devices and low-end android devices. I've tried the obvious reducing texture size, still nothing... slow frames! I remember in the Unreal Engine there was a way to reduce the render resolution on the device itself when exporting to iPhone; is there a way to do that for Windows Phone? I have a feeling the display's resolution is too high for the hardware in most Windows Phones phones.

    or Could it be that there are certain method calls that worked better in Mono.net than in Microsoft's framework, and I'm missing out on a few things?

    Thanks,
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,524
    Hello, are you building the game in release/master configuration?

    Furthermore, did you try using the profiler to find out the root cause of the problem?
     
  3. Mintah

    Mintah

    Joined:
    Aug 20, 2013
    Posts:
    20
    Yes the game is being built in the master config, unfortunately though we are using Unity Free to build this game so we don't have the profiler ...
     
  4. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,109
  5. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,524
    Which phones are you testing on? If the phone gets hot, it's the CPU that's limiting you. If it doesn't, it's most likely the GPU.
     
  6. beartrickey

    beartrickey

    Joined:
    May 27, 2013
    Posts:
    2
    I'm seeing the same performance gap between iOS/Android and WP8 as well. I'm using Unity 4.2.1 Pro, building Master versions in Visual Studio, and testing on a Nokia Lumia 920. I haven't been able to profile thoroughly yet, but I'll post my findings here when I do.

    As Tautvydas mentioned, the Lumia is heating up quite a bit, so I imagine I'm slamming the CPU a bit too hard. I read in this thread that accessing .gameObject or .transform are heavy hitters, so I'll try to cache them as recommended by Tomas. I also forced my textures to a compressed format, which seemed to give me some performance increase, but not significant enough to call it a day.

    Here is another WP8 performance related thread you might want to check out:
    - http://forum.unity3d.com/threads/199964-Overhead-at-50-drop-down-fps-bad-performance
     
  7. beartrickey

    beartrickey

    Joined:
    May 27, 2013
    Posts:
    2
    To give a quick update:

    For whatever reason, I'm unable to connect my Lumia to the Unity profiler (WP8Player doesn't appear in the Active Profiler pull down menu, and entering the phone's IP address manually doesn't seem to connect it either). I profiled a bit in Visual Studio, and it seems that perhaps setting the color of objects (UnityEngine.Mesh.set_colors32) might be the bottle neck for our specific code. We have a ton of tiny interactive sprites on screen that need their colors and opacities changed constantly.

    Also, for reference I'm using 2D Toolkit with the tk2d/PremulVertexColor shader for most sprites.