The dataset stuff is pretty cool. Also it solves some of the problems that RedMonkey is addressing. I’d like to use it for my FPS game. So: how about splitting the “model dataset” from the OpenRTS project?
The model builder and XML importer might become a library (or, if you prefer, a ‘platform’) that can be reused by other games.
Some parts are quite general (like SoundActor) some other are tied to OpenRTS (like DamageEffect); however other games can provide their implementation of *Effect that are game-specific.
All the parsing part is already quite generic and could easily be used by any other game with few efforts.
I’m talking about :
library of definition (we have to extract an abstract class from this one)
For the builders it is more tricky. There is an abstract builder for the basic definition management, but the mapping is hardcoded, and the final build() method (and overloads) can have very specific behavior.
A first step would be to map the builder fields by reflexion. Not trivial ! :
a color will be parsed as three int and will need construction,
a child builder will appear as a string and will need to find the builder in the library by ID,
This is totally feasable, thougt. And then you only have to define the building behavior.
there are two ways to add a lib with gradle. The first (and the preferred way) is to add a new dependency in the build.gradle. now gradle download it automatically from a maven repository.
the second way is to copy the jar into the lib directory and gradle graps it too.