https://github.com/hchia93/escape-from-wizard
Escape-style game prototype in C#, powered by A pathfinding. Originally XNA-based, now ported to MonoGame with full content pipeline rebuild.
https://github.com/hchia93/escape-from-wizard
astar-algorithm csharp linux monogame windows xna-framework
Last synced: about 1 month ago
JSON representation
Escape-style game prototype in C#, powered by A pathfinding. Originally XNA-based, now ported to MonoGame with full content pipeline rebuild.
- Host: GitHub
- URL: https://github.com/hchia93/escape-from-wizard
- Owner: hchia93
- License: mit
- Created: 2025-06-03T09:49:18.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-10-03T18:14:01.000Z (8 months ago)
- Last Synced: 2025-10-03T18:42:57.105Z (8 months ago)
- Topics: astar-algorithm, csharp, linux, monogame, windows, xna-framework
- Language: C#
- Homepage:
- Size: 22.1 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# escape-from-wizard


Escape from Wizard is a classic dungeon-escape style game where the player must:
- Navigate through a maze-like map.
- Collect key items scattered around.
- Avoid being caught by roaming Hat Ghosts and the pursuing Wizard.
- Once all key items are collected, quickly locate the exit to achieve victory.
This was originally a university project for `Game Algorithm Design and Analysis` using `C#`, [Microsoft XNA 4.0](https://en.wikipedia.org/wiki/Microsoft_XNA_Game_Studio#:~:text=Microsoft%20XNA%20Game%20Studio%20is,on%20the%20Microsoft%20XNA%20platform.), managed with `TFS`, now migrated to `GitHub` and modernized with **CI/CD**.
## ✨ Features
- Classic dungeon escape gameplay with collectibles and enemy chasers.
- Implementation of `A*` algorithm for intelligent pathfinding.
### Highlight
- Key upgrades (2025)
- Update dependencies: `Microsoft XNA 4.0` (VS2015) to `MonoGame` (VS2022).
- Explored data generation with 'MGCB'
- Modernized with solution generation using scripts, showcasing toolchain mentality.
- Added CI/CD workflow with GitHub Action to build, and upload artifacts, and package release for `Windows` and `Linux`
- Added debug functions for testing and level exploration.
- Basic code refactoring.
## Project Structure
```bash
escape-from-wizard/
├── .github/workflows/ # GitHub Actions CI/CD pipelines
├── img/ # Project screenshots & documentation images
├── script/ # Helper scripts
├── src/ # Main source code and content (C#, MonoGame)
│ ├── Game/Content/ # Game content pipeline (MGCB, assets)
│ ├── Game/Source/ # Game logic, entities, algorithms
│ └── escape-from-wizard.csproj
└── README.md # Project documentation
```
## Project Setup
### Step 1: Generate Solution
Execute the `generate-sln` script depending on the operating system.
**Windows**:
```bash
./script/generate-sln.ps1
```
**Linux**:
```bash
./script/generate-sln.sh
```
### Step 2: Generate Content
Execute the `generate-content` script depending on the operating system.
#### Windows
```bash
./script/generate-content.ps1
```
#### Linux
```bash
./script/generate-content.sh
```
#### Manual Generation
Open `Content.mgcb` with MGCB Editor with the generated solution, and build for the desired platform.
The binaries will be generated at `src/bin/$(Platform)` and `src/obj/$(Platform)`.
For more information, kindly refer to [Generating .xnb files](https://www.trccompsci.online/mediawiki/index.php/Generating_and_using_XNB_files).
## Running Project
### Game Control
`←` `→` `↑` `↓` or `w` `a` `s` `d` to move around.
### Game Objects
| Feature | Description |
|--|--|
| Hiding Tiles (!) | Entering makes the wizard lose sight; pushes the character out after a delay |
| Star | Increases score |
| Wizard | Deal major contact damage |
| Ghost | Deal minor contact damage |
| Purple Potion | Mantatory Quest item (Collect 3) |
| Red Potion | Restores health |
| Colored Door | Blocks player path. Destroy on passing through with its key.|
| Colored Key | Unlocks corresponding color door |
| Exit Sign | Reach it to win |
| Esc | Quit game |
### Debug Functions
| Key | Desciption |
|--|--|
|`F1` | Toggle God Mode|
|`F2` | Full Heals|
|`F3` | Obtained All Keys|
|`F4` | Obtained All Quest Items|
|`F5` | Unlock All Doors|
|`F6` | Toggle Guide Lines|