bridging drawtalking and folk

5 days ago

drawtalking is made up of two core components: the drawtalking client (dt-client, which can be compiled as either an iPad or macOS binary) and the drawtalking server (dt-server, a node-based web server which the client connects to and uses for speech recognition).

drawtalking graphics, rendering, and object state are handled entirely client-side. this means that in order to have dt to meaningfully integrate its interactive behavior with another system (like folk), this information needs to be serialized and sent over to the server to be then passed on.

first: what sort of interface could we even use to share data between dt and folk?

folk has a library which allows it and another system to communicate over a web socket connection. once a WS handshake is completed, you can send statements and set up reactive subscriptions to fire when Statements are added or removed, matching both against individual statements with watch() or against a collection of statements with watchCollected().

if we understand how object tracking information is exposed in the folk environment, we can match dynamically when an object is being tracked to pass to dt. and (reciprocally) keep track of entities being spawned and modified the dt side.