Topic: Embedded data

So, I've been doing a little work here and there. There is something I would like to add to Maratis. The main thing is the extended lua API system which BitPuffin started working on.

Adding multiple npk packages into MPackageManager is incredibly trivial (I think most of the code should actually be there now...) So the nicest way would be to package a small collection of default data into an npk and distributing it with Maratis. This could contain things like assets for error messages too.

Now, when you publish a game, the idea is that we're trying to have a (relatively) small amount of files. Having a Maratis.npk there is one more than needs to be. I think there are two choices here. Potentially, what we could do is extract the entities from the system npk and write them to the project one... or... we can try to embed the npk.

In theory the second one isn't difficult at all. We just have some memory within Maratis (probably MCommon) which contains the npk file. I've written similar systems before with success. I have also recently sent some code to lqez, which he has submitted into the npk repository, which will allow using custom read functions (like our MFile wrappers... if we use them, we could actually theoretically have an npk file within an npk file... hmmm) I think this would be a pretty nice way to include a small amount of default assets.

Now, some pros/cons
+ Doesn't increase the amount of (potentially confusing) files in a Maratis distribution/game
- Requires an extra pre-build step to generate a C file with the data
+ Can be extended to include a couple of other useful things.
- Increasing executable size
+ Unable to break with accidental "upgrade"
- Unable to upgrade post-deployment

Of course there are more. I won't do any work on this at all unless I get a go-ahead. I just thought I'd dump my thoughts on this matter, open a debate, see what happens smile