Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to load resource pack #2

Open
owend opened this issue Feb 24, 2019 · 7 comments
Open

Unable to load resource pack #2

owend opened this issue Feb 24, 2019 · 7 comments

Comments

@owend
Copy link

owend commented Feb 24, 2019

Got it to compile[1] but on running bin/halleyproj it throws an error:

Unhandled exception: Unable to load resource pack "/Users/zzz/Projects/halley-template/assets/game.dat"

I wasn't able to find a sample .dat file so I'm not sure if that is expected or not?

[1] It actually didn't compile out of the box, the test classes in the halley submodule seem to be the latest git master but are using an older interface for some internal function calls, like:

-void initSDLSystemPlugin(IPluginRegistry &registry);
+void initSDLSystemPlugin(IPluginRegistry &registry, Maybe cryptKey);

and

-bool isDevBuild() const override
+bool isDevMode() const override

Should I open a separate bug about that?

@ghost
Copy link

ghost commented Feb 24, 2019

@owend Replace the body of initResourceLocator with this:

locator.addFileSystem(unpackedAssetsPath);

@thoughton
Copy link

I've run into the same issue (on Ubuntu 18.04).

Trying the above suggestion resulted in a different error:

Unhandled exception: Unable to load assets.

This might be a silly question... but are there even meant to be any loadable assets as part of this template?

@ghost
Copy link

ghost commented Feb 26, 2019

@thoughton did you run the halley-cmd tool over your sources?

As for your question, halley is a source based library. You just plug-in the source in your game project and start using this library. And it happens that halley itself needs a minimal amount of assets (included in the halley repo) for it to work. You need to import those assets with halley-cmd tool.

In my case the problem was that the tool was collecting the assets in assets_unpacked folder, but wasn't packaging them in a dat file.

@thoughton
Copy link

thoughton commented Feb 26, 2019

Ah right, no I hadn't run halley-cmd - in fact I didn't realise it even existed, as the Tools weren't building for me due to an issue with Yaml-cpp... but that's sorted now at least.

So I now have the halley-cmd and can successfully import the project's assets. I'm still not entirely sure what the overall workflow should be, but this probably isn't the place to dicsuss that. :)

@ghost
Copy link

ghost commented Feb 27, 2019

@thoughton The wiki contains info about building and running the games. The api documentation is incomplete but the engine source appears to be quite clean and easy to understand (at least the parts I've read).

@thoughton
Copy link

@sagartewari01 Oh I hadn't seen the wiki - thanks!

@brandc87
Copy link

brandc87 commented Mar 4, 2019

You need to run halley-cmd pack asset-manifest.yaml /dir/to/proj /dir/to/halley after right? Unless you replace the locator to the unpacked path as @sagartewari01 said

Also just noticed you can add encryption keys to the YAML which is pretty cool for packing assets when it comes to release :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants