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

SPEED vs WALK_SPEED #30

Open
IotaBread opened this issue Nov 6, 2021 · 10 comments
Open

SPEED vs WALK_SPEED #30

IotaBread opened this issue Nov 6, 2021 · 10 comments
Labels
discussion changes that need discussion before being implemented good first issue good for new contributors help wanted extra attention is needed t: refactor proposes a refactor

Comments

@IotaBread
Copy link
Member

In #21 I suffixed some entity speed constants with SPEED, while some existing constants (from Yarn) are suffixed with WALK_SPEED. Which one should be used?

@IotaBread IotaBread added the discussion changes that need discussion before being implemented label Nov 6, 2021
@Jamalam360
Copy link
Contributor

I would say SPEED, imo it's descriptive enough, WALK_SPEED is unnecessary when just SPEED is descriptive enough

@OroArmor
Copy link
Member

OroArmor commented Nov 6, 2021

If there are different types of speed, I would preface with WALKING or RUNNING, etc.

I think that MOVEMENT_SPEED should be the default, as it tells what the speed is for, ie not some other state

@Jamalam360
Copy link
Contributor

That's true, are there different types of speed, like Oro mentioned above?

@Bubblie01
Copy link
Contributor

MOVEMENT_SPEED MOVE_SPEED or WALK_SPEED

@Bubblie01
Copy link
Contributor

See through goals or tasks you can actually adjust the speed of the entity depending on whether those are executed. Here, this would serve as mostly a constant but in the entity attribute builder, you also specify a speed constant for it to set a default speed so here id just suggest putting either of those. DEFAULT_SPEED could also work but in some entity classes it gets confusing speed wise due to poor optimization and mojank. So I'd just stick with what oro said, MOVEMENT_SPEED or MOVE_SPEED

@Bubblie01
Copy link
Contributor

When I mean mojank I mean literal dozens of speed variables lmfaooo

@Bubblie01
Copy link
Contributor

In many cases they will have speed vars which are just essentially repeating itself with the same value or just have dozens of variables serving purposes that could have been done with pretty much the same speed var? Speed has to be one of the most weird things with pathfinding sometimes

@Bubblie01
Copy link
Contributor

Entities don't run like the player does, depending on the goal they just increase speed drastically or decrease speed. They may also increase or decrease speed based on status effects etc.

@Bubblie01
Copy link
Contributor

So in a way yes they run but in a way no they don't for player entities there are special animations and are slightly handled differently depending on the players actions unlike how regular entities do it

@NoComment1105 NoComment1105 added update-base used to notify github actions that the base branch should be updated and removed update-base used to notify github actions that the base branch should be updated labels Feb 21, 2022
@OroArmor OroArmor added good first issue good for new contributors help wanted extra attention is needed t: refactor proposes a refactor labels Aug 8, 2022
@ix0rai
Copy link
Member

ix0rai commented Dec 20, 2022

just to throw another opinion in:
I like MOVEMENT_SPEED, unless the entity has multiple ways of moving, in which case WALKING_SPEED, RUNNING_SPEED, etc are best. The reason I think the default should be MOVEMENT is so that entities that do not walk (like fish and phantoms) can remain more consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion changes that need discussion before being implemented good first issue good for new contributors help wanted extra attention is needed t: refactor proposes a refactor
Projects
None yet
Development

No branches or pull requests

6 participants