Add Game Templates #5

Open
opened 2025-08-20 15:51:28 +00:00 by wizardfrag · 0 comments
Owner

Overview

Implement a game template system that provides pre-configured game server configurations, including all necessary config files and variables required for game servers to run successfully.

Background

Game servers often require specific configuration files, environment variables, and setup procedures. Creating templates will streamline the deployment process and ensure consistency across different game server instances.

Requirements

1. Template Structure

Each game template should include:

  • Configuration files: All necessary config files for the specific game
  • Environment variables: Required environment variables and their default values
  • Dependencies: Any additional software or packages required
  • Startup scripts: Scripts to initialize and start the game server
  • Documentation: Clear instructions for using and customizing the template

2. Template Types

Implement templates for popular game servers such as:

  • Minecraft: Java-based server with various mod support
  • Valheim: Dedicated server with world management
  • ARK: Survival Evolved: Steam-based server with mod support
  • Rust: Steam-based server with oxide mod support
  • Factorio: Dedicated server with save management
  • 7 Days to Die: Steam-based server with mod support

3. Template Features

  • Configurable variables: Allow users to customize server settings
  • Validation: Ensure all required fields are provided
  • Version management: Support for different game versions
  • Mod support: Templates for both vanilla and modded servers
  • Backup configuration: Include backup and restore procedures

4. Implementation Details

Database Schema

  • Create game_templates table to store template metadata
  • Create template_configs table to store configuration files
  • Create template_variables table to store configurable parameters

API Endpoints

  • GET /api/game_templates - List available templates
  • GET /api/game_templates/:id - Get template details
  • POST /api/game_templates/:id/instantiate - Create server from template
  • GET /api/game_templates/:id/config - Get template configuration

Frontend Components

  • Template selection interface
  • Configuration form with validation
  • Template preview and documentation
  • Instantiation progress tracking

Technical Implementation

1. Template Storage

  • Store template files in a structured directory system
  • Use version control for template updates
  • Implement template validation and testing

2. Configuration Management

  • Use a templating engine (like EEx) for dynamic configuration
  • Implement variable substitution and validation
  • Support for conditional configuration based on game type

3. Integration with Existing System

  • Integrate with the current node management system
  • Extend the Jupiter.Hosts module to support game templates
  • Update LiveView components to include template selection

Acceptance Criteria

  • At least 5 game templates are available
  • Templates can be instantiated to create new game servers
  • All required configuration files are properly generated
  • Template variables can be customized by users
  • Templates include comprehensive documentation
  • Integration with existing node management system
  • Frontend interface for template selection and configuration
  • API endpoints for template management
  • Template validation and error handling

Future Enhancements

  • Template marketplace for community-contributed templates
  • Template versioning and update management
  • Template testing and validation tools
  • Integration with game server monitoring and management tools

Resources

## Overview Implement a game template system that provides pre-configured game server configurations, including all necessary config files and variables required for game servers to run successfully. ## Background Game servers often require specific configuration files, environment variables, and setup procedures. Creating templates will streamline the deployment process and ensure consistency across different game server instances. ## Requirements ### 1. Template Structure Each game template should include: - **Configuration files**: All necessary config files for the specific game - **Environment variables**: Required environment variables and their default values - **Dependencies**: Any additional software or packages required - **Startup scripts**: Scripts to initialize and start the game server - **Documentation**: Clear instructions for using and customizing the template ### 2. Template Types Implement templates for popular game servers such as: - **Minecraft**: Java-based server with various mod support - **Valheim**: Dedicated server with world management - **ARK: Survival Evolved**: Steam-based server with mod support - **Rust**: Steam-based server with oxide mod support - **Factorio**: Dedicated server with save management - **7 Days to Die**: Steam-based server with mod support ### 3. Template Features - **Configurable variables**: Allow users to customize server settings - **Validation**: Ensure all required fields are provided - **Version management**: Support for different game versions - **Mod support**: Templates for both vanilla and modded servers - **Backup configuration**: Include backup and restore procedures ### 4. Implementation Details #### Database Schema - Create `game_templates` table to store template metadata - Create `template_configs` table to store configuration files - Create `template_variables` table to store configurable parameters #### API Endpoints - `GET /api/game_templates` - List available templates - `GET /api/game_templates/:id` - Get template details - `POST /api/game_templates/:id/instantiate` - Create server from template - `GET /api/game_templates/:id/config` - Get template configuration #### Frontend Components - Template selection interface - Configuration form with validation - Template preview and documentation - Instantiation progress tracking ## Technical Implementation ### 1. Template Storage - Store template files in a structured directory system - Use version control for template updates - Implement template validation and testing ### 2. Configuration Management - Use a templating engine (like EEx) for dynamic configuration - Implement variable substitution and validation - Support for conditional configuration based on game type ### 3. Integration with Existing System - Integrate with the current node management system - Extend the `Jupiter.Hosts` module to support game templates - Update LiveView components to include template selection ## Acceptance Criteria - [ ] At least 5 game templates are available - [ ] Templates can be instantiated to create new game servers - [ ] All required configuration files are properly generated - [ ] Template variables can be customized by users - [ ] Templates include comprehensive documentation - [ ] Integration with existing node management system - [ ] Frontend interface for template selection and configuration - [ ] API endpoints for template management - [ ] Template validation and error handling ## Future Enhancements - Template marketplace for community-contributed templates - Template versioning and update management - Template testing and validation tools - Integration with game server monitoring and management tools ## Resources - [Phoenix Templates](https://hexdocs.pm/phoenix/templates.html) - [EEx Templates](https://hexdocs.pm/eex/EEx.html) - [Game Server Administration Guides](https://developer.valvesoftware.com/wiki/Dedicated_Servers)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ludonauts/jupiter#5
No description provided.