Welcome to the backend of Ashcrown, a PvP strategy game. This backend has been rebuilt from the ground up and contains all the game's logic and mechanics. While the client code is proprietary due to licensing issues, this repo is where the interesting stuff happens. Explore the code and contribute to the evolution of Ashcrown!
I originally built the backend in Java with SmartFoxServer 2X (SFS2X) but opted to rewrite it as a REST API, leveraging client polling for updates. I replaced the traditional account system with simple play sessions, eliminating the need for a database, mail server, and other account-related infrastructure.
The client code, still developed in Unity, was originally a standalone app available on the App Store, Google Play, and Steam. Due to the time-consuming nature of managing and testing releases across these platforms, even with deployment pipelines, I decided to convert it to WebGL to be playable directly from the browser. Since the game is not resource-intensive, this approach was feasible.
The project is now split into three main components:
-
Ashcrown.Remake.Solo
- This is the base project containing all the core gameplay logic, mechanics, and systems. It's designed to be lightweight and compatible with multiple environments (e.g., Unity, Godot) by targeting
netstandard2.1. This project serves as the foundation for single-player experiences and handles most of the game's logic in isolation.
- This is the base project containing all the core gameplay logic, mechanics, and systems. It's designed to be lightweight and compatible with multiple environments (e.g., Unity, Godot) by targeting
-
Ashcrown.Remake.Online
- This project extends from
.Soloand adds multiplayer-specific functionality. It includes the networked gameplay logic and any additional mechanics required for online PvP matches. By building on.Solo, it avoids duplicating core logic, making the codebase easier to maintain and more consistent.
- This project extends from
-
Ashcrown.Remake.Api
- This project builds on
.Onlineand provides the REST API for the Ashcrown game. It manages session handling, matchmaking, and any other online infrastructure needed for the game. By separating this layer, the API can focus entirely on communication and coordination, while the actual game logic remains in.Onlineand.Solo.
- This project builds on
.Solois the foundation, containing the gameplay mechanics shared across all modes..Onlineadds multiplayer features to.Solofor PvP gameplay..Apiprovides the interface for client-server communication, using.Onlineas its underlying game engine.
This structure makes it easier to maintain the codebase while keeping the different layers modular and focused on their specific responsibilities.
