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
0 answers

How to get round cornered rectangle in cocos2d android?

I am unable to find a way to get round cornered rectangle in cocos2d android.I am writing the code here. CCSprite backGround=CCSprite.sprite("settings_bg.jpg"); backGround.setTextureRect(CGRect.make(0, 0, 350*Define.SCALE_X, 350*Define.SCALE_Y),…
Itisme
  • 53
  • 6
0
votes
0 answers

Getting a black box type texts on other activities after exiting the game activity

I am getting a black box type texts on other activities after exiting the cocos2d game activity. screenshot attached below.: https://www.dropbox.com/s/5r63sn90ftpu3so/Screenshot%202015-01-26%2015.58.06.png?dl=0 i have used cocos2d-android-1 as the…
harshadura
  • 234
  • 1
  • 2
  • 11
0
votes
2 answers

Cocos2d Android Add background in portrait orientation

Hi I have a problem when I try to add a background to using cocos2d. I followed the tutorial Denvycom doing a puzzle but with landscape…
Garmael
  • 422
  • 3
  • 7
  • 19
0
votes
1 answer

SoundEngine can not be resolved cocos2d-android-1

I am learning from here [link] (http://dan.clarke.name/2011/04/how-to-make-a-simple-android-game-with-cocos2d/) but I am stuck at a point where we have to use this SoundEngine.sharedEngine().preloadEffect(context,…
Furqan Ali
  • 137
  • 2
  • 13
0
votes
1 answer

White patches while GameCircle Integration in Cocos2d Android

I am integrating Game Circle SDK & Whisper Sync in my game. I have implemented the code, but it has caused an issue. When I load the game and get the game state from the WhisperSync and set my local variables, white patches are observed in some…
Farooq Arshed
  • 1,984
  • 2
  • 17
  • 26
0
votes
1 answer

Handling a Share Button Click on Android Game

Hi I want handle a click on Screen. The class does not extends an activity class so I cannot use any trivial method to handle the click. I know how to handle the click on android app but I am new to game development so I have limited knowledge about…
0
votes
2 answers

How to get CGRect of a wheel in spriteMoveFinished method in Cocos2d-android?

I am developing a game using Cocos2d, the problem i am facing is while getting CGRect of the wheel which i have placed at anchor points(0.5,0.5) and position at win-size width/2-height/2.I am detecting touch on wheel and i am facing problem in that…
ManishSB
  • 767
  • 9
  • 27
0
votes
1 answer

Cocos2d match target speed to scrolling background

I'm Using Cocos2d Android. I have a scrolling background in Cocos2d, i use this method to make it work : public void moveBackground(float dt) { bg1.setPosition(CGPoint.ccp(bg1.getPosition().x, bg1.getPosition().y - speed)); …
Tsunaze
  • 3,204
  • 7
  • 44
  • 81
0
votes
1 answer

cocos2d-android jar file not supporting xxhdpi screen

I'm new in game development. I'm working on an android game app for which i have used cocos2d-android.jar file to achieve cocos2d functionality. My app is running perfectly fine on all the screen resolutions except the xxhdpi screen size. When i run…
Niks
  • 11
  • 3
0
votes
0 answers

Cocos2d Android adding CCsprite setpositon method lowering image quality?

I have a background.png image which is 4385x801 in pixel.The device that i add this image is 480x800.Now as you see width is greater than device in order to make rolling background.However when i add this sprite setting position according to screen…
0
votes
1 answer

Cocos2d: What a the black stripe below CCGLSurfaceView?

I'm trying to add Admob banner under game scene but some black stripe overlaps half the banner. I removed the banner to see if the problem of Admob but the stripe still there. How can I remove it? Or is there any way to display banner over the…
dex07
  • 137
  • 5
0
votes
1 answer

AdMob + cocos2d: How display banner over game scene?

I'm trying to create my first game based on cocos2d engine but I stuck with AdMob implementation. Banner displays well but if I run the game it overlaps the banner. I've tried a lot of variants but nothing works. How can I display AdMob banner over…
dex07
  • 137
  • 5
0
votes
1 answer

User finishes puzzle with Cocos2D in Android

I have used the tutorial from Here and successfully made a similar puzzle game (with custom layout and imaged tiles) My problem now is to recognize when the user finishes the puzzle.. I am and android developer, but this cocos2d is very new to me. I…
Matan Dahan
  • 390
  • 5
  • 10
0
votes
0 answers

Character texture rendering in cocos2d-android

I am developing a small android game and i want to know how to animate the character movement using cocos2d-android. Thanks in advance
varghesekutty
  • 205
  • 4
  • 13
0
votes
1 answer

How to get the x and y position of the last sprite in an arraylist

I am using cocos2d-android and eclipse, language is java. I have an arraylist of sprites (maximum of 50 sprites) that I generate at the start of my game. I delete the sprites when their positions are off-screen. I want to add new ones (to the…