You are not logged in.
Pages: 1
Yet another suggestion lifted from my experience with OpenBOR.
managing animations through scripting can be a pain. especially because A: most default animations will take priority based on certain events (jump, fall, jump apex,land, just to name a few), and B: keeping track of all the states that cause animation changes can be difficult, especially when debugging.
what I suggest here is that in the animation or character script certain parameters can be used to define when an animation plays.
for example, a sprite script could look like this:
sprite "player"
{
animation 0 "idle"
{
//engine could accept names OR numbers for quicker reference.
you can use this to easily make a template character while knowing what animations look like.
trigger default
//new instruction/command. it defines what makes the animation play.
possible values:
default (managed by .chr file)
input [button combo] (if the player is controlling this entity or input is simulated)
event [name] using the same events as the engine uses with .chr definitions
(jump, fall, walk, run etc.). multiple events could be possible
(roll+in the air, hurt+on the floor, etc)
vars [variable conditions] if the variable matches the expression's value (ex: if $_pause == 0)
you can combine input and event and variable for more complex animation linking
(ex: input up fire1 + event on_the_floor roll + vars collectibles()>0
I'll probably follow up with more ideas and in-depth descriptions
Last edited by KZR (2018-07-20 13:26:25)
https://discord.gg/w8JqM7m ---> Open Surge's Discord server
Offline
Hey KZR, thank you for the suggestion.
Most animations are not programmed (i.e., item boxes).
managing animations through scripting can be a pain.
Most of what you guys used in the old scripting API is no longer applicable in SurgeScript. SurgeScript brings about a different way of doing things. The animation / player API isn't even designed yet, so we don't know how it's gonna be (but it will be simple ). Perhaps we can use this thread to do some brainstorming.
If I understand correctly, you want to link player events with animations. Is that correct?
Offline
I agree, when your character has many actions where the animations overlap eachother it becomes difficult to handle the companions states.
I would like to add, I think it would be super useful if we had a "set_animation_speedfactor" for the player animations.
You can see in Sonic's original trilogy that the speed of the walking and rolling animation is dependent on the player's horizontal speed. In Open Surge, the speed of the animation is always fixed, no mather how the player is moving.
With the newest addition of the smooth angle transition, I think this would be something more that would help polish the game visual presentation.
(You can already do this by attaching an object to the player, but making the player invisible causes him to lose the collision with objects)
Creating and Editing Sprites.
Offline
yes Alex, in a way that's the point of my suggestion.
Either the animation or character scripts should have a way to tell the engine "this animation is only available when..." and "this animation is triggered like this", so that animations don't overlap, and the creator doesn't have to write a lot of "if" cases in the companion script. This not only allows creators to build complex animation trees, it also allows creators to disable or change the logic behind the default animations, and change the control scheme in a simple and easy to remember way by directly linking buttons with animations.
Last edited by KZR (2018-07-23 09:15:24)
https://discord.gg/w8JqM7m ---> Open Surge's Discord server
Offline
What if your companion object spawned a child that just handles animations?
With the new syntax of SurgeScript, things are much simpler.
-----
As an example, you could have a pre-programmed SurgeScript object that, upon receiving input from the user, changes the animation of an actor / character. In its API, you say which input buttons translate to which animations, and then it does the rest automatically.
Offline
Yes, but the problem I've been finding in previous releases (still have to try the new one to see if it still happens), default animations will take priority over scripted, resulting in some awkward moments at the very least.
https://discord.gg/w8JqM7m ---> Open Surge's Discord server
Offline
Pages: 1