Skip to content

SamuelChorvat/ashcrown-remake

Repository files navigation

Ashcrown Remake

Run Tests
DigitalOcean Referral Badge

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!

Background on the Remake

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.

Project Structure

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.
  • Ashcrown.Remake.Online

    • This project extends from .Solo and 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.
  • Ashcrown.Remake.Api

    • This project builds on .Online and 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 .Online and .Solo.

How They Work Together

  • .Solo is the foundation, containing the gameplay mechanics shared across all modes.
  • .Online adds multiplayer features to .Solo for PvP gameplay.
  • .Api provides the interface for client-server communication, using .Online as 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.


ReadmeLogo

About

Ashcrown

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages