Jump to content

  • Log In with Google      Sign In   
  • Create Account

Animations


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
13 replies to this topic

#1 mypel16000   Members   -  Reputation: 46

Like
0Likes
Like

Posted 10 February 2013 - 02:56 PM

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.



Sponsor:

#2 Servant of the Lord   Crossbones+   -  Reputation: 20990

Like
3Likes
Like

Posted 10 February 2013 - 03:20 PM

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.
It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.
All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.
Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal

[Fly with me on Twitter] [Google+] [My broken website]

[Need web hosting? I personally like A Small Orange]


#3 mypel16000   Members   -  Reputation: 46

Like
0Likes
Like

Posted 10 February 2013 - 03:54 PM

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?



#4 IggyZuk   Members   -  Reputation: 1058

Like
0Likes
Like

Posted 10 February 2013 - 05:17 PM

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.


#5 Shaquil   Members   -  Reputation: 815

Like
1Likes
Like

Posted 10 February 2013 - 09:57 PM

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.



#6 Servant of the Lord   Crossbones+   -  Reputation: 20990

Like
3Likes
Like

Posted 10 February 2013 - 10:05 PM

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.


It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.
All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.
Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal

[Fly with me on Twitter] [Google+] [My broken website]

[Need web hosting? I personally like A Small Orange]


#7 Fs02   Members   -  Reputation: 430

Like
0Likes
Like

Posted 10 February 2013 - 10:45 PM

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 :)


[my game in #ggj14 : http://www.indiedb.com/games/romance-stalker [my blog : http://surya.volge.net ]


#8 papulko   Members   -  Reputation: 943

Like
0Likes
Like

Posted 11 February 2013 - 01:38 AM

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. 



#9 dougbinks   Members   -  Reputation: 489

Like
2Likes
Like

Posted 11 February 2013 - 04:16 AM

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).



#10 mypel16000   Members   -  Reputation: 46

Like
1Likes
Like

Posted 11 February 2013 - 02:22 PM

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



#11 Khatharr   Crossbones+   -  Reputation: 3038

Like
0Likes
Like

Posted 11 February 2013 - 03:22 PM

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.


Shouganai.

It's not that no one recognizes the problem. It's just that people do what they have to do to solve it. In the end it's either handled or it isn't. There's no benefit from complaining about it even if it sucks.

As for 'giant sprite sheets', good organization, both of the sprites and the frame-finding code, can make that a non-issue.

Edited by Khatharr, 11 February 2013 - 03:31 PM.

void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.

#12 Servant of the Lord   Crossbones+   -  Reputation: 20990

Like
2Likes
Like

Posted 11 February 2013 - 05:44 PM

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

 
1) You can scale and rotate sprites with almost any art program - you don't need to pay for more software that specializes in that.
2) This creates special files in a special format that you'll have to add programming support for in your game (or use the community-provided plugins available).
3) It's trying to sell itself, so it's optimistic about (and likely over-exaggerates) the benefits it actually provides.
4) This is paper-dolling and skeletal rigging - which is nice (and both were already mentioned), but doesn't solve the primary difficulty of animations.
5) If someone is trying to sell you a piece of software for $25 dollars that makes art so easy that "you don't even need to hire an artist", stop and ask yourself why everyone who runs businesses making games bothers to high artists anyway.
 
The primary difficulty in sprites is drawing the same object from different angles. No software can solve that problem. Observe:
 
Guy wearing hat
 hattedsprite.png
 
Guy no longer wearing hat - the software cannot re-draw the hat at a different angle.
hatlesssprite.png 

 

An artist had already pre-created the human at different angles (the software didn't generate it either, afaik), but the hat, which was drawn during the video, wasn't pre-created, and thus has to be manually re-drawn at each unique camera angle.
 
Software can only rotate 2D images (that are pretend 3D objects) along the z axis, which has never been a problem for artists. It's when trying to rotate the 2D images along the x and y axes that require the 2D image to be redrawn by the artist and cannot be calculated by the computer (unless you 3D model the object, in which case you are rotating a 3D model and not a 2D image).

 

If I draw a basketball, it's a 2D image. If I asked a computer to re-draw it at a new angle, the computer doesn't know if the 2D image is a pretend 3D image, and if it is, whether it's a flat disc, a sphere, or any number of potential possibilities (maybe it's a round pillar that you're looking straight down on). You just can't create a 3D object from a 2D shape, unless you provide (model) the details of the 3D shape.

 
I'm not saying the software is useless (it looks very interesting, and would be useful in a number of situations), just that it probably isn't the silver bullet that you might think it is, and is only beneficial to certain types of games. You mentioned Limbo in terms of quality, if your game is also sidescrolling like Limbo is, then it might be a worth using! But you'll have to decide that for yourself (in conjunction with your artist), understanding the pros and cons, and understanding the programming cost as well, and recognizing that it still won't solve all the art problems.

 

Since there is a free version, try it out and see! Talk with your artist about it, and if it resolves even 20% of your workload, I'd say it's worth it. But it won't lesson it by 20% for every game project, only with certain ones.


It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.
All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.
Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal

[Fly with me on Twitter] [Google+] [My broken website]

[Need web hosting? I personally like A Small Orange]


#13 mypel16000   Members   -  Reputation: 46

Like
0Likes
Like

Posted 12 February 2013 - 01:53 PM

Very good points, Servant Of the Lord. I have been trying it out and it has been useful for many circumstances ( or at least my artist says it has ) so I was just showing others that it is quite good for 2D games which require animations such as skeletal ones ( as you mentioned earlier )

 

And just to make things clear:

 

 

 

2) This creates special files in a special format that you'll have to add programming support for in your game (or use the community-provided plugins available).

 

Actually, it uses these files sort of like a photoshop's PSD, to save the actual, real-time animation and all its different sprites. There is actually an "Export to PNG option"



#14 Servant of the Lord   Crossbones+   -  Reputation: 20990

Like
1Likes
Like

Posted 12 February 2013 - 02:12 PM

Excellent, I didn't see that on the website. I'm glad it's working for your artist (and he'd know best what works for him)!
It's perfectly fine to abbreviate my username to 'Servant' rather than copy+pasting it all the time.
All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.
Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal

[Fly with me on Twitter] [Google+] [My broken website]

[Need web hosting? I personally like A Small Orange]





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS