3
votes
How can I cleanly separate the UI from the game logic in my Cocos2d game?
I agree with Engineer's answer, where the main point is "don't fight the framework".
Games are different
However, another point I want to add is that when it comes to software, games are different.
...
1
vote
How to use a mask texture with Kobold2D
First draw the mask sprite, with the src color (the mask) set to GL_ONE and the destination color (an empty buffer) to GL_ZERO.
Draw the sprite, with the src color set to GL_DST_ALPHA.
Call the ...
1
vote
Box2d: High screen resolution / frequency causes high friction?
The problem is with high freequency 120Hz
Solution is to set fixed deltaTime for update physics world instead of using graphic update time
...
1
vote
Adjusting arms of character while moving
I was able to get what I was asking for by copying the sprite, then removing it and adding it back. I also made sure to not "add" another action on top on top of the copied sprite, as Cocos2d keeps ...
1
vote
Cocos2dx - Create the friction of the ground
Old thread but I wanted to put my two cents in since I needed something like this on a project I worked on.
You can create a physics body for a sprite with a specified material. This would look ...
1
vote
Cocos2d JS - Getting vector reflection
Kevin ven der Velden's answer is close, but gets the types wrong.
The dot product of two vectors returns a scalar (float)
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
cocos2d × 275cocos2d-iphone × 94
ios × 41
cocos2d-x × 40
iphone × 38
android × 29
box2d × 28
objective-c × 27
sprites × 21
c++ × 13
physics × 11
animation × 11
ccsprite × 10
textures × 8
spritesheet × 8
mathematics × 7
javascript × 7
cocos2d-x-js × 7
opengl × 6
unity × 5
collision-detection × 5
rotation × 5
multiplayer × 5
tilemap × 5
2d × 4