3 ms·
I'm experimenting with this for client-server design in game development, to ensure that the clients are in sync with the server: since the only way to change t
by rphln 5y ago
I'm experimenting with this for client-server design in game development, to ensure that the clients are in sync with the server: since the only way to change the game state is through events, I (as a developer) am unable to forget to implement some notification for something that happens. This also gets me match replays as an extra.
I came across the Update Monad [1] while researching how to use Event Sourcing in functional languages: it basically has the same guarantees of only changing the state through recorded events. Beware though, as it can be quite slow if implemented naively.
[1]: https://chrispenner.ca/posts/update-monad https://chrispenner.ca/posts/update-monad