Engine-Template/README.md
2025-08-05 21:41:25 +03:00

80 lines
2.2 KiB
Markdown

# C# Game Project Template
> A modular template for building games using my C# game engine.
---
## 📦 About
This repository provides a starting point for developing games using my C# game engine. It is structured to separate shared game logic from platform-specific implementations. I mostly use it for my own projects.
## ✨ Uses
- [MonoGame](https://monogame.net/) Integration, for it's windowing, audio, packaging etc. You might wanna get familiar with it since most stuff is not abstracted yet like audio.
- [Yaml](https://yaml.org/) Integration, for serialization
- [LiteNetLib](https://revenantx.github.io/LiteNetLib/index.html) Integration, for networking
## 🧱 Project Structure
```txt
📁 Root/
├── Shared/ # Game logic
├── Platforms/
│ ├── Desktop/ # Desktop build target (Windows/Linux/macOS)
│ └── Server/ # Headless/server build target
├── Engine/ # Game engine (as a Git submodule)
└── README.md
```
## 🚀 Getting Started
### 1. Clone the Repository (with Submodules)
```bash
git clone --recursive https://git.syntriax.com/Syntriax/Engine-Template.git
```
⚠️ Make sure to use --recursive to initialize all submodules correctly.
If you've already cloned the repo without submodules, run:
```bash
git submodule update --init --recursive
```
### 2. Write Your Logic Code
All your universe logic should go inside the Shared/ folder.
This structure allows your code to be reused across multiple platform targets like Desktop and Server.
```txt
📁 Root/
└── Shared/
└── Behaviours/
├── Movement.cs
└── Jump.cs
```
### 3. Add Your Objects to Your Universe
`Shared/UniverseSource.cs` is set up to be your main shared entry point where you can define your universe objects and their behaviours, add systems you see fit etc.
```txt
📁 Root/
└── Shared/
└── UniverseSource.cs
```
### 4. Set Project Names (Optional)
Update every mention of the `MyUniverse` to reflect your project's name and namespace. For example:
```csharp
MyUniverse.Shared.UniverseSource.ApplyUniverse(universe);
```
## 🛠 Requirements
- .NET SDK (version 9)