Poll: Animation System

0 favourites
From the Asset Store
3 pixel charaters with over 8 animations each + animations with a gun
  • Hi all,

    In my relentless feature-trimming in C2, I've come to wonder about the animations system.

    For example, take animation angles. The animation angles system seems to complicate the UI and engine quite a lot, when I think there may be simpler alternatives. The fact you can specify any angle at all for an animation, such as one at 90 degrees and one at 91 degrees and one at 91.1 degrees, definitely seems to be overkill, especially since Construct has always been good at rotating objects smoothly.

    Some common use cases I'm aware of are:

    1) a platform character with a mirrored copy of the texture for facing left and right. Normally this would be two animation angles under one animation (0 and 180 degrees).

    2) an isometric character which has a different texture for 8 different directions

    3) variations on an animation stowed away in animation angles, which probably shouldn't be in animation angles anyway

    Further, sub-animations are a nice idea, but I'm not convinced anyone's actually used them. I'm not sure what features we thought sub-animations would enable, but it doesn't seem to be anything you can't do with ordinary animations and events. Sub-animations make the UI more complicated and have been a source of tricky bugs in the engine, so I think they should be dropped completely from C2.

    So what could we do instead, that covers all these features, but in a simpler way? I thought about it, and I propose a new system for C2 which:

    • has no sub-animations
    • has no animation angles
    • allows you to arrange animations in to folders, a bit like things in the project bar. For example, you could have an animation folder "Walking", with two animations contained within called "Left" and "Right". The names of these animations would then be "Walking\Left" and "Walking\Right".

    This is more organised than a flat list of animations, while removing the cruft of sub-animations. You can still simulate animation angles with different animations in a folder, e.g. "Walking\Right", "Walking\DownRight", "Walking\Down" etc. and setting up some simple events that chooses them based on the object's angle. There would also be no animation "tags", so behaviors would not try to set animations for you. The events to set up animations are so trivial it doesn't seem worth trying to make the editor do it for you with unnecessary tags and angles gadgetry. Also, predefined tags like "walking" and "shooting" mean Construct is making certain assumptions about the kind of game you're going to be making, and I don't think a general creation tool should assume things like that for you. (Bit of a philosophical point.)

    Another example - take an object with these animations:

    Stopped

    --- Left

    --- Right

    Walking

    --- Left

    --- Right

    Running

    --- Left

    --- Right

    It's dead easy to set the right animation - something like this will do:

    + On left key pressed

    -> Player: set instance variable 'direction' to "left"

    + On right key pressed

    -> Player: set instance variable 'direction' to "right"

    + (negate) Player: is moving

    -> Player: set animation to "Stopped\" & Player.direction

    + Player: is moving

    + Player: speed < 20

    -> Player: set animation to "Walking\" & Player.direction

    + Player: is moving

    + Player: speed >= 20

    -> Player: set animation to "Running\" & Player.direction

    etc.

    To me this system seems just as capable, and a lot simpler both engine-side and for the user. What do you think?

  • The new method looks like it will be alot better. Provided we can have whatever sub-folder names we'd like I would say the new system is perfect. Otherwise I just say it's really good

  • Two questions.

    Will it be possible to import animations at runtime?

    And what do you think about having animations as behaviors?

  • Will it be possible to import animations at runtime?

    Maybe in future, but there are too many other essential features to do first, so anything along those lines is probably going to be postponed 6 months+ away.

    [quote:1dym73cr]And what do you think about having animations as behaviors?

    It's an interesting angle, very innovative, but I don't think it fits. You can't arrange animations in to folders neatly. It also doesn't really make sense to add animations to objects like Text. It also rubs me the wrong way in a general way - I don't think an object "behaves" like it is animated, although it can "behave" like it wraps or like a solid thing. There's also the question, what does a sprite without any animations look like or do? Finally there are technical issues in the engine - unless I made some tricky changes, you'd get multiple "set animation" etc. actions, conditions and expressions for each and every animation you add via a behavior. So nice idea, but in short I don't think it will work.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Fair enough. I figured it would be pretty complicated, plus the fact that you would be adding all that redundant code for each new behavior.

  • I agree with simplifying the system, I never used animation angles or sub-animations. I never really understood what sub-animations were for anyways.

  • The new method sounds good, but I would like the ability to organize animations in folders, similar to how objects and layouts have folders. Something like:

    battle animations

    • running
    • etc

    cinema animations

    • surprised
    • etc

    This would be helpful for situations when you have lots of animations. However, when specifying which animation to use via events, I hope that the expression for the animation would still be simply set animation to "running" the way it was in CC, without having to specify the folder or the direction.

    Also, I certainly hope mirroring will make a return so you won't have to have unnecessary duplicate animations!

  • The new method makes much more sense and is easier to understand and work imo

    A Question about animation internals : On opengl/d3d engines the best method for animating is using one texture / or as less textures as possible and drawing separate parts of this texture to do animations (drawRect , UV etc) . Does it work like this for Canvas too ? Will C2 do animations by rendering separate images for each frame or use spritesheets (internally and/or in editor) ?

  • Text animation? I'm not sure, but that could be coded easily...maybe an easier way to use text in games...

  • 1. I'd like to see something that addresses how animation frames sequence themselves after you drag, drop, and rearrange them inside the animator. Like, if I move frame 12 to frame 1, I'd like the frames to still be able to keep their original visual number (the number they had before I moved them) somehow--perhaps by putting its original number next to it in parentheses?) because when I have a 150 frame animation that I'm chopping up, I'm not going to be able to remember that I moved frame 137 to frame 33's position. I mean really, this would come in so handy for those like myself who have animations with lots of frames and chopping and rearranging is necessary (as is often the case with animations with lots of frames).

    2. Gotta be able to import at run-time based on an event action. Using Loop Index to call up assets in CC is a Godsend. I realize that there are other priorities, but to me this is one of those things that just shouldn't be an afterthought. Being able to call up and manage assets from folders rather than bogging the game file down with them is just beautiful and useful.

  • Something that always bothered me in CC... no calls for flip or mirror in actions.

    Could we get those added for C2?

  • Something that always bothered me in CC... no calls for flip or mirror in actions.

    Could we get those added for C2?

    HTML5's canvas can't mirror or flip images automatically, AFAIK. You'll have to pre-flip and pre-mirror them in the editor, but I'll add tools to make it easier.

    Being able to call up and manage assets from folders rather than bogging the game file down with them is just beautiful and useful.

    You do know if you save as a project everything's already in separate files, in C2? So would it be enough to just be able to manage when those textures are loaded in to memory?

  • The new system with folders seems a nice addition to C2.

    It would be nice if you also had the option to select animations from a list rather than remembering their name and typing them every time in the events. If you don't need to use expressions to pick an animation it can get pretty annoying.

    Another suggestion to the new animation system would be to better integrate it with the picture editor. It would be a lot more productive if you could add, delete, move frames, set speed, loop and preview straight from the picture editor. In my opinion, the Animator tab could be completely removed, then the Project tab would be used instead if you need to organize animations folders.

  • You do know if you save as a project everything's already in separate files, in C2? So would it be enough to just be able to manage when those textures are loaded in to memory?

    I hadn't checked C2 out since the first build I think, and I didn't do much with it at the time, so you'll have to forgive my ignorance on that.

    I see that images are being saved to the "texture" folder. So, say I wanted to call up image files and I wanted seperate folders for seperate batches of images, like "Texture Folder 1" has images 1 through 25, and then I create "Texture Folder 2" and it has images 26 through 51. Would I be able in events to write a Loop-String that searches a specified folder and calls the images in that folder up into the game at runtime? Right now in CC, I can replace images at runtime with other images from folders using a Loop, and I can specify which folder(s) to call the images up from. I'm really hoping that functionality carries over to C2.

  • I don't mind, but I liked the sub-animations. It's going for doing games in which a character has multiple weapons.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)