So I'm thinking about what to use for an iphone game, it will be basically be my first iphone game. I am lost between unity3d and cocos2d.
But aside from that, I'm an AS3 developer and when I add items and animate units I usually use the handy .copyPixel() method and play with bitmapData, basically my question is that if I use cocos2d is there a similar feature? I was reading the post:
Cocos2d adding a background image to a layer?
which talks about layers, but my concern is that what if the user has a lot of layers, and then a sprite moving on top of that, if this was done through vectors in flash it would crash (with enough vector animations), is this the case with cocos2d?
For example lets say the game is about making a garden of sort (2d non-isometric) and you add you have
- layer 1 - bg [no animation]
- layer 2 - soil (where plants can be) [no animation]
- layer 3 - plants (40 different plant sprites on display at a single time) [no animation]
- layer 4 - animation of bugs and flies sprites cons开发者_Python百科tantly moving on top
would this be practical? or is there a better way?
Thanks
I think you are doing more work than is needed, since you will be using cocos2d it will do alot of the work for you.
Sounds like in your example a Tile based approach would be best. Here is a link showing how to implement a Tile based game along with some handy apps to design the tiles and stuff:
http://www.raywenderlich.com/1163/how-to-make-a-tile-based-game-with-cocos2d
Also, here is another link to a good way to use spritesheets for your graphics and to implement animations:
http://www.raywenderlich.com/1271/how-to-use-animations-and-sprite-sheets-in-cocos2d
Ray's Tutorials along with the test apps included with cocos2d have been immensely helpful to me in learning cocos2d. Here are two more links to posts for more resources and helpful sites for graphics & sounds.
Cocos2d Resources Need 2D iPhone graphics designed
Happy coding!
精彩评论