Options for game development with MonoTouch - iphone

What options are there for game developers in regards to working with the MonoTouch framework?
Is OpenGL fully supported? Or just a subset?
Is there any additional tools, frameworks or engines that would be compatible with MonoTouch? Would these libraries also have to be written in .NET?
Do you have any other tips?
Thanks all.

OpenGL is fully supported in MonoTouch, we distribute OpenTK with support for OpenGL ES 1 and ES 2, so it has a nice binding that you can use from managed languages like C#.
As the previous poster hinted, there is XnaTouch available today, and there is some talk about bringing Cocos2D on the Monotouch-o-sphere.
An alternative to using MonoTouch with OpenGL or XnaTouch is to use another Mono-based framework that is entirely focused on gaming, the Unity3D platform. This is a professional tool for building 3D and 2D games and goes beyond what Xna does, it is an entire gaming IDE with a full game engine.

XNATouch: Free implementation of the XNA Framework for MonoTouch
unity3d: C# game library for iPhone. It's based on Mono but don't think it is related to MonoTouch.

Related

Recommended practice environment for OpenGL ES 2.0?

I decided to learn some OpenGL ES 2.0 and I am trying to pick a practice platform for it. What comes to possible target platform, it could be Android, iPhone or WebGL. But I don't want to spend too much time and effort to get the environment setup properly.
Would you recommend WebGL for a fast start to OpenGL ES 2.0 learning or something else?
Edit: I am using Mac and I am not really interested in ES 1.x at the moment.
If you register as a developer at the iOS Developer Center (free), you can download Xcode and the iOS SDK (again, for free when you get Xcode 3), which includes a simulator capable of OpenGL ES 2.0. This of course assumes you have a Mac to run that all on.
Once you have the SDK, you can simply start up Xcode and create a new application based on the OpenGL ES Application template. This application will be a fully functional OpenGL ES 1.1 and 2.0 iOS application that you can build and run in the simulator. You can ignore all of the iOS-specific setup code and focus on the -drawFrame method in the xxxViewController.m class, which is where the OpenGL ES 2.0 drawing code lies.
This can be a pretty quick environment to set up for playing with OpenGL ES 2.0 shaders. I've also tried out the PowerVR SDK package that trenki suggests, and it is a little more involved to get something set up with that. If you're on Windows, it will be a lot more viable of a solution than the Mac-based iOS SDK I describe here.
One other shader development tool that can come in handy for prototyping on the Mac is Quartz Composer. It comes along with Xcode, and provides a visual prototyping environment for all sorts of effects, including OpenGL shaders. I demonstrate an example of doing this kind of prototyping in an article I wrote here. Desktop GLSL and the implementation in OpenGL ES differs slightly, but much is the same between the two.
While targeted at iOS, I taught a class on OpenGL ES 2.0 recently as part of a course that can be downloaded from iTunes U for free. It might helpful in getting up to speed on shaders.
I suggest you download and setup the Khronos OpenGL ES 2.0 SDKs for POWERVR SGX PC Emulation package (Unfortunately you have to register to be able to download). This allows you to get everything up and running on a desktop computer which will make your life a lot easier when it comes to debugging. You can then use C/C++ to develop your OpenGL ES 2.0 applications.
If I'm not mistaken my Android phone (Samsung Galaxy S) also uses this OpenGL implementation.
Instead of using the Khronos SDK you could also use the OpenGL ES 2.0 libraries from the Mesa3D Project (Ubuntu has them in the repository). They work fine but I can't recommend them because I already ran into a situation where the results differed from the Khronos SDK implementation and my Android device.
EDIT: You also have to create a Window and an OpenGL rendering context in order to actually use OpenGL. For that I can recommend SDL (1.3) which also has an official port for Android. I tested it on Android and Ubuntu with the mentioned SDK. It allows me to use the same code for both.
If its for game developing try using a framework, this way you don't have to do the baby steps yourself :-).
Here are some to get you started ( i prefer the android ones :-) ) :
Android
- Min3d
- Libgdx
- AndEngine
iPhone
- Cocos2d
- Sparrow
WebGL
- Tutorial
- glge
If you want to learn OpenGL ES and have a mac I suggest this book:
http://iphone-3d-programming.labs.oreilly.com/ (You can read it from the web, or buy it, I think it is worth it)
Besides the OpenGL itself it explains some of the mathematics and it shows the OpenGL ES 1.1 and 2.0 way for all examples.
(Depending of what you want to do sometimes 1.1 is much easier and suites better.. in 2.0 you always need shaders even if you only want to draw a single triangle.)
Since the Raspberry Pi supports hardware accelerated OpenGL ES 2.0, and is quite inexpensive, it would make a good platform, for testing if not actual development. It's basically a last generation smartphone, without the phone bits. If you install a Linux distro on it (e.g. Debian) you are ready to program on it out of the box. Since it's a learning platform, it's well suited for the purpose. You won't be alone, many are dipping their toes into Open GL ES on it.

using monotouch in game engines

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.

What is this sparrow framework in iphone development?

I am new in iphone development .I recently heard about a sparrow framework which is used to create games for iphone but i could not get more knowledge about this framework.Is it an apple framework ? Do it provide some special features to iphone game developement?
It's an open-source project, therefore it doesn't belong to Apple. I basically use the OpenGL library and provide you a very easy to use abstraction of it. So it doesn't provide any features, but makes the development simple games much easier. Give it a try!
The nicest thing about Sparrow's API is that it is very similar to Adobe Flash. So if you have programmed Flash games before, it will be very easy to learn Sparrow. I have already published two games with Sparrow, and it was very nice to work with.

Any chance of cocos2d within MonoTouch?

After learning more about how monotouch works, I believe I know the answer to this anyway, but can you use the cocos2d-iphone framework with monotouch? I believe most likely this will be a 'no', because cocos2d is an an objective c library and there would most probably have to be some sort of .net port for this to be achieved? is that so?
I haven't done any monotouch dev as yet, but a little objective c development with cocos2d and am quite fond of the framework, and was hoping to avoid, as I'm quite new to game dev, steeping into the dark realm of straight opengl programming via the openTK interface supported by monotouch.
I have also started a community wiki here for people to share game development options on monotouch which should help us all with this emerging framework.
Cocos2D is being ported to MonoTouch:
http://github.com/city41/cocosnet
Update:
There are two options, you can use the Cocos2D binding on MonoTouch, using the bindings as published here:
https://github.com/mono/monotouch-bindings/tree/master/cocos2d
Or you can use Cocos2D ported to XNA:
http://www.cocos2d-iphone.org/archives/1801
It seems CocosNet has gone untouched for some time now[a]... Is it still being developed or should you go with Objective C if you want to use Cocos2D?
[a] http://news.ycombinator.com/item?id=1251007
I don't have any experience with MonoTouch, but you might want to see if you can get Farseer Physics working with MonoTouch. Farseer is based on Box2D, which is also a component of Cocos2d.
Good news is that the c++ version, cocos2d-x, has been ported to run on XNA for Windows Phone7. This should make it also able to run on Monotouch. I was very impressed with MonoTouch but for cocos2D I'd be inclined to go with straight cocos2d-x unless you desperately want to program in C#.
you can find an XNA version of cocos2d at https://github.com/Cocos2DXNA/cocos2d-xna. This works on MonoTouch, MonoDroid, Windows, Mac, Ouya, Xbox. It even has a high performance box2d implementation that runs as fast as the C++ box2d (at 60 fps, except for the AddPair test).
cocos2dxna.codeplex.com for our forums
www.cocos2dxna.com for the web site that we recently started
nuget.cocos2dxna.com/nuget for the nuget repository
www.facebook.com/Cocos2DXNA for our facebook page

Which openGL ES frameworks are available to use for 2D user interfaces with iPhone OS?

Currently I start learning openGL ES, but I wonder what kind of helpful frameworks are out there to get things done faster?
There's an iPhone gaming framework developed by Jeff Lamarche (who has published a book for iPhone beginners) that uses OpenGLES. I'm currently trying to use the framework myself.
Here's his official release:
http://iphonedevelopment.blogspot.com/2008/12/updated-opengl-es-xcode-project.html
And a tutorial that uses the code (although it's very lengthly):
http://www.codeproject.com/KB/Blogs/iPhone_gaming_1.aspx?display=PrintAll&fid=1541633&df=90&mpp=25&noise=3&sort=Position&view=Quick&select=3071377
I would say these are the top two free frameworks. Both are aimed at gaming but could probably be adapted for other purposes.
Oolong Engine
Sio2
As for paid engines I think this is the best
Unity
I've been very happy with Cocos2d. http://www.cocos2d-iphone.org/