Questions tagged [cocos2d-android]

JAVA version for Android development. Cocos2D is an open source framework for building 2D games and graphical applications. Cocos2D-Android and Cocos2D-Android-1 are the two active projects.

Cocos2D for Android is a Java based open source framework for building 2D games and graphical applications. Cocos2D-Android and Cocos2D-Android-1 are the two active projects. The latter is a branch of the former and seems more active.

Both Cocos2D for Android engines are based on the API design of Cocos2D for iPhone, but they are not compatible with each other (Java vs Objective-C).

For more information on the other Cocos2D game engines, see the and tag descriptions.

It is recommended to use the following tags appropriately:

  • Use the tag on questions referring to the Objective-C based framework
  • Use the tag on questions referring to the C++ based cross-platform framework
  • Use the tag on questions referring to the JavaScript based framework
  • Use the tag on questions referring to the Java based frameworks
  • Use the tag on questions referring to the Python based framework
  • Don't use any of the above tags together in the same question, unless your question refers to more than one Cocos2D engine. For example, if you ask "How to port from Cocos2d-iPhone to Cocos2D-x?" you should include both and tags.
398 questions
2
votes
1 answer

NoSuchMethodException in cocos2d-android

I am using cocos2d for android. The CCCallFunc is not working anywhere. It is always throwing NoSuchMethodException. The CCCallFuncN CCCallFuncN hideFunction = CCCallFuncN.action(this, "hidesSprite"); My method public void…
rei_ayanami
  • 135
  • 1
  • 9
2
votes
2 answers

cocos2d-android documentation

I am developing android game using opensource cocos2d-android-1 library available here . I also developed demo application using this tutorial. Now I want to do further development but I am not getting any documentation for this library and how to…
Swapnil
  • 2,409
  • 4
  • 26
  • 48
2
votes
3 answers

getting started with cocos2d for android

Do you know of some tutorials that would help get me started with cocos2d for android? I looked around but I couldn't find any the reason i would like it to be the android version is because I am much better programming in java then C++. All help is…
user1762507
  • 772
  • 9
  • 32
2
votes
0 answers

cocos2d-android How to know app is in background or foreground?

How to know application is running in background or foreground in cocos2d-android ? Right now I am going with standard flow of android onPause,onStop ? But is there any option to know via CCdirector or cocos2d-android that app is in background or…
user1169079
  • 3,053
  • 5
  • 42
  • 71
2
votes
1 answer

move from one scene to another with cocos 2D in android (multi-level)

I want to make a game with levels.that's means in the first level the user have to kill some targets if he wins he pass to the next level with new targets and new background. I use this game tuto! i have these classes ----> package…
wael
  • 444
  • 4
  • 11
2
votes
1 answer

NoSuchMethodException in cocos2d-android in CCCallFunc

I am using cocos2d for android (ZhouWeikuan version). The CCCallFunc is not working anywhere. It is always throwing NoSuchMethodException. A code snippet ... CCJumpBy action7 = CCJumpBy.action(0.4f, CGPoint.ccp(60f,0f), 30f, 1); CCJumpBy…
Nikhil Ranjan
  • 994
  • 12
  • 16
2
votes
4 answers

Cocos2d-Android Custom font not working

I am trying to use custom font in Cocos2d-Android with CClabel, I have added my font file into the assets and trying to use it by name "Faraco_Hand.ttf" and "Faraco_Hand" but its not working, I have googled around but haven't found any solution.…
Omer Abbas
  • 39
  • 1
  • 7
2
votes
1 answer

Moving the camera using a touch input Cocos2D android

I'm trying to make a camera for an android app that moves by dragging on the touch screen to drag the camera across. I'm using the Cocos2D engine for my development. The problem is, whenever you moved your finger on the screen, everything on the…
WingDev
  • 137
  • 5
2
votes
0 answers

Cant understand to transfer data between devices, using cocos2d gaming

I Have already completed the bluetooth CHAT Example on android developer, now i am designing a game and need to transfer the coordinates between the devices. I am using cocos2d and now how to send the data via bluetooth on other device. i need to…
BAdar
  • 21
  • 3
2
votes
1 answer

Cocos2d Android CCRenderTexture example

CCSprite texture1 = CCSprite.sprite("menu_background.png"); CCRenderTexture layerRenderTexture = CCRenderTexture.renderTexture(width,…
mig
  • 21
  • 3
2
votes
4 answers

Android game development with Cocos2d lib

I want to develop game development with Cocos2d . I am following the tutorial http://dan.clarke.name/2011/04/how-to-make-a-simple-android-game-with-cocos2d/ . I added external cocos2d-android.jar file but when i run sample apps then caused following…
2
votes
0 answers

How to do painting in cocos2d android?

I want to do painting on screen as we can do in native android. Here is the example code which is in API demos. http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/graphics/FingerPaint.html I want to do same in…
Nuraiz
  • 1,060
  • 6
  • 17
  • 35
2
votes
2 answers

Can eclipse do auto-complete using external libraries like cocos2d?

I'm using Eclipse in linux. I have created a project using Cocos2D. It's a Java project, but im opening cpp and headers files to write native code. Each time, i compile the native code with ./build_native.sh I will like to know if eclipse could be…
vgonisanz
  • 11,831
  • 13
  • 78
  • 130
1
vote
2 answers

Cocos2d-android - CCGLSurfaceView no class def found, but lib is referenced with source code

I am attempting to follow along to this tut: HERE but using a sprite sheet and animating the sprites. The app builds clean, no errors or warnings, but at runtime i get a java.lang.NoClassDefNotFound error on CCGLSurfaceView, even though i have the…
Joe
  • 1,326
  • 7
  • 34
  • 52
1
vote
1 answer

Can not set PixelFormat on Cocos2d for android

I am trying to setup a rendering format with that function CCTexture2D.setDefaultAlphaPixelFormat(Bitmap.Config.ARGB_8888); but it give me an error cannot find symbol method setDefaultAlphaPixelFormat(android.graphics.Bitmap.Config) Thanks
VyacheslavK
  • 39
  • 1
  • 5