Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Each Game Engine is different and solves different problems in different ways, so the engine design does vary greatly from engine to engine (even though a lot of principles are shared from engine to engine).

Cocos2D is a great product on it’s own, but it doesn’t expose engine functionality to a scripting Language like Lua, JavaScript etc.

My Question: How much important to integrate a Scripting Engine at Cocos2d?

share|improve this question
1  
Cocos2D has JavaScript bindings and Kobold2D which is based on Cocos2D comes with Lua bindings. Since you're writing native code and using an open-source engine you're also free to add in any scripting-language binding you like. –  bummzack Dec 18 '12 at 16:08
    
+1 to your helpful comment. –  Md. Mahbubur Rahman Dec 19 '12 at 5:55
add comment

2 Answers

up vote 2 down vote accepted

Since version 2.1 cocos2d-iphone integrates JavaScript bindings.

More details: https://github.com/cocos2d/cocos2d-iphone/wiki/cocos2d-and-JavaScript

You can find a game done with JS here: https://github.com/vlidholt/CocosDragonJS

share|improve this answer
    
+1 for Good Resource. :) –  Md. Mahbubur Rahman Dec 19 '12 at 5:51
add comment

This is a very relative question. It simply depends on the use of the engine.

If you need or want to be able to do a lot of scripting internally for game designers and to avoid recompiling the projects then it might be very important to expose as much of the game engine to the scripting interface.

But if you want to allow players and moders to use the scripting engine as well you will be much better off writing your own bridge and select the functions exposed to the scripting engine.

Anyway having a scripting engine in a game engine can drastically improve game development.

Again, certain teams never use scripting in games while others never do without.

I believe this is open to discussion.


Edit: Having a scripting engine is a big plus though. Those who don't use it don't have to and they can simply deactivate it.

The perfect engine would have multiple levels with diferent interfaces:

  • Game designers and internal scripts have access to everything
  • 3rd party have access to a limited set of functions

This is how I will try to solve the problem of critical functions (file access, leader boards, authentication process...) being exposed to the scripting interface.

share|improve this answer
    
+1 for Good Answer. –  Md. Mahbubur Rahman Nov 19 '12 at 10:44
    
@MahbuburRAaman Having a scripting engine is a big plus though. Those who don't use it don't have to and they can simply deactivate it. –  Coyote Nov 19 '12 at 12:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.