Mindcode is a high-level language that compiles down to Mindustry Logic - mlog. Mindcode includes higher-level constructs, such as expressions, user-defined functions and control statements. Here are some examples to give you an idea how to use Mindcode:

17 lines of code

15 lines of code

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

  • Number of reported ambiguities: 3
  • 19 instructions before optimizations.
  • 1 instructions eliminated by Temp Variables Elimination.
  • 2 instructions eliminated by Dead Code Elimination (3 iterations).
  • 1 instructions eliminated by Jump Optimization (4 iterations).
  • 1 instructions eliminated by Single Step Elimination (5 iterations).
  • 1 instructions modified by Data Flow Optimization (4 iterations).
  • 1 instructions modified by Loop Optimization (3 iterations).
  • 1 loops improved by Loop Optimization.
  • 14 instructions after optimizations.
  • Performance: parsed in 3 ms, compiled in 1 ms, optimized in 2 ms.