Description
Changelog
Reviews (0)

SaveSystem Lite

What is it?

SaveSystem Lite is a lightweight Godot 4 save solution made by Poty, with an easy API for saving and loading game data. Perfect for prototypes and proof of concepts. Just download and enable the plugin, check out the example, and you are good to go.

Pro version:
https://ptupi.itch.io/save-system-pro

Lite features:

  • JSON serialization
  • One save slot
  • Easy API
  • Example scene to help you get started quickly

Setup

  1. Inside addons/save_system_lite/scenes, double-click save_system.tscn and select the SaveSystem node. In the Inspector, configure:
    • Save Directory: the folder name used inside user:// persistent folder.
    • File Name: the name of the save file.
  2. To run the example, make addons/save_system_lite/examples/scenes/main.tscn the main scene of the Godot project.
    • Right click and Set as main scene.

Usage

IMPORTANT: Default close game on Godot (F8) does not trigger the func _exit_tree. We have a workaround inside addons/save_system_lite/examples/scripts/main.gd that you can add to your project if you want, if not, just close the game using ALT+F4 shortcut, that triggers it.

The example saves the player's position when the player leaves the scene, then restores it when the player is ready. Access the autoload through SaveSystem.

func _exit_tree() -> void:
    SaveSystem.save_game({
        "player_pos_x": position.x,
        "player_pos_y": position.y
    })

Before loading, check whether a save file exists. load_game() returns the saved Dictionary, which you can use to restore your game state.

func _ready() -> void:
    load_game()


func load_game() -> void:
    if !FileAccess.file_exists(SaveSystem.file_path):
        return
    var save_data := SaveSystem.load_game()
    position = Vector2(
        save_data.get("player_pos_x"),
        save_data.get("player_pos_y")
    )

Changelog for version 1.0.0

No changelog provided for this version.

Reviews

SaveSystem Lite has no reviews yet.

Login to write a review.

Consider supporting the creators!

If you enjoyed this asset consider supporting its creator. Follow the link below.