Using a realtime database to track a chess match, allowing for online play alongside being able to rejoin match should the connection drop.
Storing art assets on the cloud and only downloading these assets on the player’s computer when needed.
A UI showing all the available lobbies.
This was made for an assignment during my Bachelor's degree which had me recreate Chess in Unity and implement multiplayer functionality using Firebase. In this game, there is no time limit and at any point, a player can surrender/forfeit the match. Clicking a chess piece will place an overlay onto the board showing the player all the legal moves that piece can perform during this turn, along with a special highlight on moves which will remove an opponent’s piece. Upon a pawn reaching the opposite side of the board, the pawn will be promoted, with the player selecting the new piece.
Using Firebase’s realtime database it was possible to have players host and join online lobbies and play against one another. This involved maintaining the database so that it had all the pieces’ positions on the board. Using a realtime database also made it possible to resume a match should a player’s connection to the lobby drop, as all the match’s data is being saved externally. A player can join a lobby by selecting it from the list of available lobbies.
Not all the assets are on the player’s computer. Before the match starts the player can choose which sprites to use as their chess pieces. These assets are stored using Firebase Storage and are downloaded locally onto the player’s computer when they first decide to use that theme.
Copyright © 2024 Kooldiagon - All Rights Reserved.
Powered by GoDaddy