Hosting Modes
Configure your preferred hosting mode inAssets/schema.ts:
Self-Hosted
Players run game servers on their own machines. Ideal for small communities and testing.
Dedicated
Central servers managed by Orbiter. Best for production deployments and larger player counts.
Both
Support both modes simultaneously. Players can choose their preferred hosting method.
Places (Games)
Places are the core game units in Mercury Core. Each place represents a playable game world.Creating a Place
Places are created through the Games section:- Navigate to
/games/create - Upload a place file (game world data)
- Configure place settings
- Place is automatically assigned a unique ID
Place Configuration
Place owners can configure their games through the settings page (/place/{id}/{name}/settings).
- View Settings
- Network Settings
- Privacy Settings
- Server Ticket
- Place Data
Visual Presentation
Configure how your place appears to players:Name:- 3-100 characters
- Filtered for profanity
- Used in URLs and listings
- Up to 1000 characters
- Supports formatted text
- Filtered for profanity
- Shows last updated timestamp
- Custom place icon upload
- Maximum 1MB file size
- Automatically resized to 270x270
- Converted to AVIF format for optimal delivery
- Stored in
data/icons/{placeId}.avif
- Default thumbnails are assigned based on place ID
- Configured in
Images.DefaultPlaceThumbnails
Site/src/routes/(main)/place/[id=asset]/[name]/settings/+page.server.ts:103-134Joining Games
Players can join games through the place page (/place/{id}/{name}).
Join Process
Join Ticket System
When a player joins:- All existing playing sessions for the user are invalidated
- A new unique join ticket is generated
- The ticket is passed to the game client via the launcher URI
- Orbiter validates the ticket when the client connects
- Player status is updated to “Playing”
- Tickets are single-use and time-limited
- Moderated users cannot join games
- Private server access is verified
Site/src/routes/(main)/place/[id=asset]/[name]/+page.server.ts:116-127
Dedicated Server Management
When using dedicated hosting mode, servers are managed through Orbiter.Starting a Server
Players can start dedicated servers for places:- Click “Start Server” on the place page
- System verifies place file exists
- Request is sent to Orbiter to spawn server
- Server starts and listens for connections
- Place file must exist in
data/places/{placeId} - Rate limited to 20 requests per time window
- User must have access to the place
Site/src/routes/(main)/place/[id=asset]/[name]/+page.server.ts:129-153
Closing a Server
Servers can be closed by:- Place Owner: Full control over their servers
- Administrators: Permission level 4+ can close any server
- Submit close request
- Orbiter gracefully shuts down the server
- Players are disconnected
- Resources are freed
Site/src/routes/(main)/place/[id=asset]/[name]/+page.server.ts:155-169
Server Status
Place pages display real-time server information:- Server Ping: Latency to the game server
- Active Players: List of currently connected players with usernames
- Max Players: Configured player limit
- Server Status: Online/Offline indicator
Orbiter Integration
Orbiter is Mercury Core’s game server orchestrator.Configuration
Configure Orbiter inAssets/schema.ts:
API Functions
- List Gameservers: Get all running servers (admin only)
- Start Gameserver: Spawn a new dedicated server
- Close Gameserver: Gracefully shut down a server
- Get Server Status: Query server state and player list
Site/src/lib/server/orbiter.ts
Launcher URI
Mercury Core uses a custom URI scheme to launch the game client:- Parse connection parameters
- Authenticate with the ticket
- Connect to the game server
- Load the place data
Admin Tools
Administrators with permission level 5 can access gameserver management at/admin/gameservers.
Gameserver Dashboard
- View all active dedicated servers
- See player counts and connection info
- Monitor server health and performance
- Force close servers if needed
Site/src/routes/(main)/admin/gameservers/+page.server.ts:5-14