Comment by everforward

3 days ago

> - Runs at 1 million ticks per second thanks to MCHPRS server - which is 5.8 kHz clock speed

I had to go look into this, because that's shockingly fast. The latest Intel CPUs have a 6.2 GHz clock rate when TVBing, so each Minecraft tick runs in ~1,000 CPU cycles. Each thread handles 65k surface blocks (256x256 plot), so that means each cycle is processing upwards of 10 surface cycles in the most lenient circumstances I can think of.

I went to go look into how on Earth they're doing that with all this Redstone around; there are some docs at [1] if anyone else is curious. It looks like they have some kind of Redstone "compiler" that converts the Redstone blocks into a graph, and execution happens on that graph.

That's crazy impressive. It does make using Minecraft feel a little silly, to me and perhaps only me. They have an input step where they basically parse the map, convert it to a graph that seems to resemble the AST of an LLVM IR, and then execute it. It makes Minecraft feel like a very awkward scripting language to me; why stack 16k Redstone cubes manually just so they can parse it into an IR instead of just scripting generating the IR or something like that?

1. https://github.com/MCHPR/MCHPRS/blob/master/docs/Redpiler.md

Minecraft has a unique and diverse community, it's what gives it the staying power

I would imagine they used one of many tools for copy/paste in Minecraft, especially with the repetitive nature of the components.

Mojang (and now Microsoft) have taken ideas from the community to make the game better. It would be interesting if they incorporated the Redpiler idea, because redstone can get laggy

  • Yeah, I spent some time thinking about and I think my reaction is heavily tinged by my experience, interests, and skills and probably doesn’t extrapolate.

    I’m not a visual learner, but many people are, and this is probably a good illustration of a basic PC.

    Likewise, editing visual 3D blocks may suit some people better than writing text.

    It’s also probably the most fun way to build a CPU for most people. I would imagine writing scripts isn’t as much for people. Especially children, who I suspect might tinker with this for fun and would balk at learning to write Python to emulate a CPU.

    I wonder if Redpiler is tied to the “thread per plot” model; it might be. Eg there’s some stuff in that doc about optimizing the size of nodes in the graph so they fit into the CPU cache.

    I’m not an expert, but my offhand impression from the docs is that this is all meant to create a fairly small, very high performance world. The main server seems to want the opposite: maintaining acceptable but not necessarily amazing performance across a very large world.

    • Minecraft is definitely trying to improve performance. The latest update changes some redstone mechanics to make it more consistent, remove some quasi connectivity, and make it easier on the update phase of the game loop

      Now if they would just do something about inventory...