Animations

Started by
12 comments, last by Servant of the Lord 11 years, 2 months ago

Hi, I have got to the state where i need to create animations for my game. I know the basic, having a strip of images ang saying draw this one.... after so many frames draw this one..... But this seams like a very time-consuming method. I use C++ and SFML. Surely there must be a way to add animations in a simpler way. I guess there might be some software to create this stripe of images and a library for c++ to read these strips. How do I make good animations. And I mean good as in LIMBO.

Advertisement

I know the basic, having a strip of images ang saying draw this one.... after so many frames draw this one.....

Yes.

But this seams like a very time-consuming method.

Time consuming in what way? To create the art, or to write the code?

I use C++ and SFML. Surely there must be a way to add animations in a simpler way.

Do you mean, easier to create?

I guess there might be some software to create this stripe of images and a library for c++ to read these strips.

Depends on your API. SFML doesn't have native support for animations, because it just uses the "draw one frame, draw next frame" method. Which works perfectly fine.

How do I make good animations. And I mean good as in LIMBO.

To make good animations, you just make more frames.
If it's 5 frames per second, it runs clunkily. 10 frames is slightly smoother. 20 frames is better.

To make smoother animations, and to make better art, you need better artists.

Thanks, good help, but are you saying this method is the only one? I have an artist that works with me, but it takes very long for him to make 20 frames for each animation, seeing as we have many. Is there some piece of software where you can easily create 20 frames from a base image and export it as a strip?

I think I'm OK in the programming side, but just a quick doubt.

I have a player class with many functions, variables..... and one of them is a sprite. I have another class which handles the animation. Basically, it takes a reference to the player object, a file name for the animation and an "interval". What it does, is that it changes the player's sprite to the first frame of the animation's strip. Then it waits for the interval (number of frames) and then adds the width of each frame to a variable so that it changes the player's sprite to the second one. When it's done, it changes the sprite back to it's original image. Is this the correct way of doing it?

Procedural animations are my favorite, a bit more complicated to implement but much more dynamic.

I saw something on kickstarter you might be interested in - http://www.kickstarter.com/projects/esotericsoftware/spine?ref=category

Start by doing what is necessary; then do what is possible; and suddenly you are doing the impossible.

Unfortunately, there is no easy solution. Wait until you start using giant sprite sheets with animations all over the damned place. You'll be smashing your head against the desk. As far as I know, there's no simple method for animating 2D better, and getting better animations requires more frames. A lot of people are going to try to act like this isn't a bad thing. I dunno why. That's how people are on this forum, I guess. But yes, it does suck. It's just that for now there aren't too many ways around it.

You can use skeletal animation on 2D sprites, but it gives them a very distinctive art style that may not be what your game requires.
Yes, it takes time to make art. It takes time to program too!

Your artist, once he's done making one human, should be able to make variations for different humans faster (but still not 'fast').

You can also use paper-dolling (drawing multiple images to compose the character - hair, armor, pants, shirt, weapon, etc... so characters can then be rapidly 'assembled' from various sub-pieces), or even use a program to generate some pre-paper-dolled characters for you.

Another option is creating 3D models, and texturing them, then pre-rendering them to 2D images - but if your artist doesn't know 3D modelling, that requires even more work.

Surely there must be a way to add animations in a simpler way. I guess there might be some software to create this stripe of images and a library for c++ to read these strips.

For SFML, i think you should use AniSprite Class :)

Another option is creating 3D models, and texturing them, then pre-rendering them to 2D images - but if your artist doesn't know 3D modelling, that requires even more work.

This is definately how I would do it, since animating a 3D model requires far less work once the actual model has been made. Besides, a 3D model allows for much more dynamic animations. I believe Limbo has some kind of ragdoll-like physics engine which makes animations much more dynamic than just using frame based animations. This effect is very visible whenever the character is killed, when his head, arms and legs all individually respond to forces like pressure, gravity etc.

Not sure if this is useful, but came across this 2D animation package recently: http://www.synfig.org/cms/

It can export to multiple .png files, which you should be able to stitch together into your sprite sheet (google texture atlas tools if you want to find something to do this for you).

Wow, thanks everyone. This will hopefully help people in need. I was just wondering, because I though you probably would be able to quickly create sprites. I did some extra research and found this:

Spriter

It is a piece of software to create animations. It is very easy to use and works with key-frames, so hopefully, it will be useful for many. You basically have a timeline in which you can add transformations. For a simple, enlarging animation, you could start with a scale factor of 1 and add a keyframe after a second which had a scale factor of 2. What this will do is gradually increase the size of the sprite until it doubles at the end of the second. It can then be exported with as many frames as you want (you don´t have to do them individually!) Great help, seriously

This topic is closed to new replies.

Advertisement