TeamPorcupine / ProjectPorcupine

Project Porcupine: A Base-Building Game...in Space!
GNU General Public License v3.0
483 stars 280 forks source link

Animated character - is it to early? #142

Closed Tranberry closed 7 years ago

Tranberry commented 8 years ago

I want to try my hand at making a a place-holder character that is animated. But I would like to know what the community have to say on that topic.

Is it just a waste of time or would it be a good thing to chisel out now?


If I was to start I would make something similar to these #102 exploded and animated with the animator feature of unity, but I could also try some hand-drawn static animation (sprite-sheet).

Raketfart commented 8 years ago

I think it's fine to work on it now. I would prefer sprite-sheet animation, as it's more in line with the rest of the project, using png and xml files. It would not depend on Unity very much, and allow for easy modding.

alexanderfast commented 8 years ago

If you want to do it then do it. Animations should be implemented completely separate from any game logic (at least in this game) so it's never too early (nor too late):

Tranberry commented 8 years ago

@Raketfart That was my guess (and fear). That will take days to make* compared to the unity animator way.

* looking ok'ish.

@Mizipzor I think Raketfart has a valid point in not using prefabs(animator), and frankly I don't think I will spend much time on that then.

If I was to make a useful place-holder animated character should it be like this http://manningkrull.com/pixel-art/walking.php with few frames or should it be AAA grade, I'm thinking simple but I'm not sure.

A drawback with this (hand drawn) animation is that if there will be a clothes feature, each animation needs to be redrawn.

Raketfart commented 8 years ago

If you want, I'll do some spritesheets for you.

Tranberry commented 8 years ago

@Raketfart I would like that

Raketfart commented 8 years ago

Here is a modified version of KenneyNL's sprites. It's still very much placeholder art, but should be enough to get us started.

Here is a preview (with background) preview

This is an xml file, containing coordinates (I couldn't attach .xml directly): p1_front_animated.txt

Here is the png file. I hope you can flip the east facing parts for west facing parts. Otherwise I'll add those. p1_animated

Not sure how you want the xml file to describe the animation, but I'll leave that up to you.

Tranberry commented 8 years ago

I'd say that is exactly what I wanted to do, now it's simply adding stuff over this to change the sprite. I wonder if we should dive into clothes and 'wearables' and how that will work.

RodRitter commented 8 years ago

Those are pretty cool. I don't see why you can't add it as a Unity animated sprite.

Tranberry commented 8 years ago

@RodRitter I'm not sure that you are talking about my comment on unity animator or not. But this is a pre-made sprite not using unity [Animator] at all, it's much harder to do imo but you don't have to make a prefab.

RodRitter commented 8 years ago

What do you mean? You literally add the png and let Unity automatically slice it up. Then you drag in the frames you want as an animation. It will create an animation for it.

Tranberry commented 8 years ago

unity Animator not animation. Eg the state-machine animation editor.

Sommerbo commented 8 years ago

Using Unitys animator would produce a Asset-file that isn't moddable. And since moddablity without Unity is one stated goal it would be counterproductive to add unmoddable animations.

RodRitter commented 8 years ago

Sorry, I never read your comment properly. I still think it will be nice to add an animated character for now (even if it's un-moddable).

Tranberry commented 8 years ago

No worries, but this @Raketfart animation will be moddable.

Raketfart commented 8 years ago

@Tranberry He should at least be able to take off his helmet when indoors :-) Maybe this is for a later version of the animation system, but the helmet spritesheet could easily be seperate from the character spritesheet.

RodRitter commented 8 years ago

Oh right. Then that's awesome. I need to really read the full thread before I post comments.

polak-jan commented 8 years ago

Can I claim the animation controller please. Or is somebody ellse already working on it?

Raketfart commented 8 years ago

If any of you want, here is all 3 spritesheets. Character with helmet, Character without helmet, and the helmet in seperate files.

p1_animated.zip

Maybe animationspeed should be in the xml file, so 2 step animation could easily be replaced by 4 step animation.

polak-jan commented 8 years ago

will work on this. thanks for idea

alexanderfast commented 8 years ago

@Raketfart add the spritesheet yourself and make a pull request to @BeefEX's fork. That way you get proper attribution, something that I think is important. If he adds them, it looks like he made them.

Raketfart commented 8 years ago

@Mizipzor That sounds awfully complicated for a git-rookie who only uses the GUI client. I don't really care about getting credit for this, as this is only placeholder graphics.

alexanderfast commented 8 years ago

@Raketfart I suppose that is up to you, but I would take this opportunity to learn Git. :) Isn't learning the point of this? And, for the record, is it not complicated at all.

Raketfart commented 8 years ago

@Mizipzor Yeah, I'm trying to learn Git, but right now the various txt files are messing up my GUI client. I'll wait for some of these PR to get merged, as that should hopefully fix it. Then I'll definetly experiment more.

alexanderfast commented 8 years ago

@Raketfart Good call. Keep track of #143.

Tranberry commented 8 years ago

I'm not going to upload/pull anyone else work if that is what you are talking about @Mizipzor . I would use this as a base animation sheet to make my own characters if I was going to upload/pull anything.


Beside that I'm weary of uploading graphics so early and without input from @quill18 .

polak-jan commented 8 years ago

After thinking a bit, i decided that i will just use the current system for loading sprites. But than you have to specify attributes of the furniture or character in the XML file, whitch will cause this sprite to show up. Do you agree with this idea?

polak-jan commented 8 years ago

This way it would be possible to you same system for both static images and animations.

Tranberry commented 8 years ago

I'm for trying to stay on the current path as much as possible, small incremental changes seems to be the best way.

polak-jan commented 8 years ago

Thats how i think too. Just got idea on how to implement it without breaking current system. :smile:

Raketfart commented 8 years ago

@Tranberry @BeefEX I'm not sure if you're both working on this, but just to be clear - you are welcome to use these graphics in your PR's with animation controllers. Doesn't have to slow you down, by having to wait for a merged PR from me.

Tranberry commented 8 years ago

@Raketfart I'm using your spritesheet for reference, I'm pretty new to 2D animation the classic way so your work helps a lot, thanks again!

polak-jan commented 8 years ago

@Tranberry so you are working on animation controller too?

polak-jan commented 8 years ago

@Tranberry or are you just making animations?

Tranberry commented 8 years ago

No go ahead, I'm not claiming anything. Currently I'm testing different ways to animate this kind of character.

polak-jan commented 8 years ago

Got animations working on doors. I will go sleep now and tomorrow I will finish it for characters too.

Raketfart commented 7 years ago

I added the graphics to PR #444

vogonistic commented 7 years ago

Who is interested in working on animating the sprites now that we have them?

Raketfart commented 7 years ago

I think @BeefEX is working on it. If he's not, I'd like to give it a go.

Tranberry commented 7 years ago

18plus_01

How will this system work, I mean we will want clothing and other changes to the character.

vogonistic commented 7 years ago

Someone please tell me that we can easily layer sprites on this guy

Raketfart commented 7 years ago

Wow - nice job @Tranberry! I think the helmet can easily be seperate as it is en the current build, and the body will probably have to be clothes and walkcycle. Maybe color variations could be done in code, if the image is loaded in layers.

@vogonistic We can easily layer sprites on that guy. (maybe. I hope.)

Raketfart commented 7 years ago

I hope I'm not stepping on any toes here. I know BeefEx is working on animation, but I couldn't wait, so I made a CharacterAnimation in PR #669. Sorry

Raketfart commented 7 years ago

I have an idea for changing colors. I'm still working on it, but essentially this can replace any color in the sprite with the "charactercolor". This could replace the blue color with any other color. The only drawback, is we have to limit this to a couple of fixed colors that can't be used elsewhere (like greenscreen). We could have a maincolor, hightlightcolor and shadowcolor that gets replaced.

I made a very fast example here: colorchange

Tranberry commented 7 years ago

pixelatedspacefarerspritesheet

First 'final' draft, if anyone wants to play with it. No masking layers yet (I'm on lunch might take some time).

Raketfart commented 7 years ago

I do! But this image is 786x786, so larger than the 512x512 original spritesheet. What pixelPerUnit should it use? Or is the character just supposed to be a bit larger?

You don't have to make a masking layer, we just define your colors like this, and the blue line will be replaced: Color32 fromColorMain = new Color32(71, 86, 163, 255); Color32 fromColorLight = new Color32(142, 154, 212, 255); Color32 fromColorDark = new Color32(42, 56, 126, 255);

Tranberry commented 7 years ago

I'll fix that. pixelatedspacefarerspritesheet

Raketfart commented 7 years ago

This looks SOOO cool. Good job @Tranberry colors

Is it possible to have this guy without helmet in this spritesheet, and then the helmet in a separate spritesheet but same locations as now? Then he can remove the helmet when indoors. Or is it easier to just have two spritesheets - one with helmet, and one without?

Tranberry commented 7 years ago

I'm on it! (helmet-less character)

Raketfart commented 7 years ago

I just changed the recoloring to using a shader, which was much faster. The way that works, is the shader ONLY looks at the red value, if they match, it replaces the color. So for example any color with red 151 will be replaced by charactercolor It's almost done!

quill18 commented 7 years ago

:+1: