0
votes
1answer
80 views

Incorrect sprite rotation with atan2() [duplicate]

I want to rotate a sprite so that it faces the mouse cursor/screen touch location. Currently I'm using the following method to compute the angle of rotation. The input position is the target point the ...
2
votes
1answer
70 views

Display CCSprites with a delay

I am a beginner in cocos2d and I wanted to display coin CCSprites as soon as it moves off the screen with a 5 second delay. So this is what I wrote in my main gameplay layer to add 7 coins in a row: ...
3
votes
0answers
171 views

Display and Hide CCSprite with Genie effect

I am new at cocos2D. I started to learn cocos2D with simple game from http://www.raywenderlich.com/tutorials#cocos2d tutorial. Now I'm crazy with animation, so now i want to display CCSprite as OSX ...
1
vote
0answers
244 views

iOS cocos2d - sprite gets stuck in collision detection

I'm developing a top down game in cocos2d and I have collision code that checks collisions between enemies and the player so that they don't go through each other. The code seems to work but the ...
0
votes
2answers
576 views

Collision detection on a 2D hexagonal grid

I'm making a casual grid-based 2D iPhone game using Cocos2D. The grid is a "staggered" hex-like grid consisting of uniformly sized and spaced discs. It looks something like this. I've stored the grid ...
0
votes
1answer
181 views

How to work with two layers or more in cocos2d?

I want to make a game in cocos2d. I don't know too much about it. My question is related to communication between two layers or more. For instance, let's say I want a layer with a scrolling road and ...
-1
votes
2answers
450 views

2D animations frames vs 3D animation for small indie project: timing considerations

pretty lame question but was wondering.. I am developing a 2D game using Cocos2D for iOS. The art work till now is all 2D (is a shooter game) but some of the characters would benefit of complex ...
3
votes
2answers
762 views

2D Animation Smoothness - Delta time vs. Kinematics

I'm animating a sprite in 2D with key frames of rotation and xy-positions. I've recently had a discussion with someone saying that when the device (happens to be an iPad using cocos2D) hits a ...
1
vote
3answers
2k views

Making smooth walk/jump/fly etc animations

i am soon gonna start with developing my own game for the iOS, i have the plan and idea of the game ready. BUT i have 1 question. How do people make such a smooth animation? Lets take for example: ...
2
votes
2answers
529 views

Z-order for cocos2d top-down game with sprite batching

I'm trying to understand how to create z-order system like you can see in http://www.realmofthemadgod.com/ Character is above the tree when he is in front of it and vice versa. Also, I'm planning to ...
3
votes
2answers
500 views

How to deal with procedural terrain, pre-load or real-time calculation?

I have developed an algorithm that generates 2D terrain coordinates for my iOS 2D game. This may be a possible visual output: The coordinates are stored in a 2D array. mVertices[i][0] = ccp(sx, ...
8
votes
2answers
1k views

How to create 2D game terrain?

Last month, I experimented a lot in game development using cocos2d for the iPhone, especially on moving and modifying sprites. However, vertices and polygons are still new stuff for me. I developed ...
4
votes
3answers
614 views

Determine animation frame from interval

I have an array of sprites that are displayed in-order to make an animation. There is code in an update loop that has access to a value 'time' indicating how far along the animation is. Time is a ...
2
votes
3answers
1k views

Help comparing Cocos2d and Unity3d for this project [closed]

I will not go into details, but I would like to hear your opinions about this: Essentially, my project will be a 2d game, with lots of complex levels, where some might be simple and others might be a ...