Mindustry: JavaScript plugins

Created on 15 Sep 2019  路  9Comments  路  Source: Anuken/Mindustry

What about adding JavaScript plugins that can be runned everywhere (mobile, desktop, server)
JavaScript is easy for learning, running, integration. You can use rhino for integrate

All 9 comments

  1. Use #545 for feature proposals.
  2. Why? Java works perfectly fine for server plugins, and using it is a lot more natural, considering you can compare your code with the source and figure out how things are done.
  3. Implementing JavaScript for scripting on other platforms would imply using it for mods, not plugins. Integrating something like that would be a massive amount of work.

Java require compilation, js not. Yes, it is a lot of work, but it will be very useful, if using mods we will be able to create blocks, mechanism, game mechanics it will give infinity features. If we will use it everywhere (server, client) it will be easier. Also I think we need to reopen it because it is large theme.

I'm not willing to put in a ridiculous amount of effort for a JavaScript-centered scripting system just because Java require compilation, especially when Groovy exists.

Maybe in v7. JavaScript is much easier, so there will be much more mods. Maybe ask what to use in discord?

Ok, what about adding content using json, for modding(create resources, mechs, smelters)

@maximmasterr same thing. implementing JSON for items would mess up the current system for items.

Ok, any method easy adding elements

JSON could work, since the block definitions look a bit like JSON already; one could make a deserializer which creates a piece of content from a file, and keep the code-based implementation in the game. The main issue with that is that you wouldn't be able to define any meaningful new logic in blocks.

Ok, java is good to but, what about loading at launching not only default file, all files that located in dir

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mindustrybeta picture mindustrybeta  路  3Comments

flyingpimonster picture flyingpimonster  路  4Comments

Matitron picture Matitron  路  4Comments

XEN0PHIL picture XEN0PHIL  路  3Comments

PaintedCat picture PaintedCat  路  4Comments