0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

OOP (E, C, EC), ECS

Last updated at Posted at 2020-09-18

簡単にデータ管理の分類分けをします

あまり分かっていません

OOP

E (e.g. Godot Engine (?))

Node を継承する。

すでにトレンドから外れているが、とにかく速くゲームを作ることができる。

C (e.g. MonoBehavior)

Entity へのアクセスが禁止されている。

ロジックを Component へ埋め込むことが推奨される。

EC (e.g. Nez)

Entity と Component へのアクセスが許可されている。

Entity を継承することも考えられる。 Component のみ継承するなら C 寄り

ECS (e.g. Flecs, Bevy ECS)

配列を component 毎に用意するか archetype 毎に用意するかで実装の分類分けができる。

データ/ロジックは Component/System 開で完全に分離される。

観点

  • グローバルな component (resource) の有無
  • 親子関係のサポート
  • イベント (メッセージ) のサポート
  • prefab や state machine のサポート
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?