A text-based dungeon crawler video game built with .NET 9, featuring both TUI (Terminal User Interface) and GUI options.
- Dual Interface: Play in the terminal (TUI) or graphical window (GUI)
- Dungeon Exploration: Navigate through rooms, collect items, and battle monsters
- Inventory System: Pick up and manage items
- Combat: Engage in turn-based combat with enemies
- Save/Load: Persist your game progress
- .NET 9 - Runtime platform
- Spectre.Console - Terminal UI rendering
- AvaloniaUI - Cross-platform GUI framework
- PostgreSQL - Database persistence (with in-memory option for development)
- Entity Framework Core - ORM for database access
- Serilog - Structured logging
- NUnit - Unit testing framework
This project follows Clean Architecture principles:
src/
├── Core/
│ ├── RuneAndRust.Domain/ # Entities, value objects, domain logic
│ └── RuneAndRust.Application/ # Use cases, interfaces, DTOs
├── Infrastructure/
│ └── RuneAndRust.Infrastructure/ # EF Core, repositories, external services
└── Presentation/
├── RuneAndRust.Presentation.Shared/ # Shared ViewModels
├── RuneAndRust.Presentation.Tui/ # Spectre.Console TUI
└── RuneAndRust.Presentation.Gui/ # AvaloniaUI GUI
- .NET 9 SDK
- Docker (optional, for PostgreSQL)
git clone https://github.com/southpawriter02/rune-rust.git
cd rune-rustIf you want to use PostgreSQL for persistence:
docker-compose up -dBy default, the game uses in-memory storage, so this step is optional.
dotnet builddotnet run --project src/Presentation/RuneAndRust.Presentation.Tuidotnet run --project src/Presentation/RuneAndRust.Presentation.Gui| Command | Description |
|---|---|
n, north |
Move north |
s, south |
Move south |
e, east |
Move east |
w, west |
Move west |
look, l |
Look around the room |
inventory, i |
View your inventory |
take <item> |
Pick up an item |
attack, a |
Attack an enemy |
save |
Save your game |
help, h, ? |
Show help |
quit, q |
Quit the game |
dotnet test- Entities:
Player,Room,Item,Monster,Dungeon,GameSession - Value Objects:
Position,Stats - Services:
CombatService
- Interfaces:
IGameRepository,IGameRenderer,IInputHandler - DTOs: Data transfer objects for UI binding
- Services:
GameSessionService
- Repositories:
InMemoryGameRepository(PostgreSQL repository in development) - Persistence: EF Core
GameDbContext
- TUI: Full game implementation with Spectre.Console
- GUI: Placeholder shell (full implementation planned)
Configuration is in appsettings.json:
{
"ConnectionStrings": {
"GameDatabase": "Host=localhost;Port=5432;Database=runeandrust;Username=postgres;Password=postgres"
},
"Game": {
"UseInMemoryDatabase": true
}
}This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.