Skip to content
This repository has been archived by the owner on Nov 28, 2024. It is now read-only.

Hot reloading assets #32

Closed
Bombfuse opened this issue Jan 1, 2021 · 4 comments
Closed

Hot reloading assets #32

Bombfuse opened this issue Jan 1, 2021 · 4 comments
Labels
enhancement New feature or request ux An issue that improves the user experience when completed

Comments

@Bombfuse
Copy link
Owner

Bombfuse commented Jan 1, 2021

Hot reloading assets during development is a big quality of life improvement, we should add a feature hotreload that tracks asset files.

Sprites - Track texture files, reload them in the rendering engine on change.
Aseprites - Track both animation files and sprite files, reload them in the rendering engine on change.
Sounds - Track sound files, track sound progress, reload them at the point they were playing at on change.

@Bombfuse Bombfuse added the enhancement New feature or request label Jan 1, 2021
@Bombfuse Bombfuse added the ux An issue that improves the user experience when completed label Jul 10, 2021
@Bombfuse
Copy link
Owner Author

Bombfuse commented Aug 8, 2021

We should be able to just use std::fs::Metadata to see if the modified date has changed compared to the date when the asset was stored, then read in the new data and replace the data in the asset store.

@Bombfuse
Copy link
Owner Author

Bombfuse commented Aug 9, 2021

@Bombfuse
Copy link
Owner Author

Remaining work

  • Fonts
  • Sounds
  • Any File (User marks a file for hot reloading by using loader().add_hotreload_target("some_file") which will add the file to the hotreload list)

@Bombfuse
Copy link
Owner Author

Bombfuse commented Nov 8, 2021

splitting out into multiple issues for better tracking

#112
#113
#114

@Bombfuse Bombfuse closed this as completed Nov 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request ux An issue that improves the user experience when completed
Projects
None yet
Development

No branches or pull requests

1 participant