【发布时间】:2012-05-04 21:52:22
【问题描述】:
以 Minecraft 中的红石为例 - 它基本上是一个具有以下基本规则的 15 状态元胞自动机:
Redstone -> Redstone, powered of level Max(neighbours)-1
以及各种连接元素的附加规则
Repeater, inactive -> Repeater, active, level 2 if its input is powered
Repeater, active, level 2 -> Repeater, active, level 1
Repeater, active, level 1 -> Repeater, inactive
Redstone, unpowered -> Redstone, powered if there is a neighbouring Repeater, level 1 or another source
(我已经写了更多关于如何使用 CA 实现 Minecraft 的内容:http://madflame991.blogspot.com/2011/10/cellular-automata-in-minecraft.html)
现在,我的问题是:游戏将如何更新巨大的红石装置?它使用什么数据结构?它真的是作为元胞自动机实现的吗?如果不是,那么您的最佳猜测是什么?
附:我并不是要任何人看一看实际的源代码,而只是想推测一下这个技术是如何实现的。 ...我在这里发布这个,在 SO 上,而不是在 gamedev 上,因为这是一个 CA 问题,而不是一个与 gamedev 相关的问题。
【问题讨论】:
-
那是你的一篇很酷的博文。我特别喜欢玩光照模拟器并看到变化通过矩阵传播。
标签: algorithm cellular-automata