MysteryMachine / syms-qual

Overwatch fan visual novel written in Clojurescript
1 stars 1 forks source link

Increase support for pure data graphs #27

Open MysteryMachine opened 6 years ago

MysteryMachine commented 6 years ago

Renamed to reflect some more complex considerations. Mutation basic is not BAD, per se, but it it does reflect a sort of inflexibility that might be worth addressing for projects that require bigger scale. To achieve pure data graphs, I would need to offer the following features:

  1. Add a multimethod for dispatching on certain conditional values. Any function that requires a transition can optionally just provide data instead, say, [:true? [:a :b :c] [:d]] where each value would be got-in the main state, and tested for truthiness.
  2. A multimethod for dispatching on animation definitions, used at reify time. This one isn't STRICTLY needed, but you'd be missing out on a nice shorthand.
  3. Deprecate mutative transition in favor making users define transitional multimethods.

Questions to think about:

MysteryMachine commented 6 years ago

Current profiling shows my relatively large game talking 32mb in memory? Idk if this is REALLY important...it can probably be attached later at some point. Even the conditional bits can still just exist as parts of the graph that want functions, that get reified to a function call to a multimethod later...