z0w0 / helm

A functionally reactive game engine, with headgear to protect you from the headache of game development provided.
http://helm-engine.org/
MIT License
600 stars 69 forks source link

Create your own Subscription or add Socket Subscriptions #131

Open fendor opened 6 years ago

fendor commented 6 years ago

First of, this library is awesome!

However, I am trying to implement a Multiplayer Game and I need to use some Communication protocol. I can not really break out of the game loop and listen for arbitrary communication, this would require either non trivial threading, or excessive Spamming of Cmd's.

I'd like to have the possibility to add it to the Helm framework via subscriptions, similar to Elm's approach.

I don't know if it is really necessary to make changes to the Helm framework, if this is already possible I would be grateful for an Example on how to define your own subscriptions.