@quenty/conditions

10.2.0 • Public • Published

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.

Package Sidebar

Install

npm i @quenty/conditions

Weekly Downloads

92

Version

10.2.0

License

MIT

Unpacked Size

34.5 kB

Total Files

10

Last publish

Collaborators

  • quenty