JSPM

@quenty/conditions

10.2.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 231
  • Score
    100M100P100Q79173F
  • License MIT

Adornee based conditional system that is sufficiently generic to script gameplay.

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@quenty/conditions) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Conditions

    Adornee based conditional system that is sufficiently generic to script gameplay.

    Installation

    npm install @quenty/conditions --save

    Design challenges

    The issue for conditions is they must be scriptable enough that anything can implement them, including external consumers, but flexibile enough that any gameplay can be constructed with them.

    Additionally, we want to observe conditions for an adornee over specifically having them on a loop, so we want to definitely leverage Observables/Rx here.

    Finally, there's a networking component here, where we want to define code once, but network it across many places. But we're also latency sensitive for conditions, that is, we should be able to deny actions as soon as they occur on the client.

    Design results

    For this reason, we end up with basically just a way to bind functions to a folder. Thus, we're scriptable. To allow replication/avoid duplicate implementation at the server/client layer we'll add another layer here where we'll bind conditions to the client/server.