Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Daylily-Zeleen committed Jul 30, 2023
1 parent d754535 commit 6ac239e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 31 deletions.
20 changes: 4 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@

# GUS - Godot Universal Serializer 2.1.5 - Godot的通用序列化器 - V2.1.5(Godot 4.1 stable)

# `master` branch is c++ source code。
# You can go to `plugin` branch to browse compiled plugin, or go to release page to download the plugin which compatible to your using Godot version.

![Image text](icon.png)

[中文文档](README_zh_cn.md) <- 点击这里。
Expand All @@ -20,26 +17,17 @@ Support all data types except `Object`, `RID`, `Callable` and `Signal` in Godot
You can run the `EditorScript` which named `GUS_benchmark.gd` to view the contrast between `GUS`, `Native`, and `JSON`.

# How to use:
1. Download released plugin, install ~~and enable~~ this plugin just like other plugin( If the version is not match, please compile by yourselves).
2. ~~Modify properties of autoload which named `GUS` as you require.~~
3. Pass variable which without `Object`, `OID`, `Callable`, `Signal` into `GUS.var_to_bytes()` and get the serialized data, than send to network peer.
4. After the remote network peer obtains the serialized data, passe it into `GUS.bytes_to_var()` to get the same variable as before serialization.
1. Pass variable which without `Object`, `OID`, `Callable`, `Signal` into `GUS.var_to_bytes()` and get the serialized data, than send to network peer.
2. After the remote network peer obtains the serialized data, passe it into `GUS.bytes_to_var()` to get the same variable as before serialization.


# Be careful:
1. `Array` and `Dictionary` should not contain `Object`, `RID`, `Callable` and `Signal`.
2. This repo only compile `windos` version, on other platform, you need to compile by yourself (because I have not other device to test).
3. ~~The properties of autoload `GUS` between all network peers should keep the same.~~
4. ~~Currently unsupport Godot 4.x which compiled with `typeof double real_t`.~~
5. ~~Currently just support platform `windows`.~~



# TODO:
1. ~~If I find the way to bind static method for `GDScript`, I will get rid of the autoload `GUS`.~~
2. ~~Compile `linux` and `osx` version.~~
3. ~~Compile `typeof double real_t` version to support custom Godot( but I encounter error which I can't handle it, too).~~
4. ~~Deal `Object`, `RID`, `Callable` and `Signal`.~~
5. Handle endian.
1. Handle endian.

# How to compile:
1. Follow [offical tutorial](https://docs.godotengine.org/zh_CN/stable/development/compiling/index.html) to set up you develop enviroment.
Expand Down
19 changes: 4 additions & 15 deletions README_zh_cn.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@

# GUS - Godot Universal Serializer 2.1.5 - Godot的通用序列化器 - V2.1.5(Godot 4.1 stable)

# `master`分支为C++ 源码,可以跳转到`plugin`分支直接查看已编译的插件,也可跳转到发布页面下载匹配您使用版本的插件。

![Image text](icon.png)

[English doc](README.md) <- click here。
Expand All @@ -20,26 +18,17 @@
可以通过运行名为`GUS_benchmark.gd`的编辑器脚本来查看 `GUS``Native` 以及 `JSON` 这三种方式的剧烈话反序列化测试对比。

# 如何使用:
1. 下载发布的插件包,像其他插件一样安装~~和启用~~即可(如果版本不匹配,请自行编译)。
2. ~~根据你的需求代码修改名为`GUS`的Autoload的属性.~~
3. 传递不包含`Object``OID``Callable`以及 `Signal`的变量给 `GUS.var_to_bytes()`并获取序列化后数据,然后发送给其他网络对等体。
4. 远端的网络对等体获取到序列化后数据,传递给`GUS.bytes_to_var()`,即可获得与序列化前相同的变量。
1. 传递不包含`Object``OID``Callable`以及 `Signal`的变量给 `GUS.var_to_bytes()`并获取序列化后数据,然后发送给其他网络对等体。
2. 远端的网络对等体获取到序列化后数据,传递给`GUS.bytes_to_var()`,即可获得与序列化前相同的变量。


# 注意:
1. `Array``Dictionary` 不能包含 `Object``RID``Callable`以及`Signal`
2. 该参考只编译了`windows`版本,如果您使用其他平台,需要自行构建(因为我没有其他平台的设备进行测试)。
3. ~~不同端的`GUS`属性必须保持一致才能正确反序列化。~~
4. ~~当前不支持`typeof double real_t`的自定义构建Godot 4.x版本。~~
5. ~~当前仅支持`windows`.~~



# TODO:
1. ~~如果我找到绑定静态方法给`GDScript`的办法,我将抛弃自动加载`GUS`, 改为静态方法的方式去实现功能。~~
2. ~~编译`linux``osx`版本。~~
3. ~~编译`typeof double real_t`版本以支持自定义构建Godot 4.x版本(但我碰上了我无法处理的编译错误)。~~
4. ~~处理 `Object``RID``Callable`以及`Signal`~~
5. 处理大小端。
1. 处理大小端。


# 如何编译:
Expand Down

0 comments on commit 6ac239e

Please sign in to comment.