Dynamically create sprite images for Cocos2d-iPhone

Posted by AlexChilcott on Stack Overflow See other posts from Stack Overflow or by AlexChilcott
Published on 2010-05-18T22:06:00Z Indexed on 2010/05/18 22:10 UTC
Read the original article Hit count: 361

Filed under:
|
|

Hey guys,

I'm working on a platformer, and looking for a way to create a sprite for an arbitrarily sized platform. For example, I may know I have a platform that should appear 200 pixels wide by 32 pixels high, and, say, I have a texture of bricks that I can tile to fill that area. I may also want to draw a black border around the platform. Is this possible at all? Anyone have any ideas for how I might go about doing this? I could always try generating the image on the fly and building a sprite with that image, but I sincerely doubt (hope) that this isn't the most efficient way of doing something like this.

Cheers, Alex

© Stack Overflow or respective owner

Related posts about cocos2d-iphone

Related posts about cocos2d