Want to create a plugin in Cocos2d for my SDK

I created the SDK, currently for Android and iOS. But now I also have to provide support on the cocos2d platform.

Is there anyone how to do this? I already have these SDKs working on my own. But I look through some blogs, but cannot find an easy tutorial for documentation or a blog to do this.

One thing that I know is that it requires knowledge of the NDK and JNI, which I do not know about.

So it may be nice that someone will guide me or give me a link or tutorial on how to create an extension in cocos2d for my SDK.

Thanks.

+8
android ios android-ndk cocos2d-android
source share
1 answer

First of all , I very much agree that finding wrt cocos2d is pretty tough! :)

Having said that, here are a few pointers / information on how you can do this.

Android Native Development Kit (NDK)

Android applications are usually written in Java with its elegant object-oriented design. However, sometimes you need to overcome the limitations of Java, such as memory management and performance, by programming directly into the Android native interface. Android offers a Native Development Kit (NDK) to support in-house development in C / C ++, in addition to the Android Software Development Kit (Android SDK), which supports Java.

  • An amazing but simple article with code examples can be found on the Android NDK

The best place to start with NDK JNI (given that you know that they are mostly) -


It’s better to start by starting with some basic Cocos2D-X basic training -

  • Cocos2D-X Tutorial for iOS and Android: Getting Started

  • Cocos2d-x final tutorial and tutorial list - stack overflow


Some perfect links to develop plugins -


There used to be a way to Integrate a third-party SDK into the X plugin , but recently I see that they have moved away from this approach and use the SDKBOX , which should simplify the same.

Here is the best and perhaps only a good link that we can get now from an official representative of cocos2d programmersguide .

" SDKBOX is more like an updated version of plugin-x, so in general it’s just a plugin - it doesn’t work on the cloud. The reason it starts is because we want to provide a better solution for integrating with plugins for cocos2d-x, but the fact is that plugin-x always gets low priority over other brilliant new 3D features, so we decided to change that. " - Cocos2d-x developer said .

But SDKBOX is where they develop plugins for you. I think this is something like npm for nodejs.


In any case, some links to links that will help you even more -


** Useful examples ** to learn about SDK development or support -


** Articles on SDKBOX ** that can help you if you are looking for official hosting of your SDK -

Cocos2d-x solves SDK issue with new SDKBOX initiative

The best way to integrate the SDK into your mobile game

Hope this helps! :)

Happy coding!

+5
source share

All Articles