Skip to main content
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. ...
Raphael Schmitz's user avatar
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 ...
OKprogrammer's user avatar
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 ...
David Tran's user avatar
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 ...
Bennybear's user avatar
  • 125
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 ...
phigmint's user avatar
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) ...
DMGregory's user avatar
  • 141k

Only top scored, non community-wiki answers of a minimum length are eligible