quilt-mappings icon indicating copy to clipboard operation
quilt-mappings copied to clipboard

SPEED vs WALK_SPEED

Open IotaBread opened this issue 2 years ago • 10 comments

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 avatar Nov 06 '21 18:11 IotaBread

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

Jamalam360 avatar Nov 06 '21 19:11 Jamalam360

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

OroArmor avatar Nov 06 '21 19:11 OroArmor

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

Jamalam360 avatar Nov 06 '21 19:11 Jamalam360

MOVEMENT_SPEED MOVE_SPEED or WALK_SPEED

Bubblie01 avatar Nov 10 '21 14:11 Bubblie01

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 avatar Nov 10 '21 15:11 Bubblie01

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

Bubblie01 avatar Nov 10 '21 15:11 Bubblie01

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 avatar Nov 10 '21 15:11 Bubblie01

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 avatar Nov 10 '21 15:11 Bubblie01

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

Bubblie01 avatar Nov 10 '21 15:11 Bubblie01