开发者

Alternative approaches to a Minecraft Redstone Simulator

I'm just programming a Minecraft Redstone Simulator for Android. I'm doing the simulation with some variations of Dijkstra, but I heard, that the real simulator does something different and updates every redstone block every r开发者_如何学Pythonedstone tick.

How is notch doing it?

Update I know that he uses a HashSet, this doesn't look like Dijkstra, does it?


I will call anything that's redstone-related a "redstone block".

Every tick, Minecraft iterates through the hashset and updates each redstone block.

When more redstone blocks are added, the hashset size is increased, and everything that was in the previous, smaller hashset is scrambled into a random order.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜