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?