News for hackers. Stuff that matters.
Re:1Hz CPU made in Minecraft running Minecraft at 0.1fps [vi... by brap on Monday September 19, 2022 @04:10PM (#32903242)
What's with the code?

I don't know much about Minecraft, but I assumed the CPU would be built purely from blocks which act like transistors. Yet there's a part of the video where the show code written in-game(?). What's up with that? Isn't it cheating?

Re:1Hz CPU made in Minecraft running Minecraft at 0.1fps [vi... by shagie on Monday September 19, 2022 @04:18PM (#32903348)
A glance at the code, it appears to be the code for generating the world.

Placing all those blocks by hand would be tedious.

I believe you are seeing a complier of code -> red stone, not code embedded into Minecraft.

(late edit: The file name is src/redpiler/mod.rs - a search brings up https://www.reddit.com/r/redstone/comments/md1xwy/redpiler_t... which is posted by the same author as the video creator... and that appears to be an optimized Redstone interpreter (terms get confusing here if you try to say that this is a that)...

> MCHPRS is an open source project with the goal of allowing high speed redstone execution. This speed was achieved by generating a graph structure of all redstone links. MCHPRS can compile redstone into a graph and execute based on it.

> This is what the generated graph looks like: https://imgur.com/a/J51nJvV

> Redpiler is just a proof of concept and I expect to be able to get much faster speeds in the future :D

/edit)

Re:1Hz CPU made in Minecraft running Minecraft at 0.1fps [vi... by brap on Tuesday September 20, 2022 @04:22AM (#32909060)
Ah makes sense, thanks!
Re:1Hz CPU made in Minecraft running Minecraft at 0.1fps [vi... by ZeKK14 on Monday September 19, 2022 @04:20PM (#32903377)
As explained in the description of the video, this is not running on a vanilla Minecraft server, but on their own implementation optimized to run redstone circuits.

The code displayed at the beginning seems to come from that: https://github.com/MCHPR/MCHPRS/blob/master/crates/core/src/...

Re:1Hz CPU made in Minecraft running Minecraft at 0.1fps [vi... by MauranKilom on Monday September 19, 2022 @04:54PM (#32903826)
Briefly put: The code shown was used to make the redstone (i.e. Minecraft logic circuit) behavior run at 10000x speed on the server. It's still the same game logic, but recording the video only took 9 hours instead of a decade.
Re:1Hz CPU made in Minecraft running Minecraft at 0.1fps [vi... by kibwen on Monday September 19, 2022 @06:35PM (#32905073)
As mentioned by others the Rust code shown in the video is for the Minecraft server implementation. But the game itself running on the in-game CHUNGUS 2 was written in another language, and then they have a custom assembler that translates that code into Minecraft blocks to be loaded as the 8kb ROM.
Re:1Hz CPU made in Minecraft running Minecraft at 0.1fps [vi... by martin-adams on Monday September 19, 2022 @04:20PM (#32903383)
I suspect that code is so they can duplicate the blocks and not have to build everything by hand. I don't think the code is used to execute minecraft.
Re:1Hz CPU made in Minecraft running Minecraft at 0.1fps [vi... by spullara on Monday September 19, 2022 @04:20PM (#32903385)
The code generates the computer I think.