I am new to cocos2d.
Is it possible using cocos2d via javascript fully?
I prefer to use script language to control game elements.
Welcome any comment
This may no longer be the case as it has recently changed with the new Javascript bindings: https://github.com/cocos2d/cocos2d-iphone/wiki/cocos2d-and-JavaScript
The only languages available to program with cocos2d on the iPhone are C++ and Objective-c as far as i'm aware. (I've been programming for the iPhone SDK for nearly 2 years with cocos2d and have never seen javascript mentioned.)
http://www.cocos2d-iphone.org
Related
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 :)
Apart from C#, JavaScript and Boo, can one use Objective C as a programming language for developing 3d games for iPhone/iPad in Unity3D?
Quite a few 3D games (and some top ones at that) run on the Unity3 engine, it is no longer slow or sluggish and can save you a LOT of development time.
Check out the Unity3 iOS page.
Nope. You cannot use Objective C to completely write your game code. Supported languages are C#, Javascript and Boo. (Though Unity is no more providing Boo's scripting reference)
Below is the reference of unity scripting documents which contains details of API usage in C# and Javascript.
http://docs.unity3d.com/ScriptReference/
Yes, you can use Objective-C as a programming language for developing games in Unity3d.
Unity iPhone Examples
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).
Is it possible to run Lua interpreter on the iphone?
If yes, are there any libraries that have bindings to Iphone's SDK?
If its not possible with Lua, what are the other language options?
See the Ansca Corona SDK.
In addition to the Corona SDK mentioned above, see also iPhone Wax.
Yes, many applications on the store (specifically games) have used Lua. However, be advised, with section 3.3.1 of the new developers agreement, calling into iPhone SDK routines from a language other than C/C++ or Objective-C/Objective-C++ is explicitly forbidden (included also is JavaScript but only on the WebKit engine, not outside of it). Therefore, if you're getting the idea you'll write your application in lua, be aware that even if it makes it through review, which is unlikely, it could be pulled at any point if you're using it for calling iPhone SDK routines.
Apple has recently revised their TOS to explicitly allow for Lua engines such as the one in Ansca Corona. So there is no need for worry about that.
Moai is a Lua based cross-platform SDK which supports iOS among other targets. They recently had their 1.0 release and have a few pro studios using them (Double Fine, Harebrained Schemes). Worth checking out. It's a lot less noob-friendly than Corona (their tag line is "for pro game developers"), but unlike Corona it's free and open source, and very fast.
Touch Lua, Its free, its simple!
https://itunes.apple.com/us/app/touch-lua/id525273327?mt=8
https://sites.google.com/site/hawwashsoft/touch-lua
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