Skip to content

Conversation

@D8H
Copy link
Contributor

@D8H D8H commented Mar 11, 2023

@D8H D8H added ✨ New extension A new extension 🔍 Reviewed extension An extension that is to be reviewed in great detail before merging. labels Mar 11, 2023
@D8H D8H self-assigned this Mar 11, 2023
@D8H D8H marked this pull request as ready for review March 12, 2023 01:36
@D8H D8H requested review from a team as code owners March 12, 2023 01:36
@D8H D8H force-pushed the top-down-animator branch 2 times, most recently from cc2a0b5 to 0d5fca2 Compare March 12, 2023 12:39
@GDevelopApp GDevelopApp deleted a comment from github-actions bot Mar 12, 2023
"value": "Walk",
"type": "String",
"label": "Animation name",
"description": "Animations must be called \"Walk0\", \"Walk1\"... for left, down...",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add more details here? I think it has to be exhaustive to be really helpful

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It gives the start and the direction. I think giving more won't help. Especially because there are not necessarily only 4 directions.

},
{
"description": "Check if the animation is scaled according to speed.",
"fullName": "Scale animation according to speed",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand what this means

Copy link
Contributor Author

@D8H D8H Mar 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It uses this action
image

@AlexandreSi
Copy link
Contributor

image

Looking at this, I wonder: - What is the top-down movement selector? (I don't know if we can hide it since I think there is no use in changing it for the user) - Comparing to the platformer character animator:

image

I understand why you did it like that (easier with numbers I guess) but it seems a bit obscure from a non-programmer point of view I would say. Do you think it could be possible to have a similar interface as the platformer one?

"value": "Walk",
"type": "String",
"label": "Animation name",
"description": "Animations must be called \"Walk0\", \"Walk1\"... for left, down...",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"description": "Animations must be called \"Walk0\", \"Walk1\"... for left, down...",
"description": "Animations must be called \"Walk0\", \"Walk1\"... for right, down...",

@D8H
Copy link
Contributor Author

D8H commented Mar 13, 2023

Looking at this, I wonder: - What is the top-down movement selector? (I don't know if we can hide it since I think there is no use in changing it for the user) - Comparing to the platformer character animator:

It's a required behavior. It allows users to understand why this extension was added automatically and why they can't remove it while keeping this behavior.

I understand why you did it like that (easier with numbers I guess) but it seems a bit obscure from a non-programmer point of view I would say. Do you think it could be possible to have a similar interface as the platformer one?

It's not possible because 8 is not a hard limit. Analog sticks allow any direction so games could need 64 animations.
There is the same issue with path finding where more that 8 directions is the canonical case and I think it's best to have the same interface for both.

It has the advantage to be quick to suffix (8 directions * 6 animations of 20 frames can be long to do) and numbers are more universal than words.

It's not easy to understand by just reading the description but looking at an example or a tutorial make it obvious.

@D8H
Copy link
Contributor Author

D8H commented Mar 14, 2023

In the case of this extension the movement angle is used which is kind of the same as using the acceleration vector. Characters rotate as soon as a key is pressed even if there inertial make them move in the opposite direction.

For other movements with indirect player control, the speed can be used. We could probably do a generic extension that is based on the change of position. Both have advantages and draw backs:

Generic (position delta):

  • only one extension to implement
  • can work with movement that uses several behaviors
  • the extension list is not flooded by 4 animators (Should the 4 animators be in the same extension? The one that use community behaviors must be included in the extension directly.)
  • the speed doesn't necessarily reflect the players intent (inertia).
  • if something should not change the direction like a knock back, it will make things harder.

Dedicated (movement angle):

  • teleporting an object don't mess the direction
  • has access to more information that could allow some features (it's the case for top-down)
  • users are forced to use an animator that work well (using a generic animator for the top-down would not good in most cases)

An animator behavior can be useful with:

  • Pathfinding
  • Forces
  • Phisics2
  • Predetermined paths
    • Curved movement
    • Ellipse movement
    • Rectangular movement
    • Boids
    • ...

@D8H D8H force-pushed the top-down-animator branch from da1040a to 8247b0e Compare September 10, 2023 12:25
@D8H D8H added 👨‍👩‍👧‍👦 Community extension An extension submission to be merged ASAP with a lightweight review. and removed 🔍 Reviewed extension An extension that is to be reviewed in great detail before merging. labels Sep 10, 2023
@D8H
Copy link
Contributor Author

D8H commented Sep 10, 2023

I'm merging it in the community list as it's a question that comes back from time to time.

@D8H D8H changed the title [Top-down movement animator] Change the animation according to the movement direction [Community] [Top-down movement animator] Change the animation according to the movement direction Sep 10, 2023
@D8H D8H changed the title [Community] [Top-down movement animator] Change the animation according to the movement direction [Community] [Top-down movement animator] Change the animation according to the top-down movement direction Sep 10, 2023
@D8H D8H merged commit 69cfe6a into main Sep 10, 2023
@D8H D8H deleted the top-down-animator branch September 10, 2023 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

👨‍👩‍👧‍👦 Community extension An extension submission to be merged ASAP with a lightweight review. ✨ New extension A new extension

Projects

Status: Added to GDevelop

Development

Successfully merging this pull request may close these issues.

3 participants