4 ms·
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
by brap 4y ago
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?
- shagie 4y agoA 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_the_redstone_compiler_1khz_high_speed/ 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 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)
- brap 4y agoAh makes sense, thanks!
- ZeKK14 4y agoAs 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/redpiler/mod.rs#L683 https://github.com/MCHPR/MCHPRS/blob/master/crates/core/src/...
- deleted 4y ago[deleted]
- martin-adams 4y agoI 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.
- spullara 4y agoThe code generates the computer I think.
- MauranKilom 4y agoBriefly 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.
- kibwen 4y agoAs 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.