Final Year Project
This project introduces a modular framework for creating multiplayer games using Go modules for the backend and React components for the frontend.
This repository contains the framework itself, including the backend components as well as a simple application which launches an instance of this; a frontend SDK to support interacting with the framework; and a simple React application which will display all available games and allow them to be played.
It also contains the report that has been created for submission to the School of Computing at the University of Leeds.
Usage
The project is one large Go module, which offers a number of modules to help with game development, as well as the main application itself, which provides a sample webserver which runs an instance of the framework with three games present - Cambio, Blackjack, and a simple Chatroom.
To run the example instance, a YAML config file must be provided.
The easiest way to create this is to copy the example.yaml
at the root of the repository, and fill it out with the required credentials.
To run the application, the following commands can then be used:
go build -o framework go.xela.tech/fascio/cmd
./framework config.yaml
Most IDEs (such as VSCode and Goland) will provide documentation comments above all functions and packages, however documentation can also be generated for the whole module using the godoc
command - a webserver will be launched which presents the documentation pages.
Creating Applications
The Instance
and Application
structs are required to implement a game, an example of which can be found in applications/cambio.go
and gitlab.com/dan.tarr/blackjack
.
Both provide simple card games which fully utilise the framework, and they can be used as a reference for development of your own games!