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

Way to use .ldtk file at compile time only #20

Open
zommerfelds opened this issue Sep 7, 2022 · 0 comments
Open

Way to use .ldtk file at compile time only #20

zommerfelds opened this issue Sep 7, 2022 · 0 comments

Comments

@zommerfelds
Copy link
Contributor

From what I'm experiencing, it seems like the .ldtk file doesn't actually need to be included in the release. In my case I'm loading resources in a PAK file. This library still works if I compile with the full file but only provide an empty .ldtk in the PAK at runtime. So I'm wondering if we should:

  1. Not try to load the .ldtk file at runtime if data is already there. What is the file used for at runtime?
  2. Provide a way to map the relative path to your resource base path in the editor. For example if I put the .ldtk file in the src directory and reference a tile set in a sibling res directory it will be saved as "relPath": "../res/tileset.png". I will see all tiles in the editor, but when running the game it will fail because the assets are not loaded relative to the src directory.

If you are interested I can try to look into making a PR, but wanted to have your input first. It's probably not as simple as I'm imagining. :)
Thanks!

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

1 participant