ShatteredReality b4c73f4888 Fix README links to asset library (#1078) 5 months ago
..
examples a2557fce51 Add a run-time saving/loading demo project 1 year ago
screenshots a2557fce51 Add a run-time saving/loading demo project 1 year ago
README.md b4c73f4888 Fix README links to asset library (#1078) 5 months ago
icon.svg a2557fce51 Add a run-time saving/loading demo project 1 year ago
icon.svg.import a2557fce51 Add a run-time saving/loading demo project 1 year ago
project.godot bac1e69164 Use static typing in all demos (#1063) 6 months ago
runtime_save_load.gd a2557fce51 Add a run-time saving/loading demo project 1 year ago
runtime_save_load.tscn a2557fce51 Add a run-time saving/loading demo project 1 year ago

README.md

Run-time File Saving and Loading

This project showcases how to load and save various file types without going through Godot's resource importing system.

This is useful to load/save images, sounds, 3D scenes and ZIP archives at run-time such as user-generated content, without requiring users to generate a PCK file through Godot.

Can be loaded and saved at run-time:

  • Images (JPEG, PNG, WebP)
  • 3D scenes (glTF 2.0)
  • ZIP archives
  • Plain text files[^1]

Can be loaded at run-time:

  • Images (TGA, BMP, SVG[^2])
  • Audio (Ogg Vorbis)
  • Fonts (TTF, OTF, WOFF, WOFF2, PFB, PFM, BMFont)

[^1]: Manipulating custom binary formats is possible using the FileAccess and PackedByteArray classes, but this is not shown in this demo.

[^2]: It is possible to procedurally generate SVG as text and save it to a file with .svg extension using the FileAccess class, but this is not shown in this demo.

See the Saving and Loading (Serialization) demo for an example of saving/loading game progress.

Language: GDScript

Renderer: Compatibility

Check out this demo on the asset library: https://godotengine.org/asset-library/asset/2779

Screenshots

Screenshot

Licenses