amethyst / amethyst/legion

Feedback from the merged experimental branch

Đang mở
#169 26 bình luận 1 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Rust
Star
1.7k
Fork
140
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

This is a continuation of feedback given in https://github.com/TomGillen/legion/pull/115 before it was merged. Some of this is new and some of it I'm just bringing over from the PR and previous discord chats so it's all in one place.

The main issue currently is that deserializing with the non-human-readable path fails.
* I was able to hard-code legion to always take the human-readable path (even when using bincode) and I was able to serialize a world and then deserialize it.
* When I hard-code to take the non-human-readable path, serialization/deserialization fails, despite working before.
* I did this with RON as I think it will be easier to figure out than with bincode. The error was "Message("84:29: Expected Array")", this is what it was reading: [expected_array_84_29.txt](https://github.com/TomGillen/legion/files/5014041/expected_array_84_29.txt)

I wasn't able to sufficiently test clone_merge yet. It was time-consuming to update my code to compile and took a while to figure out the serialization issue.

Other issues:
* When deserializing prefabs or copying entities from one world to another, I'm having to make tempories on the stack and then copy them into legion storage. Before, these operations were in-place and did not need this copy. In some cases when dealing with multiple components (like in deserialization) this also requires heap allocations to build a Vec to pass into extend_memcopy_raw
* Could we make World::universe() public?
* For entity merging and serialization, I think the old APIs were much "lighter touch" and less opinionated than the current ones. In particular, I don't like that entity/UUID mappings are persisted for the lifetime of the universe. This means accumulated wasted memory if you were moving in a large, streamed environment. The previous APIs accomplished this without extra copies and without a continuously growing entity/UUID map.
* (I still think the loss of tags is unfortunate)

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.