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
0
votes
1 answer

Changes not applied on AVD?

i am new to cocos2d-x i am making app for Android using cocos2d-x in Android emulator their is no changes applied in it! I mean i change HelloWorld.png to game.png and Hello World to Game but nothing works in emulator it is showing Hello World and…
0
votes
2 answers

Cocos2d-x boundingBox issue

I am developing a game in cocos2d-x for Android and I have run into a problem. _hammer = CCSprite::createWithSpriteFrameName("Hammer.png"); _hammer->setPosition(ccp(_screenSize.width * 0.5f - 4*((_hammer->getContentSize().width) * 0.15f),…
0
votes
1 answer

Issue with the cocos2d game start

i have developed cocos2d game app, here when the game starts the targets starts falling from top to bottom, there is no issues here, after adding code for revmob(ad page), targets are not falling in the screen, i had checked with the revmob code…
DD.
  • 973
  • 2
  • 10
  • 32
0
votes
1 answer

How to use CallFuncND in cocos2d for android

I want to call a method thrice with different parameters and need to have some delay between calling them,inorder to this i want to use CCCallFuncND,but i unable to implement it in my code, please help me do that by giving a simple example of how to…
0
votes
1 answer

Got error on Large Image Size (1600*2560) png format?

I got an error on Large Image size is about 1600*2560. LogCat Detail is below : E/AndroidRuntime(2451): FATAL EXCEPTION: main E/AndroidRuntime(2451): java.lang.OutOfMemoryError E/AndroidRuntime(2451): at…
Akarsh M
  • 1,629
  • 2
  • 24
  • 47
0
votes
1 answer

How to do Pixel collision detected in cocos2d in android

I am new to cocos2d and I am using cocos2d lib in eclipse in java to make a game.I want to do a pixel collision.My game is a 2d game,a ball running in a maze, and i want to detect the collision between the maze wall and the ball, i cant use getpixel…
0
votes
1 answer

Issue with intent in cocos2d android

i have set some condition in the cocos2d-android game app, if the condition=0, the current gamelayers score will be displayed in Gameover.class as highscore, but here when the condition becomes zero, i'm not able to get next layer(Gameover.class)…
DD.
  • 973
  • 2
  • 10
  • 32
0
votes
1 answer

What I do to call An Activity from My CCScene in Cocos2d?

From Activity to CCScene , we implement this code : CCScene scene = Class_name.scene(); CCDirector.sharedDirector().runWithScene(scene); But From CCScene to Call the Activity , What Should I use ? If it is Possible than suggest me to implement…
Akarsh M
  • 1,629
  • 2
  • 24
  • 47
0
votes
2 answers

android screen goes black if I open cocos 2d project after getting out of an activity

The complete code is here my question is: I run the code it runs as expected I press the back button I reopen the app from mobile The screen goes black I have tested this code on Android v2.3 (Gingerbread) OS Is this problem because of cocos 2d…
shankey
  • 343
  • 2
  • 9
0
votes
1 answer

Animation using .png files cocos2dx

I have 34 .png image files for 9 different scenarios. Each time the user picks 1 of those 9 scenarios and according to that I generate animation using the following std::string name; MixingScreen::animation = CCAnimation::create(); // load image…
amyn
  • 922
  • 11
  • 24
0
votes
3 answers

define NDK_ROOT in cocos2DX mutiplatform game environment

I have just started working with cocos2dx android and I am following wonderful tutorial of http://www.raywenderlich.com/33750/cocos2d-x-tutorial-for-ios-and-android-getting-started . Now, I have successfully run my first hello world demo project by…
shaqir saiyed
  • 732
  • 1
  • 10
  • 36
0
votes
0 answers

Filenotfound Exception after resizing .png image

i have an .png image so according to my requirment changed the size, but now in the logcat i'm getting filenotfound exception even though the image is in asset folder, and also there is no capital letter, spaces between it. i could not make out why…
DD.
  • 973
  • 2
  • 10
  • 32
0
votes
0 answers

How Can we rotate the ENDLESS running background?

Below the code have ability to endless background rotation from upward to downward direction OR something else way. I just want opposite from this rotation. I tried but could solve this problem. Anybody suggest me , how to do this ? private void…
Akarsh M
  • 1,629
  • 2
  • 24
  • 47
0
votes
2 answers

How can I rotate ( moving ) the Background cocos2d-android?

I have a background and I just want to repeat my background From : Upward to Downward Direction Downward to Upward Direction Right to Left Direction Left to Right Direction What should I do for it?
Akarsh M
  • 1,629
  • 2
  • 24
  • 47
0
votes
3 answers

How to add listener to a sprite in cocos2d in android

i am working on cocos2d,and i am in the need of adding a listener to a sprite.my code is here public class GameOverScreen extends CCLayer implements KeyHandler { public static CCScene scene(Difficulty difficulty, long totalscore) { CCScene…
Akhilesh Sk
  • 451
  • 4
  • 18