#game-assets #hot-reloading #loading #load #memory #automatic #cache

keeshond_datapack

A simple framework for loading and caching game assets

12 breaking releases

0.13.0 Mar 25, 2022
0.11.0 Dec 25, 2021
0.10.0 Oct 5, 2021
0.9.0 May 22, 2021
0.4.0 Jun 23, 2019

#2213 in Game dev

Download history 25/week @ 2024-08-26 2/week @ 2024-09-09 63/week @ 2024-09-23 2/week @ 2024-09-30 1/week @ 2024-10-07 12/week @ 2024-10-14 3/week @ 2024-11-04 9/week @ 2024-11-18 4/week @ 2024-11-25 1/week @ 2024-12-02 47/week @ 2024-12-09

61 downloads per month
Used in 5 crates (3 directly)

MIT/Apache

79KB
1.5K SLoC

🐶 KEESHOND Datapack 🐶

About

Keeshond Datapack lets you easily load resources for your game and cache them in memory, mapped via pathname and accessible by handle objects that allow for automatic unloading and can be stored within structs without worrying about lifetimes. Define how they load with the DataObject trait, by implementing a function that takes a Read + Seek object. Define where they load from by instantiating a Source.

Features

  • Load entire packages at once either automatically or preloaded during initiailization
  • Unloading and reloading of individual packages during runtime. Memory optimization and hot reloading!
  • DataHandle system means objects can reference data without having to borrow it. Serialize handles as pathnames and resolve them at runtime.
  • File loading from the filesystem or .zip/.pk3 archives
  • File saving - make your own data editor!
  • Separate "PreparedStore" system for synchronizing loaded data with backends, such as loading textures into VRAM

Datapack is used by Keeshond but can work with any engine.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~3–10MB
~104K SLoC