litiengine icon indicating copy to clipboard operation
litiengine copied to clipboard

Make litiengine modular

Open weisJ opened this issue 2 years ago • 1 comments

It would be nice to have litiengine be a modular jar:

  • It allows consumers of the library to bundle their game using jpackage
  • Currently the utiLITI executable created by jpackage isn't fully self contained (as it's not a modular jar) i.e. on windows the /app directory is also necessary as it contains all dependencies. For fully modular projects it's possible to package all dependencies in the resulting jar making it portable.

As the engine is already build using a newer java version (>= Java 9) being compliant with the module system shouldn't be a big problem ... except:

  • jinput isn't modular (this isn't a big problem as it can be used as an automatic module without much headache)
  • Most of the soudlib.* dependencies behave have split packages (i.e. multiple jars contain the same packages or even the same classes). This is really unfortunate as it is a hard blocker for going modular. A possible workaround would be to fork the repository and modify the build process to produce compatible jars.

Any thoughts on this?

weisJ avatar Dec 31 '21 16:12 weisJ

Just thinking... if litiengine was modular, I think we could have (an updated version of) https://github.com/gurkenlabs/litiengine/pull/326 as an optional modular component, probably under a different repository though.

What do you guys think?

Gamebuster19901 avatar Jan 08 '22 22:01 Gamebuster19901