Files
godot-demo-projects/loading/runtime_save_load
Hugo Locurcio a2557fce51 Add a run-time saving/loading demo project
This is useful to load user-generated content without requiring users
to create a PCK file for it.
2023-11-03 16:12:14 +01:00
..

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 files1

Can be loaded at run-time:

  • Images (TGA, BMP, SVG2 )
  • Audio (Ogg Vorbis)
  • Fonts (TTF, OTF, WOFF, WOFF2, PFB, PFM, BMFont)

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

Language: GDScript

Renderer: Compatibility

Screenshots

Screenshot

Licenses


  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. ↩︎