This is a learn-by-doing project involving the SAFE Stack and Akka.Net. It was originally inspired by this Elmish project built by Roman Sachse as documented in this video.
Virtually all of the game logic has been moved server-side and each player has their own set of Actors created to run their instance of the game. You can have multiple client sessions occurring simultaneously, and high scores across players are tracked. There is an automatic player that can be set to play the game unsupervised. It's not infallible, however!
You can see the other players that are active, you can kill them or, if a player has abandoned their Actors (i.e., closed their session) you can adopt that system.
The interface still needs work - it's functional but not very pretty. But I'm getting there!
Any suggestions for improvements gratefully received.
You'll need to install the following pre-requisites in order to build SAFE applications
- The .NET Core SDK
- FAKE 5 installed as a global tool
- The Yarn package manager (you can also use
npm
but the usage ofyarn
is encouraged). - Node LTS installed for the front end components.
- If you're running on OSX or Linux, you'll also need to install Mono.
To concurrently run the server and the client components in watch mode use the following command:
fake build --target run
You will find more documentation about the used F# components at the following places:
If you want to know more about the full Azure Stack and all of it's components (including Azure) visit the official SAFE documentation.
- fake not found - If you fail to execute
fake
from command line after installing it as a global tool, you might need to add it to yourPATH
manually: (e.g.export PATH="$HOME/.dotnet/tools:$PATH"
on unix) - related GitHub issue