Tagged Questions
0
votes
0answers
15 views
How to get sprites react to touches in cocos2d-android
i have 1 gun when tap on any area on the screen bullets fires out, but according to my requirement there are 3 guns(sprites) when touched on any of the sprites bullets must fire up, when googled i ...
0
votes
0answers
18 views
Android cocos2d getting collision detection to work only on some frames of animation
I have an animated bomb sprite in my game and use CGRect for collision detection:
for (CCSprite bomb : _bombs) {
CGRect bombRect = CGRect.make(bomb.getPosition().x - (scaleFactor * ...
0
votes
1answer
18 views
Android cocos2d getting a sprite to continuously move to a dynamic position
I tried using the MoveTo method in cocos2d to get a sprite to continuously follow my player sprite:
CCMoveTo actionMove = CCMoveTo.action(actualDuration, player.getPosition());
CCSequence actions = ...
0
votes
1answer
29 views
Android cocos2d removing a sprite after animation
I have an object going across the screen with an animation using the following code:
CCSpriteFrameCache.sharedSpriteFrameCache().addSpriteFrames("ninjastar.plist");
CCSpriteSheet projectileSheet = ...
-4
votes
1answer
352 views
“Null Pointer Exception” Animating sprite in cocos2d android [closed]
I am converting this monkey jump game tutorial in android. I have done til monkey sliding right to left and left to right but I am stuck in the part of monkey walking animation. I have tried but ...
1
vote
2answers
440 views
CCSpriteFrameCache: Frame '%s' not found
I have just started using the Cocos2D library for Android. I am trying to make a walking bear animation.
For that I am using a CCSpriteFrameCache, but I'm getting a "frame not found" error in the ...
-1
votes
1answer
144 views
How to integrate ad mob ads in cocos2d android portal?
Could anybody tell me how to integrate ad mob ads in my cocos2d android app.
2
votes
2answers
518 views
Importing a windows project into android using cocos2d-x
What I am trying to do today is to import a full project to Android, but no tutorials are available for that that I have seen. My approach was to create a new android project, copy all the classes and ...
1
vote
2answers
3k views
Create an infinite scroll using CCParallaxNode in Cocos2D-X
I'm trying to create an infinite scroll using two images in a CCParallaxNode, making one move to the end of the scroll when it gets off the screen. I have tried several implementations but none has ...
0
votes
0answers
271 views
Which game engine is more worthwhile for mobile game development [closed]
I have been thinking of starting to learn mobile game development. I recently learned that there are three popular game engines available for android:
AndEngine
cocos2d-android
libGdx
you guys ...
0
votes
1answer
465 views
How do I perform a slice effect like Fruit Ninja?
I want to do slice effect like in Fruit Ninja. Is there any class in Cocos2D like CCBlade? How can I use the CCBlade in Cocos2D on Android?
1
vote
1answer
995 views
How to create a splash (loading) screen in cocos2d for Android?
How to create a splash (loading) screen in cocos2d for Android?
I need a loading screen that shows my app name and after that the next scene will show automatically.
Thanks
0
votes
1answer
301 views
Determining the X, Y co-ordinates in sprite sheets
I am new to Android COCOS2D and developing a simple game to start with. I am developing a game for kids in which the kids shall spell out the names of the fruits they select. I have developed the ...
-1
votes
1answer
229 views
Touching on the particular sprite from the spritesheet
I want to click on the particular sprite from the sprite sheet. For instance i have fruits sprite sheet i want to click on the particular fruit.
Thanks,
Jubin Mehta
-1
votes
1answer
817 views
How to make Moving road/track for android game?
I am very much new to Android game development. and i have little idea about the canvas and open GL. in one of my requirement i wanted to draw a moving road/track(Jazzy). how should i start. please ...
1
vote
0answers
391 views
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 ...
1
vote
1answer
432 views
How can I place a ProgressBar in Android using Cocos 2d?
I want to place a horizontal progress bar in my Android application and I want to change its progress color. I used the following code, but the progress bar is not being displayed.
CCProgressTimer ...
1
vote
2answers
483 views
How can I disable/dim the screen when I click the pause button?
I am working in an android game using cocos2d. I want to dim the background screen when I click the pause button.
How can I do this ?
2
votes
4answers
477 views
Changing background images frequently within a specific time range with Cocos2D
I am working on a game development project for Android. We use the Cocos2d framework. I have to design a page which contains two background images, I need to switch these images repeatedly within ...
1
vote
0answers
398 views
How to create a collidable map with tiled for cocos2d (Android)?
I am using cocos2d to create a game for Android.
I am making a map in Tiled Map Editor and added a property to the ground tiles.
The property name is Collidable and its value is True.
Now I have ...
-4
votes
1answer
228 views
Why does this CCSprite subclass code throw an exception?
I have one problem in inheriting CCSprites in Java. Here is part of my code:
public class Block extends CCSprite
{
static Block temp=null;
static Block newBlock(tetrominoTypes blockType)
{
...
0
votes
1answer
852 views
How do I implement a subclass of CCSprite?
Can someone tell me how to subclass CCSprite on Android?
I've added this snippet of code into my CharacterSprite:
public static CharacterSprite sprite(String fileName) {
return new ...
0
votes
1answer
2k views
How do I animate a spritesheet in cocos2d Android
I'm trying to animate a sprite in a spritesheet, the goal is to make the character walk from left to right. I subclassed CCSprite: CharacterSprite.
this is my code:
...
0
votes
1answer
7k views
Cocos2d android game samples? [closed]
i just know the start the game development in android using Cocos2d.I start the basic from this link
http://dan.clarke.name/2011/04/how-to-make-a-simple-android-game-with-cocos2d/
but i didn`t get ...
0
votes
2answers
2k views
How can I handle a touch event in cocos2d for Android?
How can I handle a touch event in cocos2d for Android? And how to move a sprite using ccTouchesMoved?
-2
votes
1answer
2k views
Objective-C to Java conversion for porting iPhone apps to Android?
can anybody help me to convert this objective-c code to android java.
- (void)ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
if (_mouseJoint != NULL) return;
UITouch *myTouch = ...
1
vote
2answers
660 views
Cocos 2D putting things on the cocos thread or not?
We are using Cocos 2D for Android and are unsure if it's a good thing to execute our non-ui tasks on the Cocos thread as a way to get the animations in our game to pause.
What is the recommended ...