In this episode, we'll be reconstructing the collectible card system found in games like Clash Royale. Our implementation includes both server-side (Go) and client-side (Unity) code.
The collectible card system allows players to collect, upgrade, and use cards in battles. Cards can be obtained through various means, and their attributes can be enhanced as they are upgraded.
/server
: Contains the Go code for the server-side logic./client
: Contains the Unity scripts for the client-side.
- Navigate to the
server
directory. - Copy the file across to your existing Nakama project. If you have an existing
main.go
file be sure to add the Hiro registration code fromserver/main.go
and base system definition JSON files. - Run the server.
- Navigate to the
client
directory. - Copy the scripts across to your Unity project.
- Be sure you have installed and configured Hiro in your Unity project.
- Initialize the Collectible Card System as shown in
client/CollectibleCardGameCoordinator.cs
. - Run the client.
- Card Collection: Players can collect a variety of cards in their inventory.
- Card Upgrades: Enhance card attributes by upgrading them using in-game resources.
If you encounter any issues or have feedback on the implementation, please raise an issue in the main repository.