Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

difference between cocos2d-x vs cocos2d-js

Tags:

I'm just moving towards mobile apps... A friend of mine told me to start with cocos2d, I'm good in javascript. while searching google for cocos2d, and within cocos2d-x.org I found

  1. cocos2d-x
  2. cocos2d-JSB
  3. cocos2d-html5
  4. cocos2d-Javascript

I know what cocos2d-x is for and what cocos2d-html5 is for, but what is cocos2d-JSB and cocos2d-Javascript?

My questions are..

  1. Can we develop 100% pure native apps/games in cocos2d-JSB and or cocos2d-javascript.
  2. I also know cocos2d-JSB is javascript bindings, but what does that exactly mean?
  3. Last but not least question: what is cocos2d-Javascript for? does that work alone or do we need cocos2d-html5 to make it previewable in iOS/Android/Windows Phone?

My aim is to develop native apps for iOS/Android and Windows.

like image 916
MFarooqi Avatar asked Jun 02 '14 10:06

MFarooqi


People also ask

What is the difference between Cocos2d and Cocos creator?

Cocos2d-x runs using C++, with forks for developers to use JavaScript or Lua as the scripting language, and comes without a game editor. Cocos Creator runs on both JavaScript and TypeScript (with some logic realized with C++) and comes with a free editor to help you build your game.

What programming language does Cocos2d use?

Cocos2D suits companies that decide to build games and interactive apps that are 2D, developed with the C++ programming language, JavaScript, C# and Lua, and can be played on both Android and iOS mobile technologies, as well as across all the main operating systems (Windows, Mac, Linux).

Is Cocos a good game engine?

Testimonials. Cocos Creator is more powerful than others. Plug-in development is easy to use, supports multi-platform, reduces the workload for game developers so that they can be more focused on the games development. Their official technical support is timely to solve problems.

Does Cocos creator use C++?

Cocos Creator, which is a proprietary unified game development tool for Cocos2d-X. As of August 2017, it supports JavaScript and TypeScript only and does not support C++ nor Lua.


2 Answers

Cocos2d-JS is Cocos2d-x engine's javascript version, maintained by Cocos2d-x team. It supports full Cocos2d-x functionality with a set of simplified javascript friendly APIs. It contains two parts: Cocos2d-html5 and Cocos2d-x JavaScript Bindings (JSB), and Cocos2d-html5 is a pure JavaScript engine for web, and Cocos2d JSB is for native app which share the same API with Cocos2d-html5.

So, Cocos2d-JS provides a consistent development experience for whichever platform you want to distribute to, either web and native. You can use it to develop web, android, iOS, mac, windows app. The windows phone8 is coming soon. You can develop your game on browsers with Cocos2d-html5, and then compile to native app with Cocos2d JSB.

Cocos2d-JavaScript is totally different from Cocos2d-html5 and Cocos2d JSB. It was branched from cocos2d-iPhone and maintained by Ryan Williams.

like image 128
Shun Lin Avatar answered Oct 05 '22 04:10

Shun Lin


Cocos2d-X is a complete game engine which can be used to build native apps for android,IOS and windows mobile devices as well as for web platform. Cocos2d JSB is used to create native apps as well as web apps while Cocos2d js is used to create purely web based games. If you do not want to make any native app, you can use Cocos2d lite version also. Cocos2d lite version is a single javascript file having the complete basic functionality of Cocos2d-X. you can use this version to reduce your project size.

like image 35
Prachi Joshi Avatar answered Oct 05 '22 02:10

Prachi Joshi