Crystal is the most widely used open-source server and client engine for The Legend of Mir 2, developed and maintained by the LOMCN community. Originally created by Jamie and contributors, Crystal is a modern, fully managed C# implementation of the classic Mir 2 server architecture, designed to be stable, flexible, and easy to build upon.
The project faithfully recreates the gameplay systems of the original 1999 MMORPG by ActozSoft and Wemade Entertainment, while also introducing modern improvements such as:
- Modular, readable C# codebase for both client and server
- Custom map editor and data tools
- Performance improvements and bug fixes over legacy server files
- Support for custom content, new features, and community expansions
- macOS client support (ported from SlimDX/WinForms to MonoGame/SkiaSharp)
Crystal has become the foundation for most private Legend of Mir 2 servers worldwide, serving as a cornerstone of the Mir development scene since its public release on LOMCN.
This fork includes a complete port of the Crystal client to macOS. The client originally depended on SlimDX (DirectX 9), WinForms, NAudio, and other Windows-only technologies. All were replaced with cross-platform alternatives.
Status: Working on macOS. Login scene renders, can log in, create characters, and enter the game world. Windowed mode functional.
| Original (Windows-only) | Replacement (Cross-platform) |
|---|---|
| SlimDX (DirectX 9) | MonoGame.Framework.DesktopGL 3.8.2 |
| System.Drawing / GDI+ | SkiaSharp 2.88.9 |
| NAudio | MonoGame built-in audio (SoundEffect) |
WinForms (RenderForm) |
MonoGame Game class |
WinForms TextBox |
Custom text input (MonoGame TextInput event + SDL2) |
EnumDisplaySettings P/Invoke |
GraphicsAdapter.DefaultAdapter.SupportedDisplayModes |
| WebView2 (Launcher) | Skipped (not needed for game client) |
For a full list of all 56 changed files and detailed technical notes, see PORTING_LOG.md.
The Crystal client and server need game resource files (sprites, maps, sounds, configs, databases) to run. These are not included in the source repository due to their large size.
The LOMCN community maintains a complete resource package:
- Go to https://github.com/Suprcode/Crystal.Database
- Download the latest release archive
- Extract it - you will get folders like
Data/,Map/,Sound/,Envir/,Maps/,Configs/, etc.
- Visit https://www.lomcn.net/forum/forums/crystalm2-releases.635/
- Look for the latest Crystal release thread
- Download the full package which includes both binaries and game files
- Visit https://mirfiles.co.uk/ (community resource archive)
- Navigate to the Mir 2 section
- Download the client files and server files separately
After downloading, place the resource files in the build output directories:
Client resources -> Build/Client/Debug/
Build/Client/Debug/
├── Data/ # Sprite libraries (.Lib files)
│ ├── ChrSel.Lib # Character selection sprites
│ ├── Prguse.Lib # UI elements
│ ├── Background.Lib # Backgrounds
│ ├── Items.Lib # Item sprites
│ ├── Magic.Lib # Magic effect sprites
│ ├── Monster/ # Monster sprite folders
│ ├── NPC/ # NPC sprite folders
│ └── ... # ~60 .Lib files and sprite folders
├── Map/ # Map data files (.map)
│ ├── WemadeMir2/ # Map tile libraries
│ └── *.map # Individual map files
├── Sound/ # Audio files (.wav)
│ ├── 003-0.wav # Sound effects
│ └── ... # Hundreds of .wav files
├── Mir2Test.ini # Client configuration (debug mode)
└── Localization/ # Language files (included in source)
Server resources -> Build/Server/Debug/
Build/Server/Debug/
├── Configs/ # Server configuration files
│ ├── Setup.ini # Main server config (IP, port, permissions)
│ ├── ExpList.ini # Experience tables
│ ├── BaseStats*.ini # Character stats by class
│ └── ... # ~37 config files
├── Maps/ # Server-side map files (.map)
│ └── ... # ~500 map files
├── Envir/ # Game environment data
│ ├── NPCs/ # NPC scripts and definitions
│ ├── Drops/ # Monster drop tables
│ ├── Quests/ # Quest scripts
│ ├── Recipe/ # Crafting recipes
│ ├── Goods/ # Shop item lists
│ ├── Routes/ # NPC patrol routes
│ └── ...
├── Server.MirDB # Game database (items, monsters, maps, NPCs)
├── Server.MirADB # Account database
├── Guilds/ # Guild data (created at runtime)
└── Logs/ # Server logs (created at runtime)
- macOS: Tested on macOS 26.3, Apple Silicon (arm64)
- .NET SDK: 8.0 (installed via Homebrew)
# Install .NET 8 via Homebrew
brew install dotnet@8
# The SDK installs to /opt/homebrew/Cellar/dotnet@8/<version>/libexec
# Add to PATH (add to ~/.zshrc for persistence):
export DOTNET_ROOT="/opt/homebrew/Cellar/dotnet@8/8.0.124/libexec"
export PATH="$DOTNET_ROOT:$PATH"
# Verify installation
dotnet --version
# Should output: 8.0.124 (or similar 8.0.x)Note: The Homebrew formula for dotnet@8 is keg-only. You must explicitly set the PATH as shown above, or dotnet will not be found.
git clone <repository-url> Crystal
cd Crystal
dotnet restore Client/Client.csproj
dotnet restore Server.Console/Server.Console.csprojDownload the game resource files (see Obtaining Game Resources above) and place them in Build/Client/Debug/ and Build/Server/Debug/.
# Build server (console version, cross-platform)
dotnet build Server.Console/Server.Console.csproj
# Build client (macOS-ported version)
dotnet build Client/Client.csproj# Must run from the Build/Server/Debug directory where config and data files are
cd Build/Server/Debug
dotnet run --project ../../../Server.Console/Server.Console.csprojThe server will:
- Load configuration from
Configs/Setup.ini - Load game database from
Server.MirDB - Load all maps, items, monsters, NPCs, quests
- Start listening on port 7000 (configurable in
Setup.ini) - Print
Server started. Press Ctrl+C to stop.
Server configuration (Configs/Setup.ini):
[Network]
IPAddress=127.0.0.1 # Listen address
Port=7000 # Game port
[Permission]
AllowNewAccount=True # Allow account registration
AllowLogin=True # Allow login
AllowNewCharacter=True # Allow character creation
AllowStartGame=True # Allow entering gameOpen a new terminal (keep the server running):
# Must run from the Build/Client/Debug directory where Data files are
cd Build/Client/Debug
dotnet run --project ../../../Client/Client.csprojThe client will:
- Open a 1024x768 game window
- Show the login screen
- Connect to the server at 127.0.0.1:7000
Client configuration (Mir2Test.ini):
[Graphics]
FullScreen=False # Windowed mode
Resolution=1024 # 1024x768
[Network]
UseConfig=False # Use hardcoded server address (127.0.0.1:7000)Save this as run.sh in the project root:
#!/bin/bash
# Crystal quick start script for macOS
export DOTNET_ROOT="/opt/homebrew/Cellar/dotnet@8/8.0.124/libexec"
export PATH="$DOTNET_ROOT:$PATH"
PROJECT_ROOT="$(cd "$(dirname "$0")" && pwd)"
case "$1" in
server)
echo "Starting Crystal server..."
cd "$PROJECT_ROOT/Build/Server/Debug"
dotnet run --project "$PROJECT_ROOT/Server.Console/Server.Console.csproj"
;;
client)
echo "Starting Crystal client..."
cd "$PROJECT_ROOT/Build/Client/Debug"
dotnet run --project "$PROJECT_ROOT/Client/Client.csproj"
;;
build)
echo "Building Crystal..."
cd "$PROJECT_ROOT"
dotnet build Server.Console/Server.Console.csproj
dotnet build Client/Client.csproj
echo "Build complete."
;;
*)
echo "Usage: $0 {server|client|build}"
echo " server - Start the game server"
echo " client - Start the game client"
echo " build - Build both server and client"
exit 1
;;
esacchmod +x run.sh
./run.sh build # Build both projects
./run.sh server # Start server (in one terminal)
./run.sh client # Start client (in another terminal)| Problem | Cause | Fix |
|---|---|---|
| Client shows black screen | Data files not found | Run from Build/Client/Debug/ directory |
dotnet: command not found |
PATH not set | export PATH="/opt/homebrew/Cellar/dotnet@8/8.0.124/libexec:$PATH" |
| Game launches fullscreen | Mir2Test.ini has FullScreen=True |
Edit Mir2Test.ini, set FullScreen=False |
| Client can't connect | Server not running | Start server first, check port 7000 is available |
| Server fails to start | Missing configs/data | Ensure Configs/Setup.ini and Maps/ exist in Build/Server/Debug/ |
| NuGet restore fails | No internet or wrong SDK | Ensure .NET 8 SDK is installed and internet is available |
- Mir 1 | Database - Remake of ActozSoft's 1997 The Legend Of Mir 1
- Mir 2 | Database | Map Editor - Remake of ActozSoft/Wemade's 1999 The Legend Of Mir 2
- Mir 3 | Database | Map Editor - Remake of Wemade's 2003 The Legend Of Mir 3
- Mir 3D (Moon Spirit) | Mir 3D (Holy Cow) - Remake of Shanda Games' 2016 Legend Eternal
- Mir 4 - Remake of Wemade's 2021 Mir 4