How to animate sprite with fluent animation (change in form) in swift? - ios

I'm trying to work on the graphical aspect of a game I'm designing in Xcode using sprite kit, and I was wondering if anyone knows how the main character sprites in games like Leo's Fortune and Badland are animated when touched (they fluff up and morph very fluently). How could this be accomplished and what compatible file type could execute this fluent animation? Is .flv compatible with Xcode? I would rather not change the texture in a keyframe sort of way with a .png because that would require a lot of textures at a high texture switching rate.
Any advice on this matter would be greatly appreciated
Thanks

Related

How to draw lines on the screen for an iOS game

I am working on a game where I need to draw a bunch of lines to create a wireframe sort of object, I can do this in sprite kit using nodes but adding a bunch of nodes to the screen will drop the frame rate down a lot. I don't know how to use OpenGL Es at all so that's not an option for me. Is there anything that would just allow me to draw lines on the screen in Sprite kit without adding nodes or is there another framework that will allow me to do that?
If you want a 3D wireframe then your choices are sprite kit (which is built on top of OpenGL), OpenGL, or Metal. Or I guess you could use somebody's 3rd party framework that is also built on top of OpenGL or Metal.
I tend to agree with nhgrif's comment that you're "I don't know xyz so I can't do that" is needlessly limiting. If you can't do anything that involves learning new APIs then you're never going to get very far as a developer.

Cocos2d spritesheets and animation

I have a bit of a problem that I need help with. I have a sprite I need animated, but the sprite is 600x600 with 25 frames this becomes quite a large spritesheet, infact bigger then the iPhone will allow. What would be a way to get around this limitation? Animate in flash and export for cocos2d? is that even possible?
Shrink it down. Why would you even need such an big sprite?
Or add the frames individually. (Less efficient)
For How to use animations and sprite-sheets in cocos2d Read this is best documentation.
Any image displayed by cocos2d will have to fit within those dimensions as cocos2d, uses OpenGL and all images must be loaded into texture memory.
I’m not sure if some other API gives you a way to load larger images.
For more information read this discussion.
when you make sprite sheet using Texture Packer make .pvr.ccz file instead of output file .png , it will reduce file size.you can also use to load this texture on RGB_4444 texture.

How to animate for a 2D ios game?

I'm planning on making a simple 2D game (I'm leaning towards an endless runner) for the iPhone and am using cocos2d and I can make stand alone images in Photoshop or Illustrator but I'm not sure what the best way to animate them is??
I don't know if I should animate a character running in flash then save each frame as a png and then use something like texture packer to make a sprite sheet or loop the png's together in cocos2d?? I don't know what works well with cocos2d and how to optimize the animation to run smoothly and reduce memory. I'm aware it maybe a broad question but any help or guidance would be appreciated.
You should use sprite sheet and animate the frames using cocos2d.
Here are the tutorials by Ray Wenderlich
Here is the official coco2d video tutorial and sample
Plenty of tutorials out there. Your question is probably going to be flagged and closed in the near future. Try googling your questions first next time.

How do i implement effects in cocos2d?

What is the best and most efficient way to add effects to a game built with cocos2d?
I mean effects like an explosion.
Are they just animation / sprits?
If not, then what should i receive from the designer?
You can run cocos2d project which comes with library and in the top left drop down list you can choose Particle System Test and build it. So you will able to see all basic particle effects cocos2d has.
Also there is a nice application ParticleDesigner, where you can make your nice looking particles and generate a file to add to cocos2d project, it also has a lot of samples, so it would be good for you to download it and see.
And cocos2d supports animations as well, so you can make animations from frames, but of course in the case of explosions particles would look much better
I would take a look at CCParticleSystem and or CCParticleSystemQuad. You or your designer can use tools like ParticleDesigner to create great looking particle effects.

The most effective way of sprite(frame) animation in Monotouch

I would like to know the best(high performance / FPS) way of doing sprite (frame) animations in a MonoTouch project.
I'm doing this very effectively in Android by decoding whole sprite image, clip it at desired sizes and display frames at desired pace.
So, what's the most effective way of doing this in Monotouch, in terms of FPS.
Thanks in advance.
Have you looked at using MonoGame?
The SpriteBatch class works well for us. It is OpenTK/OpenGL underneath, so you could repurpose it for your needs if you don't want to use full MonoGame.
It depends on what are the demands that you have for your sprites.
If your requirements fall in the scope of what CoreAnimation can do, you can just your image into a UIView and use CoreAnimation to animate the view.
If you need more control, MonoGame provides a more comprehensive set of primitives for dealing with sprites.

Resources