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

Data file path configuration #36

Open
1j01 opened this issue Sep 3, 2024 · 0 comments
Open

Data file path configuration #36

1j01 opened this issue Sep 3, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@1j01
Copy link
Owner

1j01 commented Sep 3, 2024

The default world is loaded from a hard-coded path "world.json"
A better name would be "default-world.json", but beside that, it should be configurable.
You should be able to place worlds in a "worlds" folder, for instance.

Similarly, the animations for an entity are loaded from "animations/.json"
You may want to store these elsewhere.

req.open("GET", "world.json")

EntityClass.animation_json_path = "./animations/#{EntityClass.name}.json"

@1j01 1j01 changed the title Hardcoded data file paths Data file path configuration Sep 3, 2024
@1j01 1j01 added the enhancement New feature or request label Sep 3, 2024
1j01 added a commit to 1j01/tiamblia-game that referenced this issue Sep 5, 2024
I can't move the default world into the new `worlds/` folder yet due to
1j01/skele2d#36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant