Mindustry is a tower-defense type of game, now with added Logic. Logic is a programming language, but it is very low-level. It is more akin to assembly than high-level language.

Mindcode is a high-level language that compiles down to Mindustry Logic. Mindcode includes higher-level constructs, such as expressions, user-defined functions, control statements, or "direct" memory access.

Mindcode now comes with significantly improved code generation, including data flow analysis, loop unrolling and function inlining; for a list of recent changes, see changelog.

Go ahead and try the following samples, then write your own!

2 lines of code

7 lines of code

Start with a new script

Bug reports, suggestions and questions are welcome at the project page.

  • 7 instructions before optimizations.
  • 7 instructions after optimizations.
  • Performance: parsed in 4 ms, compiled in 3 ms, optimized in 2 ms.