TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

What is an entity system framework for game development?

52 点作者 carloscm大约 11 年前

7 条评论

angersock大约 11 年前
Idea we played with was one step further--take the entities and have their components/state data backed as atoms, and create separate buffers. During update, read from buffer A and write state to buffer B, then swap. This should allow for fairly trivial use of a worker pool to handle concurrent updates.
评论 #7502464 未加载
评论 #7503069 未加载
评论 #7501959 未加载
nickporter大约 11 年前
What&#x27;s cool about this architecture is that it lets you define your game objects in terms of data, not code. You&#x27;re able to change your game objects at runtime.<p>I made a small C++&#x2F;QT implementation here:<p><a href="https://github.com/surjikal/cbgos-experiment" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;surjikal&#x2F;cbgos-experiment</a><p>And here&#x27;s a screenshot of a game I built with it:<p><a href="https://raw.github.com/love-rollercoaster/space-game/master/assets/images/revenge-of-the-asteroid.png" rel="nofollow">https:&#x2F;&#x2F;raw.github.com&#x2F;love-rollercoaster&#x2F;space-game&#x2F;master&#x2F;...</a><p>This is supposed to be an 3d asteroids clone, but the asteroid and spaceship graphics components were swapped. So you&#x27;re controlling an asteroid, and your goal is to destroy spaceships.
mercurial大约 11 年前
Interesting to see the evolution from the original game loop to the final system, kind of reminded me of these drawings &quot;from ape to modern homo sapiens&quot;. One thing that bothers me with the final result, though, is that you end with a system where you can&#x27;t tell the difference between two kinds of entities. If in your system infantry can climb aboard a spaceship but not the reverse, you can&#x27;t guarantee that statically, unless you have a separate layer for this kind of logic.
评论 #7500815 未加载
pfraze大约 11 年前
This[1] is a pretty good resource on ES.<p>1 <a href="http://entity-systems.wikidot.com/" rel="nofollow">http:&#x2F;&#x2F;entity-systems.wikidot.com&#x2F;</a>
platz大约 11 年前
This is interesting, reading some of the linked documents, my naive generalization is that it pushes the entities into using things like maps and dictionaries instead of static properties. The &quot;system manager&quot; stuff just pulls things out of the maps and feeds them to functions to do work, so it is very much &#x27;data-driven&#x27; and I must assume more work is put into &quot;configuration&quot; of the entities, just like a data-driven business process requires &quot;configuration&quot; of the order processing pipeline.<p>i.e. Can some of the complexity of a &#x27;true&#x27; entity component system by simply reduced to favoring dictionaries and maps instead of static properties?
评论 #7503753 未加载
carloscm大约 11 年前
What would be an ES-friendly way of modeling relationships between entities? It&#x27;s hard to give up the speed of pointers in say C++ and use instead handles for example (tho they would come with other advantages like lifecycle handling).
mattgreenrocks大约 11 年前
I&#x27;ve always wondered if this idea was usable in general purpose application programming. It is very similar to DCI.
评论 #7501281 未加载