Check out our latest project ✨ OpenChapter.io: free ebooks the way its meant to be 📖

Godot MMKV

An asset by Sakuya
The page banner background of a mountain and forest
Godot MMKV hero image

Quick Information

0 ratings
Godot MMKV icon image
Sakuya
Godot MMKV

Godot MMKV is an efficient, small, easy-to-use key-value storage framework

Supported Engine Version
3.5
Version String
1.1
License Version
BSD-3-Clause
Support Level
community
Modified Date
2 years ago
Git URL
Issue URL

Godot-MMKV

Godot MMKV is an efficient, small, easy-to-use key-value storage framework,its build from https://github.com/Tencent/MMKV.

Features


Efficient. MMKV uses mmap to keep memory synced with files, and protobuf to encode/decode values.

Reading and writing data in a loop is about 40 times faster than Godot File System

Multi-Process concurrency: MMKV supports concurrent read-read and read-write access between processes. Easy-to-use. You can use MMKV as you go. All changes are saved immediately, no sync, no apply calls needed.

Supported operating systems:

  • Windows(x64)
  • Android(arm64-v8a)

Quick Tutorial


Download the file to your addons folder

var _mmkv = load("res://addons/godot-mmkv/mmkv.gd").new()

  func _ready():  
    _mmkv.initMMKV("file_path","file_name") 
    _mmkv.setString("key","value")  
    var result = _mmkv.getString("key") 
    print(result) 

Supported data types:

1.String

2.float

3.Dictionary


Autosave class

It can automatically cache variables in the current script

extends NodeMMKV

#var hp = 0 
#The variable will be automatically saved, and it will be automatically assigned the next time it is opened.

func _init():
    isBinding = true #open auto save
    save_tikc = 0.05 #save wait time

Godot MMKV is an efficient, small, easy-to-use key-value storage framework

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
Godot MMKV icon image
Sakuya
Godot MMKV

Godot MMKV is an efficient, small, easy-to-use key-value storage framework

Supported Engine Version
3.5
Version String
1.1
License Version
BSD-3-Clause
Support Level
community
Modified Date
2 years ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers