MCPSERV.CLUB
Mindustry

Mindustry

Self-Hosted

Strategic tower‑defense with automated resource processing

Active(100)
25.5kstars
0views
Updated 14 hours ago

Overview

Discover what makes Mindustry powerful

Mindustry is a self‑hosted, real‑time strategy game that blends tower‑defense mechanics with resource‑management and multiplayer combat. From a developer standpoint, it serves as an open‑source Java application that can be compiled for desktop, Android, and server platforms. The core engine is written in Java 17, leveraging the lightweight **libGDX** framework for cross‑platform rendering and input handling. Networking is built on top of **Netty**, providing a custom, event‑driven protocol that supports both local LAN play and internet‑based multiplayer. The project’s modular build system uses **Gradle**, with separate subprojects (`desktop`, `server`, `android`, and utility tools) that can be built independently.

Language & Runtime

Rendering & UI

Networking

Data Persistence

Overview

Mindustry is a self‑hosted, real‑time strategy game that blends tower‑defense mechanics with resource‑management and multiplayer combat. From a developer standpoint, it serves as an open‑source Java application that can be compiled for desktop, Android, and server platforms. The core engine is written in Java 17, leveraging the lightweight libGDX framework for cross‑platform rendering and input handling. Networking is built on top of Netty, providing a custom, event‑driven protocol that supports both local LAN play and internet‑based multiplayer. The project’s modular build system uses Gradle, with separate subprojects (desktop, server, android, and utility tools) that can be built independently.

Architecture

  • Language & Runtime: Java 17 (mandatory), running on any JVM that supports it.
  • Rendering & UI: libGDX for OpenGL abstraction; custom UI widgets are implemented in Java and rendered via the Graphics API.
  • Networking: Netty‑based client–server architecture, exposing a binary packet protocol. Remote method calls are annotated with @Remote, which the build system uses to generate the packet classes in mindustry.gen.
  • Data Persistence: The server stores game state and player data in plain text JSON files, with optional integration points for external databases (e.g., MySQL) via a simple JDBC layer.
  • Modular Plugins: The engine exposes a plugin API (mindustry.mod) that allows developers to load JARs at runtime. Mods can register new blocks, units, and even alter core game logic through the Entity‑Component System (ECS) that powers all in‑game objects.

Core Capabilities

  • Custom Block & Unit Creation: Mods can define new Block subclasses with bespoke build behaviors, physics, and rendering.
  • Remote Procedure Calls: The @Remote annotation enables developers to expose server‑side logic directly to clients, facilitating custom multiplayer features or analytics.
  • Event System: A publish‑subscribe event bus (Events class) allows mods to react to in‑game events (e.g., UnitDestroyEvent, PlayerJoinEvent).
  • Scripting: The game includes a lightweight scripting engine based on JavaScript (Nashorn) for runtime configuration of block behavior.
  • Webhooks & API: While not a RESTful service, the server can be extended with HTTP endpoints via the HttpServer utility for integration with external services (e.g., Discord bots, CI pipelines).

Deployment & Infrastructure

Mindustry servers are self‑contained JARs that can run on any Linux, Windows, or macOS host. The default server configuration is optimized for low‑latency multiplayer and can be tuned via server.conf. For production deployments, containerization is straightforward: a minimal Docker image can be built around the server JAR, exposing port 6567 for client connections. Horizontal scaling is limited by the single‑process architecture; however, multiple server instances can be run behind a load balancer with separate world files. The project’s Gradle build automatically generates “bleeding‑edge” releases for every commit, simplifying CI/CD pipelines.

Integration & Extensibility

  • Plugin System: Mods are loaded from a designated mods directory; the loader scans JARs for classes annotated with @Mod.
  • API Hooks: The ECS architecture allows deep integration; developers can register new components, systems, and queries.
  • Webhooks: The server exposes a simple HTTP endpoint for push notifications, enabling integration with Discord or Slack.
  • Customization: The UI and asset pipeline are fully modifiable; sprite sheets can be repacked with the tools:pack Gradle task, and texture packs are loaded at runtime.

Developer Experience

The repository is well‑documented with a comprehensive Wiki and Javadoc, providing API references for all public classes. The build system is Gradle‑centric, making it familiar to Java developers. Contribution guidelines are clear, and the active Discord community offers rapid feedback for bug reports or feature requests. Licensing is permissive (MIT), allowing commercial use without royalties.

Use Cases

  • Custom Multiplayer Servers: Hosting a dedicated server with unique block sets or rule modifications for community events.
  • Educational Platforms: Using the ECS and networking model as a teaching tool for game architecture.
  • Modding Competitions: Leveraging the plugin API to create timed mod development challenges.
  • Embedded Systems: Running lightweight Android builds on Raspberry Pi‑style devices for local network play.

Advantages

  • Performance: Java 17 and Netty provide low‑latency networking; the ECS reduces memory churn.
  • Flexibility: The plugin system and scripting engine allow almost any gameplay modification without recompiling the core.
  • Licensing: MIT license removes barriers to commercial deployment.
  • Community & Support: Active development ensures timely security patches and feature updates, while the documentation is exhaustive for developers new to the project.

Mindustry offers a robust, extensible platform for developers looking to experiment with real‑time strategy mechanics, networked gameplay, and modular game design—all within a self‑hosted environment.

Open SourceReady to get started?

Join the community and start self-hosting Mindustry today

Weekly Views

Loading...
Support Us
Most Popular

Infrastructure Supporter

$5/month

Keep our servers running and help us maintain the best directory for developers

Repository Health

Loading health data...

Information

Category
other
License
GPL-3.0
Stars
25.5k
Technical Specs
Pricing
Open Source
Database
None
Supported OS
LinuxWindowsmacOS
Author
Anuken
Anuken
Last Updated
14 hours ago