Skip to content

Consider splitting ability to run and jump from Walking #7

Description

@marcinn

There may be case, when logic should disable ability to run or jump (i.e. when character is hungry or weak). This can be achieved by introducing a dedicated properties in Walking, i.e. enable_run and enable_jump.

But the logic of running/jumping can be decoupled to a separate Running and Jumping abilities. That would give a possibility to implement own logic, more complex bobbing, adding other types of movements, and finally disabling behaviors easily in controller's top-level logic.

To do this, probably Walking ability must be decoupled to a base Movement ability, then the rest can be implemented as Walk-Run-Jump single component, or as a separate behaviors (one component per ability, i.e. Run, Jump, Walk). The Movement ability can be used as a state manager to handle mutually exclusive movements (may be related to #5)


The Movement ability, implemented to handle mutually exclusive types of movements, will solve #5 in terms of movement, and will handle most common controllers. For unusual player controllers a custom movement ability have to be implemented. I think it's a good enough compromise.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions