keronsmooth.blogg.se

Micro processor mindustry
Micro processor mindustry











You won't be able to use most of the Python. Mindustry controllers, but unfortunately I have to stop you there. Use your knowledge of closures, classes and decorators to program So far so good, looks like you can just write Python codeĪnd then import it into the game. titanium ) result = 2 + a * 2 + b + c * d * 3 What if you could write the following instead: time = cell1 time += 1 if time >= 300 : time = 0 cell1 = time unloader1. It becomes boring, error-prone and quite hard to modify. What if you want to calculate some formula, let's say 2 + a * 2 + b + c * d * 3 The middle of program, you have to rewrite many jump addresses. Here is an example program that switches unloader outputīetween lead and titanium depending on time: read time cell1 0Ĭontrol configure unloader1 configure unloader1 program is fairly simple, but if you insert any instruction in They can operate on floats, refer to objectsĪnd fire several commands that affect the game. They have explicit limit of instructions per unit of time. Mindustry microprocessors are quite nice and easy to understand. Imports do nothing, use it make flake8 happy. Additionally you can't use any Python builtins Warning: Everything that requires dynamic memory doesn't work:Īny data structure (list, dict, etc), classes, closures, You can write subset of Python instead assembler-like Mindustry instructions.Ĭonsider this as effort to reuse Python syntax, rather than Python implementation. Allows easier control over Mindustry microprocessors.













Micro processor mindustry