Game Development Community

HOW HARD IT IS? easy? medium?

by Doncabrera · in iTorque 2D · 06/20/2009 (6:51 pm) · 25 replies

Hi Guys!

Question: once I have my game on TGB, how hard it is to port it to iPhone with the iTGB? I have to know C++ or xCODE? because I'm learning my TGB scripting and its really easy, but I'm not ready for C++!

Its just a "port to ---> click ---> iPhone/iPod Touch ---> Finish!" process or you have to re write the whole code or something like that?

Assume my game will suck so there isn't much power features involved, its just a plain and simple chess.

About the author

Recent Threads

  • Noob Questions Answered!
  • Page «Previous 1 2
    #1
    06/20/2009 (9:12 pm)
    Without beeing able to write code, only simple games will work on the iphone, as the script execution speed on the iphone is horrible at best.

    Especially porting script code to components and link them with your behaviours (in case you use behaviours) or outsourcing heavier functions to C++ functions will be required.

    The shooter components variant will give you an idea on the work involved.


    Also the iphone part will NEVER be click and finish.
    You will have to do refinement and optimization of your layout, testing it and potentially drop features and optimize the usage of resources as a 2ghz with 2GB RAM & 128++MB graphics memory system is in no way comparable to a 330mhz (its 400mhz but I'm substracting expected multitouch performance lose ) device with 30MB of RAM and 24mb of graphics memory at best device
    #2
    06/21/2009 (1:23 am)
    Quote:The shooter components variant
    What/where is this?
    #3
    06/21/2009 (1:40 am)
    Quote:Without beeing able to write code, only simple games will work on the iphone, as the script execution speed on the iphone is horrible at best.
    Therefore, please allow me the following question:
    What is the main reason to spend $500 for iTGB and using it for development of an iPhone app?
    #4
    06/21/2009 (2:45 am)
    the shooter and shooter components are two projects that come with the itgb installation.

    And as for the $500 for iTGB: To run your project at all on the iPhone (it neither won't without it nor are you actually allowed to port it yourself).
    Know a bit about C++ in no way would suffice to get it to run on the iPhone.
    The C++ required to do this work should be learnable by anyone intend to do games that require it actually and the shooter and shooter component project will teach you how to create components from behaviours to have math heavy or execution dense functionality in code


    I agree though that the script execution speed must be looked into. Its clear that the actual target point for it on the longer go should be a compile to native code on iTGB, not compile to VM bytecode.
    #5
    06/21/2009 (8:05 am)
    So wait a minute because I almost bought the whole commercial package here... you are saying that, basically, its $500 for iTGB and you don't get a fast deployment to the iPhone?

    If I have to re-write the whole code again in C++ in order to port it on the iPhone, why do I need iTGB in the first place? or TGB for that matters.

    From what I'm understanding here, you spend like 1500 USD on a commercial GarageGames package (or indie for a bit less).

    Then you move to write your game to TGB, which will be useless on iTGB.

    Then you need to re-write your whole game structure on C++ (????) in order to port it to iTGB and then, if you are lucky and skilled enough, your game will run 15 fps on your iPhone?

    I believe there is something wrong with all this at least (and I HOPE) I'm missing something.

    This is NO WAY a critique for GarageGames which, I believe they sell a great product. Don't get me wrong, I love their products, but the page says:

    Quote:Making games for the iPhone is now a fast, fun, straightforward process using Torque's proven 2D tools for game development. iTGB is built to natively load projects from Torque Game Builder and deploy them to the iPhone.

    Please clarify a bit more what is exactly what the iTGB does, if its as easy as the TGB? or as Marc said, you actually need to be a 10 years C++ expert in order to use it, if so, it should clearly say so on the product page.

    #6
    06/21/2009 (8:14 am)
    No you don't need to rewrite the whole game in C++.
    But all performance critical / calculation heavy sections will need portation to C++
    Lightweight things don't need C++ portation like GUI and alike.
    Puzzle games and alike for example likely will work fully through script.

    Also, its to assume that TGB games are totally unoptimized (even the worst pc is 20 - 30 times faster and has up to 10 times the RAM especially 4 - 20 times the graphics RAM of an iphone) if they were not written for and with the iphone only in mind.
    These things require that you look into your game, be it asset optimization to reduce the graphics memory requirement or be it object pooling to not create and destroy objects like an insane.

    With a lightweight game, TGB -> iphone might be a one click thing.
    But that will only work for a fraction of the projects, you can't expect games for monster pcs to run on tiny phones without some serious work on optimizing it, that would just be unrealistic.

    so the answer to your original question is: Its easy if you are realistic about your capabilities and what you want to achieve with that on a phone, its very hard if you are not fair with yourself and your project just went fine because pcs are significantly overpowered today and compensate for badly developed games.


    And iPhone development is a fast and straight forward process that way.
    Try to write the game yourself, implement the asset management, easy tools etc and then rate that amount of hours you needed against the $750 for iTGB, especially as iTGB unless other iPhone technology actually comes with all sources and allow you to cut the technology down to exactly the amount of stuff you need (or rewrite it for your specific needs)


    I agree that the performance needs to be looked into as there are bottlenecks that hopefully will be solved in the forseable future, none the less its a very powerfull and easy technology (proofen by the point that non programmers are able to create games with it for a phone which is stunning)
    #7
    06/21/2009 (8:21 am)
    Marc!

    Thanks for being there! Let's assume my game sucks and its just a whacka mole to say something. I will be creating and destroying objects on the screen. Would that be a problem then as you said it?

    Just one more question then. How the iTGB process actually works. If there is a GUI for it, you load your TGB project, and then export it to iPhone?

    I didn't found any information about this on the site which is strange because garage games sell their products really well (I'm actually sold to buy the TGB right now!)

    You load your project and export it in one single step? or you need to load it, and write a bunch of code to be able to export it?

    As for your answer, I understand that, you can export it in just one click but you will need to actually work on the performance part, but that's another thing. The one click to iPhone exists?
    #8
    06/21/2009 (8:37 am)
    Something that keep coming back to me.

    Marc, or anyone else, you keep saying that people who aren't programmers are able to create games for the iPhone, but previously you said that you need to know C++ (or almost be an expert on it, just a bit of coding of C++ won't be enough) in order to be able to make it run on a iPhone.

    Its not actually clear. I'm not against the product, again, LOVE GarageGames. Can't think of a better tool. Just wondering if iTGB works as it should. We all know TGB IS WORTH a million dollars and twice what it's worth.

    Isn't really clear to me what is the deal here. Really.
    #9
    06/21/2009 (8:52 am)
    Marc said:"$750 for iTGB"
    And $500 for an Indie, is that correct?
    #10
    06/21/2009 (8:54 am)
    Sorry about the confusion.
    Will try to untie the mess so its more obvious.

    Yes iTGB works as it should.
    As with any other type of game development its the game developers task to:
    1. Scale the design to the target platform (you can't do X360 games on a Nintendo DS either, which reflects the situation TGB on the pc to iTGB on an iphone capability wise)
    2. Scale the design to the teams capabilities, strengths and size
    3. Create a working game that they then can refine and optimize either internally or through help from specialized staff for this purpose.


    Its just a matter of facts that running a script language, realtime parsed or virtual byte code, on a cpu as slow as the idevice cpu (400mhz - 600mhz on the newest generation) will be significantly slower than compiled platform code.

    You can create a game fully in script given its simple enough and you optimize it accordingly
    What you can not do for example is take some game that uses a fair amount of processing and math in script and expect it to run well on the iPhone without moving those calculations to C++ and call the corresponding functions from your scripts (this kind of porting to C++ is pretty simple actually as TorqueScript is close enough to C to get this done with a week of learning if you fully understand the scripting).
    Another thing that can easily bite you in your back when porting from TGB to iTGB is the memory factor.
    PCs today come with 1 - 4GB of RAM, 128MB - 1GB of graphics memory to hold all the stuff (stuff in this case means sound, textures and datablocks) and pretty fast harddisks to load them.
    In comparision to that you have the iPhone with <= 40MB of available RAM, 24mb shared graphics memory and a comparably slow flash memory (a regular desktop cheapo 7200RPM harddisk has a throughput of 80 - 120MB/s which is 10 - 15 times of the throughput of iphone flash memory)

    These things need to be taken into account when creating a game for a restricted device as the iphone

    I hope that cleared up the above postings that confused you.


    #11
    06/21/2009 (9:00 am)
    For an Indie its $750 from 0 to go, as you need to own TGB Pro which is $250
    If you own TGB Pro its naturally only $500 :)
    #12
    06/21/2009 (9:31 am)
    Marc said: "TGB Pro which is $250"
    mmmh... when you click on "Engines" "Torque 2D" "Buy Now" - it says Torque Game Builder PRO is $150 !?

    [EDIT]Sorry... Because I already own TGB indie, GG would just charge me $150...
    But I am still confused. I bought TGB indie for $100 a long time ago and then I recently bought iTGB for $500 (I had no option to upgrade TGB to PRO). Am I not allowed or able to develop iPhone apps now?
    [/EDIT]
    #13
    06/21/2009 (9:40 am)
    If it works easy to port it to iPhone, then its worth the price. Even for indies.

    But what I'm afraid is to buy this, for a simple game and then realize I need to learn C++ to even be able to test it on the iphone.

    Right now, as for what I understand, there is no way to actually click on a "PORT IT" button and see it on the iPhone. (PLEASE correct me if I'm wrong!)

    To even start seeing it on the iPhone you need to start a C++ coding madness and it will work 2fps. That's the impression I'm getting from this conversation, which isn't bad at all, but its not what I see on the product page.

    Quote: ..the script execution speed on the iphone is horrible at best.

    That isn't also mentioned on the product page!

    I'm not talking about an Unreal Tournament game ported on the iPhone (never was!), I'm talking about a fairly simple score/game system. Pacman-like for example. Nothing crazy. But seems that even that simple project is a big NO with iTGB if you aren't a very skilled coder.

    Its a shame ;(((( really sad to know all this!
    #14
    06/21/2009 (10:55 am)
    @doncabrera
    TGB and iTGB are essentially the same product, except iTGB runs on the iphone. In principle if you write a game with TGB, you can simply load it up in iTGB and launch it to the iPhone. It's very simple in most cases.

    Gotcha's are:
    1. You can't use resources in iTGB like TGB.
    2. You need to understand xcode at least enough to configure your Deployment certificate.
    3. You need to use the lowest level of compile optimization or add setUsesPhysics calls to most of your sprites.
    4. You are likely to run into memory issues unless your game doesn't uses very large images or their are not a lot of them

    You don't *need* C++ to use iTGB. It's strongly recommended unless you plan on doing only very simple puzzle games. It's required IF and only IF you plan on doing something with complex logic or that is framerate sensitive.

    It's not very difficult to write games in TGB and port to iTGB as long as you consider Marc's advice on scope of the game, image assets and are realistic about the iPhone resources available.

    You could easily write a simple pacman like game with iTGB and get good performance without using any C++.
    #15
    06/21/2009 (11:12 am)
    When we created Ohmz, I was intially incharge of scripting. My skills with c++ are little to none. But I understood the torque script well enough. We were able to get a working beta on the iPhone before anyone else touched the code. It wasn't the most efficient when coming to performance. It worked though.

    There isn't a PORT button. You just bring you files over to Xcode on a mac follow the instructions that garage games gives and, if everthing is correct you should be able to test your game on your iphone or iPod touch that you set up to test on. Like stated above.
    #16
    06/21/2009 (12:29 pm)
    Too bad there isn't a PORT button, it should be that way! but its really good to know a simple game can be done in Torque > iTGB.

    THAT'S WHAT I WAS LOOKING FOR!!!!
    So a simple chess game can be done without little resources, that is what we where looking for. After all there is hope.

    Now with the XCODE bit, the garage games instructions for xCode are somewhere around? or an example? how easy it is?
    #17
    06/21/2009 (1:08 pm)
    Apple has instructions for all relevant steps for provision and certification that can be found on the dev portal after you are part of the dev program
    #18
    06/22/2009 (8:34 am)
    I suggest logging into the ADC (free account required) and downloading the Xcode manual somewhere, the iPhone SDK overview and the SDK itself to get started. Just get to know how to deploy a program from the templates onto your own device.

    I hit even more new errors today I've never seen before, and had to restore my iPod, so the whole Xcode bit isn't always working perfectly well. You need a little familiarity with programming and Xcode general use to do any development for the iPhone OS.
    #19
    06/22/2009 (9:23 am)
    Ronny,

    thanks for the advice! I hostly thought iTGB would take care about the whole deployment on the iPhone SDK. It's actually not entirely clear to me what iTGB does yet, since you have to port most of your advanced functions to C++ and deploy the game yourself with Xcode (plus, deal with the Xcode errors as you said).

    That said, I'm not losing my hopes on GarageGames and we will get the whole package, is just that the level of expertise advertised on the product page in order to publish a game on the iPhone isn't actually the "real" one.

    It is also true that, if I had spent my time learning Xcode and how to deploy my TGB game into the iPhone instead of being writing here the whole weekend I would have learned it by now and this won't be an issue (I know I know... I focused in the wrong thing).

    I just hoped for a PORT button but, there isn't none ;-(

    Wasn't the whole iTGB point to have a PORT button? I don't know anymore...
    #20
    06/22/2009 (9:31 am)
    Quote:
    So a simple chess game can be done without little resources, that is what we where looking for. After all there is hope.

    If you're planning on doing a decent AI, there's simply no way around writing it in C++. Script, even on a PC, is just too slow to handle the amount of "thinking" a chess AI has to do to play decently. With that said, I wrote my iPhone chess games in C++ first and porting from TGB to iTGB was super fast. It took me only about a week from start to upload.

    A PORT button isn't going to exist anywhere, I'm afraid. The point of iTGB is it's a heckuva lot easier to port from TGB to iTGB than it would be between two different engines. Because I was familiar with TGB, my experience with iTGB has been super smooth since after I figured out the quirks (which are inevitable with any software development, btw).
    Page «Previous 1 2