Home

Awesome

BoardGames

"Board Games" is a Fusion sample and a fully functional web app allowing you to play real-time multiplayer board games.

Note: this repository wasn't updated for a while, so it uses an outdated version of Fusion (v1.3.x, while the current one is v3.7.x). Nevertheless it's still a good example you can play with to learn Fusion. The APIs change, but concepts stay the same :)

<img src="https://img.shields.io/badge/-Live!-green" valign="middle"> Live version of this app: https://boardgames.alexyakunin.com/

A short video explaining what's unique there:

<img src="doc/img/BoardGames.jpg">

The sample implements a number of features that are hard to implement without Fusion. In particular, you might notice that real-time state sync works literally everywhere in it. Try opening the sample in two different browsers, sign in using different user accounts, and:

What's implemented in Board Games

Finally, the sample supports both Blazor Server and Blazor WebAssembly modes.

The live version of this app is hosted on Google Cloud GKE:

Ok, real-time. But seriously, what's so new there?

The implementation cost of real-time updates. Everything you see there required me to write just 35 extra lines of code!

And if you look at everything else, it's absolutely usual code you'd have otherwise too.

More precisely, you'd need at least this "everything else" to implement a non-real-time version of the same sample that supports just Blazor Server.

WASM version would require way more - the approach used in this sample, where server-side services are replaced by their client-side caching replicas (so-called "Replica Services" in Fusion terms) simply won't work without Fusion-style distributed version of "computed observable" that eliminates every RPC call known to return the same result as the locally cached one.

In other words, if you use Fusion, Blazor WASM mode has virtually zero implementation cost as well.

And this is what allowed me build Board Games single-handedly in 9 days. Proof: the very first commit cloning Fusion's Blazorise template was made on Feb 1, and I wrote this README describing what's already done on Feb 10 (though at that point there was just one game).

Looks interesting, how do I learn more about Fusion?

Check out Fusion and its other samples; join our Discord Server to ask questions.

P.S. I am sure there are some bugs - if you'll find one, please report an issue!