How to animate for a 2D ios game? - ios

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.

Related

Whats the fastest way to a draw grid of color on IOS?

Im trying to continually update a grid of colors on my iPhone screen ( testing with 50x50, but would like to scale up later ) I have done some research but can't seem to find an agreed upon solution. I've tested CAShapes and UIBezier paths and colored UIViews, but everything is slow. Is there another option besides diving into OpenGL or Metal? Doesn't need to be crazy fast, just faster than the before-mentioned options. Thanks, I'm working in Objective-C
If you don’t want to dive into Metal then what I found much quicker for an app I wrote years ago was to put my data into a byte array and then use that array to render a bitmap image.
I don’t have all the details now. It used something like an “image provider” and various other parts. But it was much quicker than any other method I tried.
I was able to draw over 5000 “pixels” per frame using it so it should be good For you now.
Then you can either draw it into a view in drawRect or put it into a UIImageView.

How to make a 2D model(moveable) like gomoji app?

I want to make a 2D model in iOS programatically. Like this:
This is taken from the app Gomoji.
I googled it but not get the proper solution.
This character is also moving so it can move hands and the legs meanwhile I want to change the colour of the hands etc.
Could it be possible with SpriteKit, SceneKit, gif, SVG or anything else?
This is an incredible amount of work in code, with SpriteKit and actions.
You might be better off using the puppet features of After Effects to creation motion frame sequences, and then bring them into SpriteKit and string them together and jump between the sequences as necessary.
Start here, to understand the puppetry tools in AE:
https://helpx.adobe.com/after-effects/using/animating-puppet-tools.html
Once you've learnt the lingo, head on over to youtube to pick up tips on how to do 2D arms, head wobbles, etc.
There's also a face animator in the latest versions of After Effects, that might be helpful, too.
Generally speaking, this is still a lot of work. And a lot of fiddling to get it to look "just so". But doing this visually, with manual mouse controls and instant playback before exporting image sequences from AE will be lightyears faster than attempting to do this with joints and code in SpriteKit or any other game engine.

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

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

three.js - create draggable circle

I've just cloned the three.js project from github. I'm interested in creating a circle on a 2d plane that I can drag with my mouse. I have no experience in graphics programming (WebGL or OpenGL).
Can someone please point me in the right direction? I've tried google, but the examples seem too complicated.
Many thanks in advance,
I think this is something you need to have a go at. It's not nearly as complicated as you might think. If the maths are scaring you off, don't worry three.js handles it all for you, you just need to add a camera, some shapes and ask it to render them.
Please do take the time to go through aerotwists three js tutorials as these will give you a good grounding in how to setup a basic scene.
You will quickly realise that once you have a scene you can change objects quite easily using your current scene.
As for dragging things around, I'm sure that will come just try to walk before you can run.

how to make image in texturepacker to use in corona for sprites

hey m beginner to corona...how to make image in texturepacker to use in corona for sprites...
i have tried but it plays the all the images at once ...
You should explain your problem better because just saying "plays all at once" is vague, but in the meantime here's the documentation about spritesheets in case you haven't seen this: http://developer.anscamobile.com/reference/sprite-sheets
It sounds like you may not have made separate animation sequences and so all the frames are being played as one continuous sequence. Look for the commands sprite.newSpriteSet() and sprite.add() to handle the sequencing.

Resources