Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Unity 3 iPhone remote performance

Discussion in 'iOS and tvOS' started by jimbobuk, Jul 17, 2010.

  1. jimbobuk

    jimbobuk

    Joined:
    Dec 31, 2008
    Posts:
    55
    Hey folks.

    I've compiled and made the new iPhone remote app but sadly its performance is very subpar, even on my iPhone 4!! Not tried it on anything else yet.

    Basically the inputs you receive from it are very jerky and slow.. The video is also slow and jerky.. I wouldn't mind the latter so much but i know what this app SHOULD look like having ran it on my 3GS for so long.

    I used to have issues with different wifi setups but since getting an airport extreme N those problems disappeared with the old remote.

    I can get smooth input by turning off the video, which is something, but not exactly ideal for pressing onscreen buttons.

    Anyone else have any experiences with it.. I compiled it under OS4, should i try perhaps targetting 3.2 instead. I will try it on my 3GS to see if its an iPhone 4 related issue.

    Cheers
     
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    its not "even" on your iphone, its especially because your iphone4 assuming you set the game window in the editor to iphone 4 not to regular iphone resulution, because the data just don't fit through the wifi.

    The easiest way to overcome is to switch to regular iphone resolution or to just switch off the rendering on the iphone remote (switch toggle before joining your unity editor machine).

    I don't see the point of iphone 4 preview anyway cause it is screensize wise equal to 480x320 on all other iphones, so you can test with the same size too in the editor, you won't get more visually on the device but the editor will look significantly differently cause its screen has the space to show it at twice the size

    Having N networking won't change it. People have a total missunderstanding of how performant wifi is.

    An example: g wifi is 54mbit. Technically though you will NEVER get more bandwidth through it than 9mbit (or slight over 1mb/s).

    that being said, regular cable network isn't any different. A 100mbit cable has a normal usage bandwidth in the range of 20-40mbit, thats why gbit and 10gbit were invented.
     
  3. jimbobuk

    jimbobuk

    Joined:
    Dec 31, 2008
    Posts:
    55
    Hey thanks..

    I just tried dialing down to normal resolution in the editor, and sadly its still the same performance, ie. bad.

    I think having iPhone 4 as the setting in the editor wont make much difference as the video resolution streamed out is not changing, its no where near old iphone res, let alone new so it just downscales the video before encoding and sending.

    As i said i'm used to it performing nicely with video with the older remote builds..

    Do the older remotes work with Unity 3?

    Stil not tried it on different devices yet.

    As for wireless N, I don't know how well the iPhone 4, and iPad can actually use their new wireless N ability.. my point was that a router i was given by my broadband provider had terrible performance with remote, I don't know what it was doing with it. But since switching to the airport it all worked really well.

    Having wireless N is also really useful as it sits at 5ghz band (hopefully, i know my macbook does) which gives it lots of space compared with 2.4ghz and all my neighbours routers.
     
  4. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Well most important: there is no video streaming. It streams screenshots of the game window, image by image.

    And no the old remote only works with the old unity.
    That being said, the new one works worlds faster and more solid than the old ever did. if it does not I would check your surrounding, if something interfers, if your wifi access point is not prevent it from running fine etc. Check especially if it allows bonjour or if it has something applied that impacts it as the remote talks through bonjour.

    Also, worst case thing that can happen is naturally that you work on a macbook or alike yourself, thats wifi connected and then try to talk to it through the iphone ... thats a horrible idea technically cause that means that the phone is likely very close to your mb with its wifi and is hit by hefty interferences ... ensure at least 1, if possible 2m between them for optimal performance.
    (also ensure that you don't have your ipad close to it. out of my experience the ipad wifi is a massive interferance bomb. here for me not only for the wifi com between iphone <-> router < cable > mbp but also for my rf bound wireless keyboard)

    I for example never had much joy with adhoc connecting to my macbook pro, neither with the old nor the new remote but on my wifi here, it runs smooth as silk and super performant and thats only a g wifi.
     
  5. jimbobuk

    jimbobuk

    Joined:
    Dec 31, 2008
    Posts:
    55
    Yeah just confirmed that the older remote doesn't work.

    And agreed, aside from this performance niggle I do like the look of the new remote.. Remote always did used to sometimes just fail to connect.

    Anyways.. My dev machine is connected via ethernet so its not going wifi to wifi.. though my macbook pro is online. I don't think that really matters, but i'll try it a completely quiet environment next time i'm using it.

    I've just compiled the same new remote onto my 3GS and the performance is much better, much more like i remembered.. ie. its working well.

    So it looks like a running on iPhone 4 issue to me.

    The difference isn't massive but its annoying.. where as the 3GS will let your touches move across the screen nearly as responsively as running the game locally the iPhone 4 just stutters and so the movement jumps every second or so instead of panning smoothly. :(

    I don't think its a network issue as the two were tested in the same place/time.. the router is literally 1m away and working well.
     
  6. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Thats how its setup here too + even a Logitech wifi keyboard.


    Cool thing :)

    Sounds like it yeah.
    Well it has to be kept in mind that the iphone 4 has 4 times as many pixels to decompress if it is an iphone4 sized image thats sent in, yet the performance of the cpu is only 33% higher (the A4 in the iphone4 was benchmarked to run on 800mhz, not on 1ghz as the ipad one), not 400% ;)

    The remote has a toggle button before you choose the machine to connect to. you can disable the rendering completely for example which makes a massive difference on input handling performance.


    And I agree, sounds more like a "too many pixels for the only slightly better cpu" issue ie its incapable to decompress the whole pixel data while keeping up handling and sending back input

    have no iphone 4 though as they were not released in switzerland yet. The non-US wave 2 areas are at the time still waiting to hear either price or dates at all
     
  7. jimbobuk

    jimbobuk

    Joined:
    Dec 31, 2008
    Posts:
    55
    the video (or series of still images) on the iPhone 4 is the same as on 3GS... very low resolution and blocky, as it should be. So whilst the retina display has that increase without the increase in rendering performance to match, that's not the problem that i'm seeing.

    It does seem the A4 is running at 800mhz or so, still for pixels its not really the CPU that matters its the GPU fillrate, and i still don't think we've got clear numbers on how much of an increase has been given. Probably similar to the CPU bump, certainly not enough as it needs for 3D rendering to not suffer.

    I've hit a problem on iPad and iPhone 4 where by my simple circular blob shadow using the standard iPhone Unity assets halves my framerate.. I'm aiming at near 60hz and it drops down to 20 or so when the shadow is there. Not sure what costs that projector should have but its disappointing and obviously indicates at both of them being woefully under power to render at their resolutions :/
     
  8. helios

    helios

    Joined:
    Oct 5, 2009
    Posts:
    308
    jimbobuk, you are not alone. I experience the same thing. Input is extremely laggy and it is not nearly as responsive as 1.7. I am also using an iPhone 4, but am using the standard resolution. Not really sure whats causing this..