Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Direction offset in animation editor and preview on sprite #2039

Open
lodicolo opened this issue Nov 6, 2023 Discussed in #2028 · 9 comments
Open

feature: Direction offset in animation editor and preview on sprite #2039

lodicolo opened this issue Nov 6, 2023 Discussed in #2028 · 9 comments
Labels
feature request New and valid feature request

Comments

@lodicolo
Copy link
Member

lodicolo commented Nov 6, 2023

Discussed in #2028

Originally posted by da-rulez November 4, 2023
Right now the animation system works perfectly fine for animations that play directly on the player, but making animations for spells that need to rotate and aren't centered is often very hard, and sometimes impossible.

I propose that we make this easier, and at the same time make troubleshooting any animation easier as well:

New option to display an entity in the animation preview box, so you can see how it will look like on that entity (obviously this would need to render in the same way as it does ingame) -> Preview Sprite button is where you can set a graphic.

This selection works similar to setting an event graphic, you can select any frame from any entity animation:

image

Another option to set offsets depending on the direction of the player.

Green outlined is where the user can manage these offsets. The list is auto-populated with the directions a player can look in (4 or 8 directions, depending on the server settings)

image

Outlined in red is the original Revert Changes button which is now made smaller. Add a tooltip that says: Revert changes

@lodicolo lodicolo added the feature request New and valid feature request label Nov 6, 2023
@dhmello
Copy link
Contributor

dhmello commented Nov 6, 2023

Are these options per frames or are they global?

It would be great if you could configure it by frames. If you already have this idea, great.

@da-rulez
Copy link

da-rulez commented Nov 6, 2023

Are these options per frames or are they global?

It would be great if you could configure it by frames. If you already have this idea, great.

Global, I don't really see in which case a frame by frame offset couldn't be solved in the animation graphic itself. Let me know

@lodicolo
Copy link
Member Author

lodicolo commented Nov 6, 2023

@theceltos Can you provide a common use case where it is valuable per frame?

Each frame should already be aligned where it is supposed to be relative to the previous frame, I do not see how a per-frame offset is going to be valuable.

@dhmello
Copy link
Contributor

dhmello commented Nov 6, 2023

I imagine a fireball in the character's hand, where the sprite will have a throwing movement for example, the animation being able to be followed over the character's hand is just an idea.

Or even being able to specify from which angle it can be animated, imagine a wing for example, being able to make an animation of the character going up, X animation, going right, Y animation, etc., would be a great implement in this function

@lodicolo
Copy link
Member Author

lodicolo commented Nov 6, 2023

I think the fireball example is a decent idea, but I also think it goes far beyond the effort most people would be putting in.

There is also no space left in the UI to add frame-specific offsets so I think you should open a discussion referencing this issue to expand upon the feature to add frame-specific offsets, but this will not be addressed until we finish rewriting the editor.

@dhmello
Copy link
Contributor

dhmello commented Nov 6, 2023

A quick solution for animations based on the character's directions would be to place this in the spell editor, where when the spell is used, it will trigger the animation corresponding to the direction the character is looking.

However, this change is already a big leap for the animation editor, and I'm excited to be able to use it one day ^.^

@lodicolo lodicolo changed the title featureL Direction offset in animation editor and preview on sprite feature: Direction offset in animation editor and preview on sprite Nov 6, 2023
@Ezekyuhl
Copy link

Ezekyuhl commented Nov 8, 2023

Kas and I were talking about an issue I was having that may relate to this.

Issue:
When rotations are disabled, the moth is always in the same spot (almost okay, but the Left direction makes it look silly)
When rotations are enabled the moth rotates and pops to all different orientations.
Goal: I would like it to behave as the spritesheet should.

Video:
https://github.com/AscensionGameDev/Intersect-Engine/assets/17024553/1f1296df-dbac-494d-8529-723eb36fca5e

Idea being that we can set animations per direction:

image (6)

(In my case, I think it would also work if a guy could add equipment to the AnimatedSprites list in config.json too, but if this gives more overall use it would be better.)

@Ezekyuhl
Copy link

Another thing I was attempting to do where I ran into the need to set animation by orientation again was emotes, I was going to overlay the facial expressions onto the sprite as an animation, it won't work that way.

@da-rulez
Copy link

The goal is to have an animation per direction instead:

image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New and valid feature request
Projects
None yet
Development

No branches or pull requests

4 participants