using monotouch in game engines - iphone

as you know monotouch is the c# face of ios native api. is there any opportunity to use monotouch in ios games? i examined unity3d and unreal development kit. there is no ephesized feature like this. is there any way to use c# in an ios game engine?
For example: i want to start a phone call in a game

In Unity iPhone you can access native features of iOS by calling them through plugins. Usually those plugin methods are written in ObjC/C/C++.
http://unity3d.com/support/documentation/Manual/Plugins.html
It might be possible to write plugins using MonoTouch, and access them from Unity after they've been compiled to native code, but I seriously doubt anyone has attempted that.

Related

unity3D + kinect interection

guys i am working on a project which uses unity engien and kinect as input source ..now according to my knowledge there is not much support between unity and kinect sdk ..i have heard about zigfu framework but it is not giving me all functionalities i need..so what are options for me? im thinking to take some functionalities from zigfu and some from a background application build in .net 4.0 and using kinect official sdk ? can i connect to kinect via two interfaces at the same time? i.e zigfu and kinect sdk ....my background app will connect to unity via pipes ..is that agood option?
I've already done something similar. I'd like to use Unity 3D engine and do some interactions to animate the model using Kinect (Kinect SDK). Some functionality in Kinect SDK are not available in Zigfu, such as Hand Gripping detection.
Because Kinect SDK is suitable for WPF application, here is my solution :
Build your Unity into Unity Standalone (PC, Mac, Linux).
Create WPF application with Kinect stuff inside.
Add WindowsFormsHost inside your XAML of WPF application.
Embed your Unity Standalone into WPF using WindowsFormsHost.
To do a communication between WPF and Unity, you can use Raknet. It will work as socket does.
in my experience, its usually not a good idea to use "two of" something, when they both do the same thing. I've never heard of zigfu before, but it seems relatively easy to learn. Since its available as a unity plug in, it may be best to use that over kinect. The reason being that Unity isn't to "friendly" with third party applications.
If your aiming for XNA, its possible to convert easily if the plug-in doesn't already do it for you.
I Highly recommend looking over the unity forums, and the ZDK documentation.
http://forum.unity3d.com/threads/127924-Zigfu-dev-kit-for-Unity3D-Product-Launch

Unity3d and iPhone Objective-c?

Hi I am very new to Unity3d and I have been writing in Objective-c for a year now. Is it possible to write Unity3d apps in Objective-c, and if so, how do I get started?
Thanks
Unity uses Mono and it languages are C#, JavaScript, Boo and C++
On iOS you can link Unity with native libs and frameworks. So you can use Objective-C in Unity code.
But it relates more to reusing Ad Network banner libs.
Game code is more convenient to write in C#, JavaScript
If you wish to develop Unity games then you have to use C#, JavaScript but you can still reuse some Objective-C code.
This is not possible I guess.
Unity 3D works with Java and C++.
BUT you can write Unity 3D apps for iOS, compile for iOS :)

IPhone game development - what should I use for developing 2D games?

The title is very descriptive, I want to start developing games for the iphone and don't know where to start.
I would like to know what tools are available for this.
Should I start with a prebuilt game sdk?
Should I develop in C, C++ or Objective-C ?
thanks in advance.
Cocos2D is popular, and pretty simple/well thought out.
There are a handful of tools out there that simplify game development on the iPhone. Three that come to mind: Cocos2D, Box2D and Chipmunk.
Corona SDK is also a fantastic way to go if you want a cross platform game. You do all of your dev in Lua and can deploy to iOS as well as Android devices.
It also comes with Box2D physics built in.

Game development using Unity for iPhone

I have decided to use the game engine Unity to develop my game for iPhone. But I need to use some functions built into the iOS SDK.
If I choose to develop using Unity, can I still use functions from the standard iOS SDK? Like functions to access a url, etc...
When you compile a Unity project for iOS it takes your C# or JavaScript code and AOT compiles it to a native dll. It then creates an xcode project which loads that dll. You can add native objectiveC, or C/C++ functions to this project and expose them for calling from the Unity engine.
http://unity3d.com/support/documentation/Manual/Plugins.html
Unity also has built-in methods for accessing URLs.
I don't know how the Unity SDK is built, but if it's a static Objective-C library then you can access iOS SDK functions without any problems. If its a script engine where you develop your scripts outside the IDE then you may not access iOS function.
Have you checked other engines/sdk's for your game development? I know that Cocos2D is well documented and I know for sure that you can call iOS methods.
Good luck!
I used both unity3d and corona which are very good at their field, and yes you can use all standart SDK over them, sometimes you need to do tricks though (which is quite a pain). If you are developing a 3d game and familiar with NVIDIA PhysX engine go for unity, it gives you nice features. But if you are clueless about collasions/rigidbodies/ragdolls etc you would have a hard time for sure.
As for 2d application development since I don't like Objective-C I prefer corona which you code in lua (easy to learn and use). You can use most of the IOS SDK in it without any problem.
I really reccomend you starting with Unity, it is the best engine I have ever used (I have used a ton of bad engines).
Unity is the best place to start and to stay. Coding, graphics and everything is simple to manage in this engine.
Unity is specially 3d but you can also build 2d games, some examples are Zombieville and OMG Pirates (very succesfull games on the appstore).

Sharing Code between Flash Apps and iPhone Apps

I am interested in writing games for the iPhone and the Web. Ideally, there would be one language that I could write my games in and it would work on both platforms. I know this is not the case, so what is the best way to leverage code between iPhone apps (Objective-C/C++) and Flash SWFs (ActionScript)?
This maybe of some help
It uses the NME library which will allows code to mostly be written to the Flash 9 API and create the C++ for XCode to compile and run on the iPhone and Touch. This creates a path to port Flash games to iPhone/Touch.
Unfortunately, Flash and Objective-C are very, very different - and it's unlikely that a Flash player will be available for the iPhone in the near future. The native input methods used in Flash games - the keyboard and mouse - don't lend themselves well to the iPhone. While Apple could make Flash run on the iPhone, most Flash games would be totally unplayable (or feel very unnatural. They'd have to overlay a keyboard probably?). With the success of the App Store and native iPhone games, I think it's very unlikely you'll see Flash support anytime soon.
You might want to consider using a game development tool like Unity instead of Flash in the future. Unity allows you to create both 2D and 3D games, and you can program them in various .NET scripting languages. Once you've created the game, you can cross-compile it for web (their own plugin, not Flash), iPhone, or the desktop.
I know that doesn't help much since you have an existing codebase, but it might be something to consider for the future!
My company is developing a toolchain that allows compiling ActionScript3 to native code for mobile devices.
It now supports Windows Mobile and Symbian, and iPhone supported will be released in a couple of weeks.
Check it out at: http://developer.openplug.com/
BR
Guilhem
Adobe Alchemy looks promising. It is not released yet, but from their website:
Alchemy is a research project that allows users to compile C and C++ code that is targeted to run on the open source ActionScript Virtual Machine (AVM2).
This would allow iPhone apps and Web apps to share non OS-dependent C/C++ code, which is a very exciting prospect.
One option would be building everything in unity. The engine facilitates building the same game project to any of the following platforms:
Webplayer
OS X
Windows
iPhone
Wii
Actually, the iPhone supports Flash technically (see Developer creates Flash for iPhone and Flash Installer Update #2). It is just Apple's crippleware restrictions that prevent installation.
Other than that, there's really not much you can do. Flash/ActionScript and Objective-C are radically different. You can have a central server store data, but that doesn't solve the duplicated logic.
If you're already willing to use ActionScript you could go all the way over to the dark side and switch to Javascript. That's the only common language supported by your clients (web and iPhone).
How comfortable you are with either development environment certainly plays a role here. If you are a die-hard Objective C and a super star Actionscript programmer then doing both shouldn't be much of a problem. It will be lots of work of course, but not a problem.
However, if you are neither or only skilled at Actionscript then I suggest you focus on Flash/Actionscript for the time being. Eventually Flash will be available on the iPhone anyway. When that happens you can already have a number of apps ready to be quickly ported to iPhone. Also keep in mind. There are more portable devices out there than just iPhone. Getting your apps running on other devices might be worth it in the mean time.
Just keep in mind when you're developing your apps now that at one point you also want to run these apps on the iPhone. So make 'm in such a way that they can be controlled with an iPhone as well.
Updating this old QA with new information. The recently released monkey development framework deploys to both iOS and Flash: http://www.monkeycoder.co.nz/
It's so new that I wouldn't necessarily recommend it, but it has a great pedigree: the creator made Blitz3D and BlitzMax before, and those were great game development tools.
That said, I would strongly recommend a combo like Corona for iOS and Flash for web, so that you're using optimal tools for each platform.