tkjn / GameTable

Online Game Table. The aims will be partially driven by the desire to use this software for gameplay similar to Warhammer Quest.
0 stars 1 forks source link

Implement a plugin system #57

Open dezzak opened 7 years ago

dezzak commented 7 years ago

It would be desirable to move plugins (such as pog library, character sheet and monster wounds) into their own repos and as individual packages that can be dropped into a plugins folder so that the core gametable doesn't have functionality that is only useful in specific games.

We've made a start on this by trying to decouple where possible, but need to implement a way to package these up and load them at runtime.

I've had a tinker myself a couple of weeks ago and it seems that java class loaders are a pain to write - there must surely be a way to do it cleanly, but I've yet to find one that I understand. I shall take another look with a fresh pair of eyes soon, but feel free @tkjn to give it a go yourself if you like.

tkjn commented 7 years ago

There's an answer on here that explains java Service Loader that doesnt sound too painful. https://stackoverflow.com/questions/13870321/java-dyanmically-load-plugin

Personally, I think pog library should stay in the core repo. It's just a more convenient way to store pogs which are a core part of GameTable