Dynamic animation using mic volume as trigger - iphone

I am new to iPhone development, and I am looking for someone with experience
to simply tell me whether I am on the right path or to perhaps point me to it
regarding what I am trying to acheive.
I am trying to develop a character animation that reacts to the volume of
the microphone input. Something like Talking Tomcat, except that instead of
having just a face react to the volume, an entire character´s body is involved.
The character has been created in illustrator and it is image based. So
this will be a 2D animation. I have created numerous frames for the different
kinds of reactions the character will have depending on the volume.
For my animation I am using UIViews using its Animation resources and adding
UIImageViews as subviews. I am also using CGAffineTransforms for rotating
images.
I am also relying on Timers to control the different stages of the
animation.
To allow for a more flexible animation, I have created UIViews for the head,
arms, torso and legs of the character. These have been severed into their own
images and I am manipulating these images individually through UIViews.
I can go over my code in more detail if necessary, although any help will be greatly appreciated even if it is something off the bat.

Seeing that you're not an advanced ios developer I would suggest starting with cocos2d.
It has everything you need to start with animation.
Web page and forums has plenty of information on how to do it and... what's most important [to me at least], you've got gurus like Ray Wenderlich writing excellent tutorials like:
http://www.raywenderlich.com/1271/how-to-use-animations-and-sprite-sheets-in-cocos2d

Related

What approach should I use to create animated backgrounds in Unity?

I'm new to Unity and trying to figure out the best way to create animated backgrounds. To be clear, I'm not asking you to give me an exact solution or instructions, and I would be grateful if you just tell me which direction to look in, and I will figure it out by reading the documentation.
I'm interested in how animated backgrounds are created in 2D Unity (for example, as here: https://youtu.be/OxiGlmV6ByA?t=1075 flying leaves are visible on the background). I only thought of using particles or just creating standard animations in Unity. But, the second way seems too long and complex, and about the particles, I'm not sure how much it affects the performance in a mobile game. Google searches mostly give instructions on how to create parallax backgrounds or moving backgrounds in Unity.
In general, I will be grateful if you tell me which approach is the most optimal for creating an animated background in a mobile 2D game in Unity.
The particles system is well optimized, for what you want to do it will not affects the performance, even on mobile.

Sprites for iOS devices

I'm trying to do a little research for my next game that I'm planning to make and just wondering if anyone could give me a little direction.
I'd like to use sprites to show animation, characters walking and such so my question is this. What game engine handles sprites the best?
And how many sprites can be shown per second? Say i had a character walking and wanted it to look pretty fluid, might i be able to get 60fps? or is that way way to high?
Last question.. sorry! If a sprite has more colors and complexity, but is the same file size as something simpler would it take more processing power to display the complex one?
thanks!
James.
I would highly recommend cocos2d for sprite animations. It's very easy to pick up if you already know objective-c. And it's great for working with sprites. The animations are very fluid and when your testing your applications in an iOS simulator, it tells you the frames per second in the bottom left hand corner. The frames per second usually runs at about 60. And regarding the sprite file size, I believe if the file size is the same between two sprites then they require the same amount of processing power.
A good engine to use for it's simplicity is the Sparrow engine for sprites, sound and other things. There is no reason you can't get 60fps. As for your last question, it wouldn't make a difference.

scattering effect

I went through all my resources but I am not getting the scattering effect of an image smoothly. However, I am able to zoom it and I had scattered it but it is not as smooth as I want. I just want to click on a button and it should zoom and the other image should get scatter
I want the image to be scattered as the link given below is it possible in iPhone?
http://www.touchmagix.com/templates/diamond.htm
this is hell lot of graphics. If you intend to achieve this with iPhone sdk, start learning details about CALayer and then try to manipulate the movements of different objects. Which will require lot of coding logic.
My suggestion would be going for Cocos2D and try with the different classes and api's present there. In Cocos2D you can create an image which will act as an actual physical object and you can apply all laws of physics to it. Say if you create a ball, and you push it, the ball will go in the direction of the push and bounce back if it gets hit by any other physical object and you don't require to do any coding for this. Cocos2D takes care of all these things.
Try it.

How to move an NSImageView in a 2D game?

I am porting one of my iPhone apps to the mac, but I cant figure out how to move my NSImageViews around the screen, like i would do with CGpointMake. Also, how do you find the image.center.x in cocoa?
Any help would be great!
This sounds like you're searching for CoreAnimation.
CALayers are made for the things you want. You can specify their "anchorPoint" (their "center") free on them, so you can decide if their center should be in the upper-left corner, in the center or somewhere else.
Also, they are made for animation and such stuff.
Porting from an UIView-Based application is very easy (I have done this myself). Views and Layers are very similar in many aspects.

how to learn "Animations in COCOS2D"

I am new to cocos2d animations and I want to learn it , as always I stops at the point of animation while making iPhone games in cocos2d.
Can any one suggest me the way to learn such animations, so that games animation creating will become easy to make.
Thanks.
Seems like there are 2 ways to go - either your sprites are laid out in a regular fashion and so can be picked off the sprite sheet in a programmatic way, like this first example. The other way is to use a tool like Zwoptex to create the sprite sheet and a corresponding plist that tells Cocos2d where to find the images on the sheet, see second example.
Tutorial for getting sprites off a sheet, using a regular layout:
http://getsetgames.com/2010/04/18/how-to-animate-sprites-in-cocos2d/
The basics are:
Get your images into one large image/texture
Create a CCSpriteSheet using that texture
Create a CCSprite using one of the images in your sprite sheet
Create a CCAnimation and populate it with CCSpriteFrame's - each representing a frame in the animation
Create a CCAnimate action to manage showing each frame and run it on sprite, voila.
The alternative is to use a tool like Zwoptex to configure your images on a sheet which will export the sprite sheet and a plist of details of the images on it.
The first third of this tutorial explains it:
http://www.raywenderlich.com/606/how-to-use-box2d-for-just-collision-detection-with-cocos2d-iphone
Hope that helps,
Chris
There are several cocos2d tutorials avaliable around the net. Also take a look at their docs. Another good resource can be github.com where you'll find at least couple of opensource games made in cocos2d
There are Mainly 2 tools I use for the animation of the images they are:
Texture Packer
Zwoptex
These 2 tools are great to work with it. The Texture Packer has also the integrated the Physics Editor which can be used to integrate the physics in the game. You can get the tutorial of both these animations from Ray Wenderlich Demos.
This course helps you to build a game with Cocos2D, however it costs 99$. But animations are covered in the course, so you might look into that direction as well:
Click here