Description
Changelog
Reviews (0)
中文文档 <- 点击这里。
A Godot's universal serializer for size optimization.
Support all data types except Object and RID in Godot 3.x.
Feature:
- Without losing type information. Need not type detection and forced typce conversion in Cross end transfer,just like local parameter transfer.
- Integer and float are variable length serialization.
- The serialized data size is smaller than
JSONtext to utf8 and the native serialization methodvar2bytes().GUS is especially suitable for the serialization of structured small data transfer in multiplayer games.You can callGUS._test()to view the data size comparison after serialization in these three way.
How to use:
- Modify the configuration definition constants at the beginning of the script as required.
- Pass variable which without Object and Eid into
GUS.to_bytes()and gets the serialized data for sending through any network peer. - After the remote network peer obtains the serialized data, passe it into
GUS.to_var ()to get the same variable as before serialization. Additional: The obtained serialized data can be passed intoGUS.get_ pretty_ json_text(), a beautified JSON text will be return, which is for printing and display when debugging.
Be careful:
- The configuration definitions of cross end applications should keep the same.
ArrayandDictionaryshould not containObjectorRID.- Because of implementing by GDScript, although the serialized data size is better, it will cost lot of time when serialization and deserialization large array(both Array and PoolArray), you should avoid to use GUS in time sensitive case.
Changelog for version V1.04
No changelog provided for this version.