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

Unity is Coming to the iPhone!

Discussion in 'Announcements' started by HiggyB, Mar 31, 2008.

  1. EducaSoft

    EducaSoft

    Joined:
    Sep 9, 2007
    Posts:
    650
    I hope that there will at least be www class so we could save our highscores online for a game.

    I could indeed also live with the fact that multiplayer networking would be advanced only, as long as at least www class could be used for some basic stuff.

    + some client side saving or game state data.
     
  2. Martin-Schultz

    Martin-Schultz

    Joined:
    Jan 10, 2006
    Posts:
    1,377
    Right, the www class is essential for highscore saving.
     
  3. zumwalt

    zumwalt

    Joined:
    Apr 18, 2007
    Posts:
    2,287
    Personal iPhone development expierence to date and some questions as it relates to the programming direction of Unity on the iPhone.

    For the most part, the iPhone development is straight forward, be it a bit odd in some aspects, it follows rules within cocoa rather nicely, networking (life networking) is doable on it although point in fact the Edge network down right bites. Depending on the bandwidth being used on the Edge network, sometimes you can't browse normally using the browser they give you, AT&T is unlike Verizon in that AT&T is shared data/voice/text across the same 'line' per say. Verizon on the other hand has a dedicated data signal so less degradation.

    Data test rates for AT&T are at 5.6k to 22.3k per second where as Verizon sits at 180k to 320k per second (tested with USB Air cards on both iMac and MacBook Pro sitting side by side for 16 hours straight).

    iPhone design is quick, get in, get out, get done.
    Now to move on to some more specifics. Models, damn models.. ok, I have loaded in some models and tested some animation on the iphone and found that having something under 1500 polies for a single model is about the highest you would even want to think about if you start going crazy in number of objects per scene.

    That said, reducing the model itself down by using tools to downgrade the number of polies to about 450 helped tremendously. Fact in point, the less you have on the screen going on at any given time, the less battery you will suck up.

    Battery life for a simple game where I had 25 objects at between 12 and 700 polies, was almost 15 minutes.. This then now brings me across to the fact that was without sound or particles.

    Adding those in reduced the battery life to about 11 minutes.

    Holy logic hell..
    You can use SOAP just fine with iPhones and you can store small amounts of data about the users game on the iphone. Seriously don't even bother about protecting the game data, just flat file it serialize it and don't even think twice about security for it, its not worth the nickle of time to spend.

    With regards to Unity, what I want to know, can I build scene's for the iphone and do level loading like I am doing now, and possibly have some sort of logical warning limit that checks my poly count and either 1) auto reduces it to fit in a given range, or 2) just tells me that I am a pure idiot?

    There are so many caviots to making games for the iPhone and have them truely functional that I can seriously see there being problems when people deploy Unity built iPhone games because of (no offense people) developer stupidity?

    (not Unity stupidity, I mean, me, as a developer, stupidity)

    I see some seriously needed disclaimers after owning my iPhone developer licenses for a few months now..
     
  4. Lka

    Lka

    Joined:
    Aug 6, 2006
    Posts:
    297
    :eek:
    Really?
    Does it have the same battery life with 2D games?
    I think not many people will buy 3D games with this battery life.
     
  5. AngryAnt

    AngryAnt

    Keyboard Operator Moderator

    Joined:
    Oct 25, 2005
    Posts:
    3,045
    Leaving networking out wouldn't make much sense if you ask me. One of the central powers of unity is its ability to run the same project on multiple platforms. Webplayer, stand-alone, iPhone and Wii if you're lucky enough to get a license for it.
     
  6. Lka

    Lka

    Joined:
    Aug 6, 2006
    Posts:
    297
    UT, what is the typical battery life with Unity on iPhone and iPod Touch in your tests?
     
  7. galent

    galent

    Joined:
    Jan 7, 2008
    Posts:
    1,078
    Congratulations UT!!!

    I have a couple of questions (naturally :wink: ).

    1) Will the iPhone build process have additional developer controls? Or, if not, will the internal build process at minimum strip all non-essential libraries etc...

    1a) (if you can say) what the heck compiler are you using anyway? (I'll guess Apple's xCode) - In any case, any chance I can change that at build time? (half my black heart would love to dabble in the dark art of compiler theory again, the other half hates me for asking :D )

    2) Are you wrappering the Apple SDK or providing custom APIs/interface(s)?

    3) In tests what has been the average distributable exe size?

    4) If you can share, what kind of compression/data rate solution(s) do you have built in? (i'll just assume, given the Apple/mobile network provider constraints, any kind of network intensive solution will require careful custom implementation :) ).

    Thanks, and again, congratulations!

    Galen
     
  8. zumwalt

    zumwalt

    Joined:
    Apr 18, 2007
    Posts:
    2,287
    2D games I haven't benchmarked yet, going to do that in the next month or so been busy on other projects. As far as networking goes, although it is a 'nice to have' item, by far it MUST be understood as to the limitations of the Edge network until such time as the iPhone allows us to use someone elses higher speed network.

    The iPhone simply is not designed for a constant solid network connection. Battery life aside, this requires a solid network connection. Now, outside the fact that RakNet certainly does work over the iPhone, network stability is, lets just say, non existant based on the technology.

    The loss of packets alone is substantial enough to suggest that the only thing it will be useful for is the www class or soap type interaction where you do not need a solid up network connection.

    We are talking wireless phone technology here.
    I am not saying to omit it, I am saying put it on the 'farthest back burner possible' at the moment. Include the www class, but do not put serious thought into the networking piece on wireless technology.

    The amount of complaints alone will be staggering and frankly I don't want to see Unity pour countless man hours into fixing something they frankly can't fix. This is a flaw in the AT&T network, not the iPhone. Get rid of the Edge network, go to Verizons data network, then iPhone networking will be possible. It just a matter of wireless phone limitations.

    Unity for the iPhone can include RakNet for sure, but seriouly, regardless of how well they program it into the architecture of Unity, it just will not function well in the iPhone on the Edge network by AT&T and this just has to be realized now and accepted as part of the reality of programming for the iPhone.

    Do not expect to prep your games for solid internet networking as long as we are stuck in the USA with Edge by AT&T. It is simply not feasable.
     
  9. Jessy

    Jessy

    Joined:
    Jun 7, 2007
    Posts:
    7,325
    What about WiFi? Wireless local networking on the DS is simple for the user. Can that extend to the iPhone?
     
  10. zumwalt

    zumwalt

    Joined:
    Apr 18, 2007
    Posts:
    2,287
  11. EducaSoft

    EducaSoft

    Joined:
    Sep 9, 2007
    Posts:
    650
    Anyone know if Iphone has a limited max texture size for a single texture?

    And maybe stupid question, but what about bump maps? does iphone support anything like that? (I guess not?)
     
  12. blikstad

    blikstad

    Joined:
    Nov 3, 2007
    Posts:
    37
    2048x2048

    Well. ARB_texture_env_dot3 should be supported...
     
  13. antenna-tree

    antenna-tree

    Joined:
    Oct 30, 2005
    Posts:
    5,324
    Wow, you were able to squeeze out a whole 15 minutes of gameplay from the iPhone!?! Here at Unity HQ the longest gameplay session we've been able to accomplish so far is about 3 minutes. But we're quite confident that this battery life performance is sufficient for the majority of iPhone users :wink:

    We haven't done any serious tests yet, but tonight I let my iPod Touch sit there and run our main test build for about an hour and the battery was still over 60%.

    Bump/Normal mapping (as far as I know from hearing Aras talk about it) is just not possible on the iPhone/Touch hardware.

    Ethan
     
  14. Lka

    Lka

    Joined:
    Aug 6, 2006
    Posts:
    297
    Thanks Ethan, I was scared by the "15 minutes gameplay".
     
  15. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    I wasn't...if 11 minutes with sound was typical, you would have heard the howls of outrage from buyers of existing 3D games months ago. ;)

    --Eric
     
  16. AngryAnt

    AngryAnt

    Keyboard Operator Moderator

    Joined:
    Oct 25, 2005
    Posts:
    3,045
    You could of-course always improve your battery life with an fps limiter.
     
  17. gizzerd91

    gizzerd91

    Joined:
    May 4, 2008
    Posts:
    311
    How about transparent textures. My game relies heavily on them for graphical beauty (I am keeping it to about 4k polys on screen at a time, so I have some processing room to spare). Can the iPhone do that?

    As a separate note, I think I understand why game prices on the App Store are so low. Yes, it does have something to do with it being alongside other content which is very cheap, but I think it has more to do with purchasing habits of consumers. They tend to buy apps/songs/movies on a fairly regular basis from iTunes (the ones I know anyways), but only by a new over the counter videogame every few weeks/months. If they were paying as much on iTunes as for over the counter games, the purchasing habits would have to change (drastically reduce) and so people get angry when the price goes above something that's affordable weekly. AppStore seems more like a voluntary subscription type spending rather than at least minimally thought out purchases. This is not as bad as devs would have you believe. At about $4 the volume is enough to make up for the drop in price, and you make a lot of money.

    longwinded, but that's my view. you know it was worth reading it :wink:
     
  18. Jessy

    Jessy

    Joined:
    Jun 7, 2007
    Posts:
    7,325
    It better. The Nintendo 64 used those everywhere, for fences, billboards, etc.
     
  19. IPete

    IPete

    Joined:
    May 15, 2008
    Posts:
    414
    Wah Wah - I just found out I have to have an Intel based Mac to develop iPhone stuff...

    My PowerPC G4 laptop won't cut the mustard!

    :(
     
  20. blikstad

    blikstad

    Joined:
    Nov 3, 2007
    Posts:
    37
    It'll do transparent textures just fine, gotta watch your fill rate though most likely.
     
  21. zumwalt

    zumwalt

    Joined:
    Apr 18, 2007
    Posts:
    2,287
    Yea, 15 minutes was all I could muster out of my iPhone. I have the older model (not the G3), and it has the latest OS installed on it. I had tons of crap going on with it.

    I don't see how you got an hour out of the Unity build, so I am impressed, I am more impressed that you are saying that it still had 60% life left. Another good example of seeing the battery get sucked up, download Aurora Faint (I think that is how it is spelled) from the iPhone App Store, it is free. This is a block style game with sound and particles along with some nifty effects. See how long your iPhone will last while playing that.

    There is a HUGE difference between just letting a game sit there idle and you not doing anything with the iPhone (simply because it goes into a powersave type mode and reduces power consumption, dims the screen etc) vs interacting with the iPhone, using wireless networking, using the gyrometer, in short, actually playing the game.

    Obviously different people will get different life out of the battery depending on how they charge it, how they use it, and how the game is designed. This makes me even more anxious to get the Unity iPhone build.
     
  22. blikstad

    blikstad

    Joined:
    Nov 3, 2007
    Posts:
    37
    Sounds to me like there's something seriously wrong with your battery zumwalt; I can definitely play Aurora Feint for a couple of hours or so on my iPhone 3G.

    (one of the things improved in the new version was battery life right? And I'm assuming your battery is now a bit old so it's probably gotten a lot worse since it was new; As in, I'd complain to apple and get them to replace your battery).
     
  23. coolman

    coolman

    Joined:
    Jul 12, 2008
    Posts:
    16
    Great news!

    Thanks to Unity guys.

    The final price (almost 600$ for a newcomer to Unity) is not too cheap but in some way affordable.

    I cannot move now to Unity for iPhone because that price :(

    I invested in a new iMac, an iPhone .. and actually it's too much for now.

    So I must move to Unity Indie and later to Unity Standard for iPhone (damm)

    Wich will be the difference between the Standard and the Pro version?
     
  24. digitalzombie

    digitalzombie

    Joined:
    Dec 10, 2007
    Posts:
    86
    That's the big question. It's a big difference in price, to me at least, so I can't wait to see the feature comparison between the two versions.
     
  25. blockimperium

    blockimperium

    Joined:
    Jan 21, 2008
    Posts:
    452
    I was slightly bummed that the engine wouldn't support terrains, but I'm assuming that really if I create a generic textured mesh with the editor that Unity wouldn't know or care. Would that be appropriate Higgy?

    Also, my other concern is the performance of the scripting engine languages. Are there languages that are more performant in Unity for iPhone than others?

    Is there a texture memory threshold that we should adhere to. We've heard a 7k visible/scene poly count, but I don't recall reading anything about the texture budget.

    What sort of frame rates are you guys able to obtain in the 'typical' projects that you're testing at UT? Can you guys offer screen shots or anything else that would give us some form of visual reference to what a typical game with the "best practices" employed would be.

    Is there anything about animation that we should be looking out for? I've been hearing various things about numbers of animated characters and such, but what I'm hearing suggests that a football (american) game would be entirely impossible on the phone due to too many players on the field. Is that accurate?

    Can you give us some feel for what the deal is going to be with audio as a function of performance.

    I know you guys may want to keep some of this under wraps for Copenhagen, I'd like to start budgeting and spending money on the right things sooner rather than later.
     
  26. EducaSoft

    EducaSoft

    Joined:
    Sep 9, 2007
    Posts:
    650
    Where did you see or guess that terrains would not be supported? If thats tru then I better change my project a little bit and not use terrains for it but another trick :)

    Regards,

    Bart
     
  27. IPete

    IPete

    Joined:
    May 15, 2008
    Posts:
    414
    Well the reply to my question regarding terrains was "hand roll them" which I suspect means make them yourself from meshes not height maps.
     
  28. HiggyB

    HiggyB

    Unity Product Evangelist

    Joined:
    Dec 8, 2006
    Posts:
    6,183
    Ok all, I know everyone is excited but for some of these questions you'll just have to wait for answers. We're still in development which means that some features and optimizations are in flux. For now these are the dangling questions that I can answer:


    It has been asked, scroll back a ways and you'll see that I answered it, then updated my answer. Movie texture support is one of those items that's in flux right now so standy by for a final in/out, and if included then in what way, answer.


    What does any of that have to do with networking? You can make games for multiple platforms without networking so I don't get you there. For reference, yes I do see that sharing scores/info across them is a nice add-on but it's just not a requirement.


    Stand by for information on that as it's definitely something that would be nice to offer (reduces file size of your builds and memory footprint).


    With Unity you will build a XCode project, we do that to fit within the terms conditions of the iPhone SDK. I'll leave the legal homework for you to do in order to decide if making your own compiler is legal or not, that's not for us to decide nor to advise or comment on.


    That depends far to wildly based on what you put into your content. Maybe someone closer to engineering can share the base file size our player occupies so folks will know the base starting point.


    What I said was:

    The general target should be in the 7000 visible tris range, our terrains aren't the best suited for such a situation so the advice is to focus on hand-rolling them and keep poly counts and level of detail under your own control.


    And we understand that, but folks here do need to temper their excitement just a bit as there is a lot on the go right now. Yes, we're sharing some information early, no we can't share it all right away. So everyone sit back, relax, enjoy your weekend and we'll hopefully have quite a bit more to share as we move closer to October 22nd.

    If I didn't answer your particular question then it's because I either can't answer it myself or I just missed it. In any case, just hang in there for more information. Thanks. :)

    Rock on people.
     
  29. nickavv

    nickavv

    Joined:
    Aug 2, 2006
    Posts:
    1,801
    This is a very cool development (I especially dig how you can stream the game to the iPhone for testing. Rock on!), and I will definitely be acquiring the Basic license at some point in time. Good job once more UT!
     
  30. digitalzombie

    digitalzombie

    Joined:
    Dec 10, 2007
    Posts:
    86
    I think he means the feature differential. As an example, potentially having networking for Unity Indie and not having networking for Unity iPhone Standard. Two relatively comparable license levels with both being standard, but with different feature sets.
     
  31. gizzerd91

    gizzerd91

    Joined:
    May 4, 2008
    Posts:
    311
    I agree. If they leave networking out for the Standard package, that would be very dissapointing. I think something that everyone is not getting though, with the amount of money floating around on the AppStore, within the first month of your using it you should have enough money to get Unity Pro and iPhone Pro (if you are in the least bit talented). So just because your first game can't have networking doesn't mean your second or third game can't.
     
  32. EducaSoft

    EducaSoft

    Joined:
    Sep 9, 2007
    Posts:
    650
    I have to disagree there.

    OK appstore is a hype... but....

    Not everybody sells well on the appstore.
    Even relatively nice games could have very little sales.

    And with the prices which they ask you really need to sell a huge lot of them.

    Of course the market is there. A lot of potential customers and they seem to be very willing to push that BUY button if the amounts are relatively small.


    So I don't think that you can say -> Hey I will for sure make enough money to rule the world.

    Also, when unity3d comes out with the iphone support, you may expect a lot of cowboys to also throw together some fast bits and bytes and publish it; So noise on the appstore will increase.

    I'm pretty sure that the best way to make $$$ on AppStore will be to watch very very carefully and make something which is unique (a niche market) on the appstore.

    And THEN you should indeed be able to make some $$$.

    I must personally say that Iphone dev interests me, but I am still looking for a good idea to publish.
    Don't want to be publisher number 984564 who makesa tetris-clone.
     
  33. podperson

    podperson

    Joined:
    Jun 6, 2006
    Posts:
    1,371
    Educasoft -- correctamundo. The gold rush mentality here is very silly. (You know who made money out of the gold rush? Folks selling crap to gold miners.)

    There are some very high profile successes and a bazillion low profile failures. One of the best games in the app store is Apple's poker game. Go take a look at it -- this is not something knocked together over the weekend by someone in a garage. Koi Fish Pond is seriously impressive 3d stuff written by one of the guys behind EverQuest (and sells for $0.99).

    For every 2Across (the leading crossword game last time I checked) there are a huge number of similar programs that are somehow lacking polish, functionality, marketing, pricing, whatever. And if someone comes up with a really successful simple concept, there are immediately dozens of imitators undercutting them.
     
  34. EducaSoft

    EducaSoft

    Joined:
    Sep 9, 2007
    Posts:
    650
    How do you measure success of an app by the way ?
     
  35. gizzerd91

    gizzerd91

    Joined:
    May 4, 2008
    Posts:
    311
    For me a success would be just a few thousand dollars. And honestly, when the Unity release first comes out, that's not gonna be that hard to come by. I'm awfully excited. But I agree. The hype about making an app and quitting your job, that's just hype. I'm still a freshman in highschool, so doing this, getting a little bit of money, and something nice to put on my resume is all I want.
     
  36. AngryAnt

    AngryAnt

    Keyboard Operator Moderator

    Joined:
    Oct 25, 2005
    Posts:
    3,045
    That depends on your goal I guess? First thing to mind is ofcourse making a lot of $$$, but your goal could very well be just creating a name and expanding your professional network - in which case $$$ for the actual app would be a lot less important.
     
  37. Randy-Edmonds

    Randy-Edmonds

    Joined:
    Oct 10, 2005
    Posts:
    1,122
    I am curious about how the Mono (.Net) framework works on the iPhone.

    I understand that the codes get AOT (ahead-of-time) compiled. That makes sense. But...
    1. Is there a limit to the .net libraries that can be used?
    2. Will 3rd party .net assemblies also be AOT'd in such a way that the actual DLL would not have to be distributed?

    Basically, I'm asking if Unity for the iPhone could be used not so much as a game development tool, but as a means to having the iPhone support .Net development? (of course the GUI would have to be done using Unity as opposed to Windows Forms or WPF)
     
  38. zumwalt

    zumwalt

    Joined:
    Apr 18, 2007
    Posts:
    2,287
    Actually I think this is a great question, but I "think" and do not quote me, that iPhone won't use that framework. Instead it will require you to use COCOA instead. I seriously don't think the iPhone includes the MONO package and we can't install custom packages onto the iPhone (otherwise we could build our way around the iPhones bluetooth limits and the iPhones tethering limitations, iPhone is just missing a few packages to make these work)

    No one is allowed to update the package set on the iPhone. Now, Mono is working on an iPhone version, so this will possibly be a future enhancement to the iPhone (maybe Unity knows more about this than I do)

    This is probably one of those 'we need to be patient' things. Which is fine by me :)
     
  39. Randy-Edmonds

    Randy-Edmonds

    Joined:
    Oct 10, 2005
    Posts:
    1,122
    I think that is does, because one of the hold-ups with Unity for the iPhone has been the fact that the Mono compiler did not support AOT (100%).

    UT guys, can you please clear this up?

    -Thanks
     
  40. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    iPhone does not include Mono package by itself. When Unity builds a game for iPhone, it generates a static library of Unity engine, a static library of Mono runtime and static library of your compiled script code. Then it links them all together, does code signing and you get the final application that can run on iPhone.
     
  41. zumwalt

    zumwalt

    Joined:
    Apr 18, 2007
    Posts:
    2,287
    Kick *$$
     
  42. taumel

    taumel

    Joined:
    Jun 9, 2005
    Posts:
    5,292
    @Aras
    Does that mean that iPhone content will work the same as standalones?

    There is nothing like a player or one time installed components so that after they have been installed once you only have to deliver the content?
     
  43. aaronsullivan

    aaronsullivan

    Joined:
    Nov 10, 2005
    Posts:
    986
    @taumel
    The way I understand it, there is no player software. It's not like web players it's like standalones.

    Bigger sizes, but fortunately iPhone/iPod Touch has plenty of space.
     
  44. aaronsullivan

    aaronsullivan

    Joined:
    Nov 10, 2005
    Posts:
    986
  45. Randy-Edmonds

    Randy-Edmonds

    Joined:
    Oct 10, 2005
    Posts:
    1,122
    @UT Will it be possible to have custom Unity resolutions on the iPhone? I would like to have Unity embedded in an Xcode view with standard Cocoa controls around it.
     
  46. DaveyJJ

    DaveyJJ

    Joined:
    Mar 24, 2005
    Posts:
    1,558
    I am very excited. The monkeys (and a whole slew of other animals) are about to escape into the wild.

    Great effort Unity!

    Personally with two games in the store now and a third ...the best one so far ... about to hit live I'd say for me that simply being there is a cool goal. Sales of the first title were pretty good, sales of the second not so much, but I think it's been worth the effort so far. It's exciting to be at this point in development, hours away from hitting the submit button on a third, that's exciting. The journey really, not the destination.

    PS. We are on target to finally hit 1,000,000 Widget Monkey widget downloads by December.
     
  47. ChuckT

    ChuckT

    Joined:
    Aug 18, 2008
    Posts:
    94
    So can I (ass)ume that if I make a very basic 320x480 game following the basic guidelines previously stated- that I should be able to just republish for the iPhone?

    That would be nice.
     
  48. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    Pretty much. Of course the CPU can do much less than a PC, so you want to cut on game code and optimize it much more than for PC. Really when you come from PC development you will have to constrain yourself a lot naturally.

    For JavaScript we also disable all dynamic typing. (We give compiler errors wherever it is not enforced)

    But apart from spending a lot of time optimizing content and game code, it's just another build option you have to click a button and you are good.
     
  49. ChuckT

    ChuckT

    Joined:
    Aug 18, 2008
    Posts:
    94
    Thanks for the quick reply! I guess you guys are working late for the next few weeks!

    I'm looking forward to meeting everyone at the Conference.

    Thanks again.
     
  50. DaveyJJ

    DaveyJJ

    Joined:
    Mar 24, 2005
    Posts:
    1,558
    I have some questions that I haven't seen answered yet ... or maybe they were in the last 10 pages but I missed them ...

    1. How does Unity handle forcing the orientation, i.e., implement the "[[UIDevice currentDevice] setOrientation:UIInterfaceOrientationLandscapeRight];" so that we can force an app to be horizontal or vertical?

    2. How does it handle Default.png (the default loading screen for an app) and Icon.png (the apps icon)?

    3. How do we set bundle ID, product name, bundle display name etc in the Info.plist file?

    4. How does it work when you create a build in terms of using your Apple certifications and distribution settings, i.e., creating a correct distribution of debug bundle with the proper mobile provisions etc in the app?

    Thanks!