Poll: Animation System

Discussion and feedback on Construct 2

Post » Thu Jun 23, 2011 10:21 pm

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?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Thu Jun 23, 2011 10:24 pm

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 :P
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Thu Jun 23, 2011 10:31 pm

Two questions.

Will it be possible to import animations at runtime?

And what do you think about having animations as behaviors?
Image Image
B
161
S
48
G
91
Posts: 7,357
Reputation: 67,269

Post » Thu Jun 23, 2011 10:36 pm

[quote="newt":1dym73cr]Will it be possible to import animations at runtime?[/quote:1dym73cr]
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?[/quote:1dym73cr]
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.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Thu Jun 23, 2011 10:57 pm

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.
Image Image
B
161
S
48
G
91
Posts: 7,357
Reputation: 67,269

Post » Thu Jun 23, 2011 11:06 pm

I agree with simplifying the system, I never used animation angles or sub-animations. I never really understood what sub-animations were for anyways.
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Thu Jun 23, 2011 11:06 pm

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!
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Fri Jun 24, 2011 12:40 am

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) ?
B
58
S
13
G
10
Posts: 632
Reputation: 12,505

Post » Fri Jun 24, 2011 12:48 am

Text animation? I'm not sure, but that could be coded easily...maybe an easier way to use text in games...
Ready to Jumpstart with Construct 2? Check out my website:
https://www.jerementor.com
B
53
S
14
G
5
Posts: 47
Reputation: 5,744

Post » Fri Jun 24, 2011 1:00 am

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.
B
12
S
4
G
3
Posts: 426
Reputation: 2,458

Next

Return to Construct 2 General

Who is online

Users browsing this forum: shinichild, Unconnected and 0 guests