Computer app to ipad app

Discussion in 'iOS Programming' started by hisham.i, Jan 20, 2012.

  1. hisham.i macrumors newbie

    Joined:
    Jan 20, 2012
    #1
    Hello,

    I was wondering how computer games are made for phone, do they have to rewrite the complete code that is already written for computer game to make on the phone?

    Many of the application that are in appStore are also found in application market for android phones, so i am wondering if developers have to rewrite the code for both operating system, or there is a method to make this ?
     
  2. miles01110 macrumors Core

    miles01110

    Joined:
    Jul 24, 2006
    Location:
    The Ivory Tower (I'm not coming down)
  3. hisham.i thread starter macrumors newbie

    Joined:
    Jan 20, 2012
    #3
    mmmm, but how can they maintain all its features? i mean how developers manage there programs in order to rewrite them on different environments without loosing any feature?(I have a program about 5000 lines, and i forgot some of the functions that i wrote within my code, so how they manage there code in order to get the same result?)
     
  4. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #4
    Take a couple liter of coffee/redbull, think about your flow, and rewrite the whole thing, also writing maintainable/correct architecture code is a big must for porting to other platforms.
    I think that's a biiiig misstep alot of coders make, because they think it will be just them using it (i've been there..), and in the end, I ended up rewriting it anyways for the same platform, so it can be ported easily to android too.
     
  5. dantastic macrumors 6502a

    dantastic

    Joined:
    Jan 21, 2011
    #5
    This very much depend on the type of app you have as well.

    If you think about angry birds I imagine that they have written their own engine in C or are using a C engine. That way most of the "Business Logic" is the exact same code across all platforms with a C compiler, which is most, Android included. Then they only need to adapt a small portion of the code so they can present and run the game on all platforms.

    Then take the other example of the Facebook app which is pretty much the polar opposite. The Facebook app I imagine contain virtually no Business Logic but everything is just downloaded and displayed the most optimized way possible for the platform. I imagine the iPhone app and the Android app will have very little code in common.

    The important thing to remember when wanting to create a portable app is design, design & design. A clearly separated Model with clearly defined methods that do one thing only - that have a pre and post requisite. If you can't just use the code you will be in a much better position to port the model across.

    Worth mentioning as well, don't use any cool features available to one platform only, such as Core Data. You should have a pretty good understanding of all platforms involved in this as well so you know already beforehand what's going to cause problems so that can be avoided already from the beginning. It will cause more code but it will be more portable.
     
  6. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #6
    Afaik, their first version is made in Cocos2D, you have stuff like Cocos2D-X, which ports to all platforms, opensource ofcourse.
     

Share This Page