UUIDCollisionResolver

オープン
#227 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
20/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
cpp
領域
tooling

調査の方向性

まず、リンクされた entityx の issue とここで説明されているシリアライズの制約を読み、その後 entities_for_debugging() と UUIDGenerator を調べてください。デシリアライズされた UUID の衝突解決動作を定義し、Transform などのコンポーネントに格納された参照も含め、完了をどのように検証するかを文書化してください。

索引モデルが issue の本文から書いたものです。

説明

I'm trying to integrate cereal serialization library with entityx

Also I have read https://github.com/alecthomas/entityx/issues/117, https://github.com/alecthomas/entityx/issues/14 and https://github.com/alecthomas/entityx/issues/25

I got four basic ideas:

  1. We should use custom UUID component instead of Entity id
  2. For serialization we should check manually if entity has specific components (and, well, iterate through all of them)
  3. (because of 2) We should manually decide what components should be registered and how components should be serialized/deserialized
  4. To iterate over all alive entities we must use entities_for_debugging(). It marked "not very fast, so should only be used for debugging", but well I don't see any other alternatives for serialization

My big question is: how elegantly implement UUIDCollisionResolver? I mean, UUIDGenerator automatically attaches UUID component for every new Entity, and when we try to deserialize some entities from external file here is high probability that UUIDs of that entities are already taken

Also, some components can store UUID in themselves, so UUID must be replaced with a correct one too

To be more specific, lets say we have such components:

struct UUID
{
    //UUID(...) {...}

    uint32_t value;
};

struct TreeNode
{
    //TreeNode(...) {...}

    std::string name;
};

struct Transform
{
    //Transform(...) {...}

    glm::vec3 position;
    glm::vec3 scale;
    glm::vec3 rotation;

    bool is_dirty;
    glm::mat4 cache;

    UUID parent;
    std::list<UUID> childs; 
};
主要言語
C++
スター
2.3k
フォーク
300
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

alecthomas/entityx のほかの issue

alecthomas/entityx の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。