๐ป7. Software Architecture
Last updated
Last updated
The TactiCards software systems feature a Ronin Blockchain integration as the project engine. The blockchain is needed for key aspects like security, decentralization and transactional support. In addition to the Game itself, the TactiCards system includes a Ronin marketplace integration, a web application where users can sell and buy cards and other assets.
The TactiCards game application has three components: Frontend, Backend, and Storage.
The UI and game logic is developed in Unity using the C# programming language. The initial target for TacticCards is to be consumed as a web application (WebGL), but Android and iOS clients are also in the roadmap. The platform flexibility is considered during the design and implementation of the backend, meaning the three clients (Web, Android and iOS) are able to interact with the same game backend.
The core logic of the game will be implemented as a composable library that can be reused in the future if native views are required to level up the user experience: Three.js (WebGL) for the Web interface and native apps for Android (Kotlin) and iOS (Swift).
The application is developed using Python. The API endpoints are developed using the framework Fast API and the usual Python stack for web applications, including unit tests with Pytest and Pydantic for schema validation. PyTorch is the library used to train the machine learning models used to provide insights about user engagement and balance card features.
One backend component is the Game Server, which runs over GPU for heavy load requirements to preprocess graphics resources for efficiency.
The backend uses the authentication and authorization for blockchain assets provided by AxieDAO Single Sign-On (SSO) to verify a playerโs Ronin identity. In that way, there will always be consistency between the cards the player has available and the NFTs he really possesses.
The main database is Cloud SQL (Postgres), where the core assets of the game are stored, including cards, users and transactions.
Bigtable is used for streaming requests coming from PubSub to capture user interaction in real-time.
BigQuery is used for data analytics, including user engagement and stats for cards to determine how balanced are different card instances.
The application is deployed in Google Cloud Platform (GCP) following the best practices for Game systems explained in the Google Cloud Game Infrastructure.
For scalability, it uses a Load Balancer that can distribute the requests into multiple API endpoints that can scale on demand. The core application runs in Cloud Run from a Python Docker container that can also run in development machines without discrepancies between development and production environments.
A DevOps approach for continuous deployments is used:
Terraform to provision infrastructure
Docker containers for portability and scalability
GitOps model for deployment from source code
Github actions for continuous integration
GCP cloud computing for scalability and security