Tag Info

New answers tagged

0

To draw a line: http://stackoverflow.com/questions/691648/how-to-draw-a-line-with-cocos2d-iphone To have it follow two points, simply keep track of the desired start and end points, and draw the line using those points for every update. In this specific circumstance, you would use the position of your two objects, something akin to this pseudocode: Point ...


0

I am quoting here from one of my previous posts which you can find here. The easiest solution would be to create the graphics at the size of the highest resolution, but older iPhones have little memory so this solution would only work (smoothly) on the newer models. Instead you should target 2 resolutions. 1920 x 1080 for the iPhone 6(+) and 1136 x 640 for ...


0

I created an drawing app for kids and I think the RenderTexture is the best solution for such applications. You can use visit() method of Sprite and draw(=visit) a point ( probably a circle sprite) on your canvas(=RenderTexture) while touch is moving(=onTouchMoved). Don't forget to call RenderTexture->begin()/end() when using visit function. This if ...



Top 50 recent answers are included