Anuken/Mindustry-Suggestions

Integration of Groovy Runtime and Mod Loader

Closed this issue · 2 comments

Describe the content or mechanics you are proposing.

  • Introduce a Groovy runtime into your game.
  • Support interpreting and running Groovy scripts within the existing mod loader.

Describe how you think this content will improve the game. If you're proposing new content, mention how it may add more gameplay options or how it will fill a new niche.

Mindustry, as a cross-platform game, has a significant player base on non-desktop platforms. This constitutes a large community. For these players, writing and compiling a Java mod might be considered challenging on such devices. While the solution you've provided involves incorporating mods written in JavaScript and JSON, it's undeniable that these supplementary methods have some drawbacks. Firstly, some players may not want to adapt to an unfamiliar tech stack just to create a mod. Secondly, these mods may struggle to match the interaction with the game core as effectively as languages on the JVM. Therefore, I believe it's necessary to introduce a Groovy runtime and support the interpretation of these scripts. This would allow mobile device players to develop mods using just a text editor, without the need for compilation and without incurring additional learning costs. Since Groovy is similar to Java, and the mods written can better interact with the game core and utilize Java features.

Before making this issue, check the boxes below to confirm that you have acknowledged them.

  • I have checked the Trello to make sure my suggestion isn't planned or implemented in a development version.
  • I am familiar with all the content already in the game or have glanced at the wiki to make sure my suggestion doesn't exist in the game yet.
  • I have read README.md to make sure my idea is not listed under the "A few things you shouldn't suggest" category.

groovy is quite literally a jvm language
you still need to compile it for the jvm platform lmao

Using closures might make it runnable without the need for compilation.