LBALab/lba2remake

Consider publishing utils (such as HQR parser and src/resources/) as packages on npm

Opened this issue · 2 comments

Is your feature request related to a problem? Please describe.
Not a problem. I'm working on a LBA2 randomizer and being able to use certain utils (such as HQR parser) that are already available for the remake would be awesome. Making those utils easily accessible would also help others develop LBA tooling more easily.

Describe the solution you'd like
Have those utils available on npmjs.com so other projects can reuse them. Publishing could be done either by moving the code for those utils to a separate repository, or by using workspaces.

Describe alternatives you've considered
Copy-pasting the code to reuse it (giving appropriate credits) would be easy enough, but harder to contribute if either project finds a bug in the code.

Additional context
n/a

This sounds like a good idea. One of the goals for this project has always been to support other projects in the community.
I'm not entirely sure where to put the boundary, though. Externalizing some of the code means a stronger commitment not to change it, which means less flexibility.
HQR parsing is definitely a good candidate for this. Another thing I think would be useful for the community are maybe the LBA script (de-)compiler, but it's more tricky. 3D asset loaders would be valuable too, but they are somewhat coupled with the engine.

Externalizing some of the code means a stronger commitment not to change it, which means less flexibility

That's mostly for external API, and even then breaking changes can be released as semver majors, since npm follows semver.org. But most of the things that would benefit from externalizing wouldn't need many chages.

I agree ,HQR parsing (and repacking) are definitely good candidates, as are LBA/LBA2 script decompiler/compiler. I know some of those things don't exist in the code base today, but by externalizing we can implement those.