MarkovJunior icon indicating copy to clipboard operation
MarkovJunior copied to clipboard

CLI and usability in other projects.

Open Will-Carson opened this issue 9 months ago • 3 comments

Right now (as far as I can tell) MarkovJunior is basically a cool proof of concept. It isn't really usable as a library or for practical use in another game. The primary way you interact with MJ is by adding a model to the models folder and running the exe. This will produce an image or .vox that the user can then look at or import into another project.

I would like to use MJ as a library for procedural generation in other games. I am making this issue to see if you would accept a PR that would expose an API surface for such a thing, and if you had any input as to what that might look like. I imagine the user would give a path to a model file, and then MJ would spit out a 2d/3d array of characters.

Will-Carson avatar Jul 02 '25 19:07 Will-Carson

I agree, it's just a question of finding time to update the project.

I will probably not accept such a PR (because I want to enable MJ as a library myself), but I will link it from the README.

mxgmn avatar Jul 02 '25 22:07 mxgmn

Fair enough! Would you mind outlining things you'd expose in an API? Right now the only functionality I care about is

filepath -> MJ -> 3d array of chars

I'm sure there's 100 other things but I am curious as to your thoughts on what that would look like.

Will-Carson avatar Jul 03 '25 16:07 Will-Carson

For a library, you generally don't want to force specific use-cases like "only read inputs from a file" unless the inherent nature of the library requires it. Ideally a general Markov Junior library should have a data representation of the inputs and outputs, then perhaps a separate ability to read/write those data structures through a stream for convenience.

heyx3 avatar Nov 13 '25 00:11 heyx3