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
GraphicsAPI. - 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 inmindustry.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
Blocksubclasses with bespoke build behaviors, physics, and rendering. - Remote Procedure Calls: The
@Remoteannotation enables developers to expose server‑side logic directly to clients, facilitating custom multiplayer features or analytics. - Event System: A publish‑subscribe event bus (
Eventsclass) 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
HttpServerutility 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
modsdirectory; 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:packGradle 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
Related Apps in other
Immich
Self‑hosted photo and video manager
Syncthing
Peer‑to‑peer file sync, no central server
Strapi
Open-source headless CMS for modern developers
reveal.js
Create stunning web‑based presentations with HTML, CSS and JavaScript
Stirling-PDF
Local web PDF editor with split, merge, convert and more
MinIO
Fast, S3-compatible object storage for AI and analytics
Weekly Views
Repository Health
Information
Explore More Apps
Hi.Events
Sell tickets, manage events, and grow audiences all in one
EPrints
Open-source digital repository platform for research
WonderCMS
Tiny flat‑file CMS for fast, privacy‑first sites
Kasm Workspaces
Secure, browser‑based workspaces for any device
0 A.D.
Free real‑time strategy game set in antiquity
Ganymede
Archive Twitch streams with live chat playback