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

Restore game state in cocos2d-android

My game engine uses cocos2d-android framework. If the activity goes to the background and resumes (onStop and onRestart functions are overriden) how can I load the original game state to the resumed CCScene (with player positions, sounds, colors,…
3
votes
2 answers

Where can I find a good tutorial to start programming using Cocos2D-x?

I have some problems to start programming using cocos2D on linux + android. I use the stable release 0.12.0 (2012-03-05) I compile create-linux-eclipse-project.sh correctly It create a TestCocos2D project on the same path I import the android…
vgonisanz
  • 11,831
  • 13
  • 78
  • 130
3
votes
3 answers

cocos2d game in android only shows a black screen

I have experience with cocos2d+iphone and I now want to get some experience with the cocos2d+android. So, I'm following this good tutorial found here http://dan.clarke.name/2011/04/how-to-make-a-simple-android-game-with-cocos2d/ for some reason, I…
Harold
  • 121
  • 2
  • 5
3
votes
0 answers

cocos2d-android CCLabel is blinking while using it as countdown timer

I am using CClabel.setString() for showing countdown timer in my game application, but while updating time it blinks and then update the time. My code is : timerLabel = CCLabel.makeLabel("0.00", "courier", (float)…
Santanu
  • 141
  • 2
  • 11
3
votes
4 answers

How to Store the game score in android cocos2d

I calculates the score in game project using android cocos2d, in that game after finishing the first level it goes to the next level, so i want to store that first level score and also add next level scores. how can i store that scores in…
selva
  • 1,503
  • 3
  • 17
  • 24
3
votes
1 answer

How to save the layer as an image in COCOS2D android

I want to save all of the work done(every object on the screen) as ONE jpeg image in COCOS2D android.
Noman
  • 4,049
  • 10
  • 38
  • 59
3
votes
1 answer

Android cocos2d adding child node throws nullpointer exception

I am very much new to cocos2d.. I am developing an application in android using cocos2d.. In that, public class BaseLayer extends CCLayer { ChildLayer cl = new ChildLayer(); this.addChild(cl); ------------------------------> } public class…
Neela
  • 1,328
  • 4
  • 23
  • 45
3
votes
4 answers

Should I use cocos2D or andengine?

What is the project the more active/Stable? Can you say me the deep diference between cocos2D and andengine?
Christophe Debove
  • 6,088
  • 20
  • 73
  • 124
3
votes
1 answer

Draw a frame outside the sprite to produce a select effect in Cocos2D Android

I have a view which can contain multiple sprites at a time, now i want to have a select effect when ever i touch a sprite. Some Usefull/helping links would be very helpfull.
Farhan
  • 13,290
  • 2
  • 33
  • 59
3
votes
1 answer

Reposition a sprite in Android using Cocos

Context: I am using 2 sprites of 35x5 one on top of other. Problem: On some event i am rescaling the top sprite to 50 %. It gets rescaled but its dimensions remains same and it lies in centre of lower sprite. Think of 2 bars. Top bar getting half…
Farhan
  • 13,290
  • 2
  • 33
  • 59
3
votes
3 answers

how to play background music in android cocos2d

Hi i am new in cocos2d android. I couldn't find SimpleAudioEngine and CDAudioEngine in android cocos2d that is in iphone cocos2d. Then how can i play background music in android.
ArunGJ
  • 2,685
  • 21
  • 27
3
votes
2 answers

How to use Accelerometer in cocos2dx

I've been trying to get the acceleromter to work in cocos2d-x c++. I tried to add this function to my scene which a lot of my Google search results said I should: virtual void didAccelerate(Acceleration *acceleration); That does however give me an…
v_johan
  • 470
  • 3
  • 17
3
votes
1 answer

Displaying a rectangle with a border using Cosos2d Js

I am new to Cocos 2d js..... I want to know how can I draw a rectangle having a border to it using cocos2d js??.. I tried to google but didn't find any sample code or something similar.. which is quite simple to do using HTML and CSS... Thanks.
kaushik reddy
  • 167
  • 3
  • 16
3
votes
1 answer

Black Screen on Android Launch Unless using Landscape Orientation

Using a Nexus 5 (and any of the later android handsets such as Galaxy S5 etc) my game which previously worked fine on other devices, simply shows a black screen when launched, the buttons can be clicked (even though you cannot see them) and the sfx…
user3355723
  • 235
  • 2
  • 11
3
votes
3 answers

Program bash is not found in path?

I have tried many times to set up Cocos2dx in Eclipse, but haven't been able to get it to work. I am getting this error: bash is not found in path I have tried all kinds of stuff available on Stackoverflow but have not found any solution that…
Talha Q
  • 4,350
  • 4
  • 28
  • 40
1 2
3
26 27