Entity Component System

http://t-machine.org/index.php/2007/09/03/entity-systems-are-the-future-of-mmog-development-part-1/php

http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/動畫


 

entity system over viewui



entity component system在遊戲開發裏面也是有些日子了。對它能夠這樣描述:
spa

  • entity表明遊戲裏的東西--有guid來與其餘區分component

  • entity能夠有彼此包含的關係----樹狀結構orm

  • entity中有component list,表明其屬性和功能,GraphicComponen能夠攜帶material,geometry的屬性,能夠有變色等功能,animation帶有animation數據作動畫的功能。。。遊戲

  • component之間能夠經過entity來彼此訪問,好比animation component經過entity更新本entity的graphic component的骨骼數據遊戲開發

  • component是data driven的,也就是說能夠經過配置文件,editor實時的編輯的方式來描述定義一個entity,它有那些component,裏面數據怎麼樣。開發

  • component也能夠實時的加減,好比咱們能夠加一個ColorizeComponent來控制GraphicComponent的顏色,在buff時間事後在減掉或者單純的disable等。get

 


entity in action

實際應用中會考慮到resource和multithreading這些比較特殊和敏感的東西,放在entity裏面處理也是比較合適的。

相關文章
相關標籤/搜索