Game Development Community

porting and interacting iTorque 2D games with native ios

by Ranjan Patra · in iTorque 2D · 05/26/2013 (11:42 pm) · 4 replies

Is it possible in iTorque 2D to port my iTorque 2D games in my ios app in such a way that it can interact with my app too simultaneoualy. I want my iOs app feed an input to iTorque 2D game , that is to be ported, and finally it provide me an output.

#1
05/27/2013 (11:09 am)
Perhaps you will have more luck in the Torque2D forums they should be more active than the now deprecated iT2D.

Anw can you give a little more information about what you are doing? A T2D game is an app by itself why would you want another app running?

Here is some threads on the topic
http://stackoverflow.com/questions/7062388/how-can-i-make-my-ios-apps-talk-to-ea...
http://stackoverflow.com/questions/2896728/can-two-iphone-aplications-communicat...
#2
05/27/2013 (9:49 pm)
My app has two module. First module contains small games in which player earns money. Second one is an aquarium in which player can buy fishes , aqua plants etc.

i want to use T2D aquarium as a module in my app and money earn by player will be input into it and when player get back to first module T2D aquarium must output me the remaining money.
#3
05/27/2013 (11:06 pm)
Ah I can't see why you shouldn't do that in just a single app! To transfer data from one module to another, you can simply set a global variable:
$foo = "bar";
Both modules should be able to read that. When switching between modules just push and pop them from the canvas.
#4
05/28/2013 (6:24 am)
It's possible to separate iTorque 2D into a static lib, which can be included and loaded by another app. You will have to create the Xcode project that creates the static lib, though. That would take less than 30 minutes. You will likely need to make some changes to the source to get T2D to boot, suspend, and resume, based on your custom app needs (no universal answer here). Finally, communicating between the two will either require saving a file that is loaded by T2D, using a net connection to pass updates, or using "command line arguments" for booting and resuming the T2D simulation.

So, is it possible? Absolutely. Would it take some extra work, yes, but not a lot if you are a competent programmer. A day or two, at most, if you understand the engine.