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
1
vote
1 answer

Difference between Button and MenuItemImage at Cocos2d-*

What is the difference between Button and MenuItemImage? If I need prepare a menu, does MenuItemImage have something that Button doesn't have? Using of Button instead of MenuItem is bad practise?
1
vote
1 answer

Cocos2d-x onTouchMoved called when no movement is occurring

I'm writing a cocos2d-x 3.71 cross-platform app (ios, android, windows10) and am having trouble with my implementation of touch and hold detection on Android only (ios and windows work just fine). I have tracked the reason for this down to the fact…
Polaris
  • 13
  • 4
1
vote
1 answer

Splash screen not working for Cocossharp game

I try to write a splash screen in my first cocossharp game as write splash in android application. However, it show a black screen and then directly goto gameplayscene. So what should I change? Thank you very much! public class SplashScene :…
Coroner_Rex
  • 323
  • 4
  • 17
1
vote
1 answer

Scene 2D fps drop need to resize atlases maybe there is a better solution?

I'm in the final stages of deploying my game. It all works well , no lags, I have constant 60 FPS on all devices over 480 x 800 resolution that are maybe a Samsung or something similar in brand. However on devices as small as 240 x 320 or on…
1
vote
1 answer

Cocos2d-x compile android cannot run program

created new cocos2d-x 3.6 project with cocos console comnand new -l cpp, all variables are set by running setup.py, then when i try to run cocos compile i get compilation errors. log: log.txt Cheked if there are spaces in paths but there isn't,…
enumm
  • 13
  • 3
1
vote
2 answers

cocos2dx 3.3 animation implementation

I am new in cocos2dx development.I almost learn all basic level of cocos2dx (version 3.3) in android using cpp language. I showing that there are lots of update over cocos2dx.org. In android I am currently developing the tetris game using cocos2dx…
Bhavdip Sagar
  • 1,951
  • 15
  • 27
1
vote
0 answers

Cocos2d Javascript .Apk Crashes on Startup

I made a Cocos2d-js 3.5 project using the "Empty Complete Project" template in Cocos. It runs fine on Android when I debug from Cocos Code, but when I compile an .apk with "cocos compile -p android -m debug", copy it to my Galaxy S4 running…
gg3iii
  • 11
  • 3
1
vote
1 answer

Using Google Play Service in Cocos2d-JS

I am currently developing a game using Cocos2d-JS (http://cocos2d-x.org/wiki/Cocos2d-JS). I want to integrate my game with google play service (https://developers.google.com/games/services/) for achievement and leaderboard. I had done some research…
1
vote
1 answer

How to execute function ONLY after all actions are finished in Cocos2d

Can you guys tell me how can I execute function updateTiles() ONLY after all nodes' actions in function slideTiles(String s) are finished? I tried adding some while loop but it freezes whole program. After running functions one after another the…
Piotr Niewinski
  • 1,298
  • 2
  • 15
  • 27
1
vote
1 answer

Faster blurred screenshot on Android?

I'm currently using the method below to create a blurred screenshot (it's a slightly altered version of a solution found on another thread) and it works but it's rather slow to generate so not very useful if used mid game. Can anyone suggest a…
Mateus
  • 357
  • 1
  • 4
  • 14
1
vote
1 answer

Cocos2d: Activity class & CCLayer class

Im building a game using eclipse and now I wanted to use Cocos2d engine. My problem is I want to merge my done program and sliding menu of cocos2d engine. And now my question is how can I extend my Menu Class to Activity class so I can call onCreate…
1
vote
0 answers

how to Detect when gesture is up, down, left and right Cocos2d-android

I know there are solutions in cocos2d-iphone. but i am stuck while implementing in cocos2d-android. Although google android provides gesture support natively.but i am not sure how can i use this in cocos2d-andoid. I have a CCSprite that I want to…
inderbagga
  • 1,008
  • 1
  • 9
  • 18
1
vote
1 answer

Want to show AdMob Interstitial ads in My Game after game over

Hello I want to show ads (Interstitial) after each game over, but I'm facing some issues. Can someone please help me implement AdMob interstitial? The whole source code only has one class that extends activity. I know how to implement AdMob…
Muhidul Hassan
  • 359
  • 2
  • 4
  • 17
1
vote
0 answers

Porting iOS Spritekit to Android, what is animateWithTexture equivalent?

I've created a new Cocos2d project for Android to try and port across my iOS Spritekit 2D Game to Android and can't seem to figure out how to animate in Android for Cocos2D? My code in iOS I want to port is as follows: SKTexture* crowTexture1 =…
SamoanProgrammer
  • 954
  • 4
  • 13
  • 27
1
vote
1 answer

Android: 1024px image size restriction?

I have png file that contents all images, but I can't load images that are beyond 1024*1024. I tried to load images as texture: InputStream istr = CCDirector.sharedDirector().getActivity().getAssets().open(this.src + "balloon.png"); …
dex07
  • 137
  • 5