Overv cloned Minecraft using x86 assembly. You can boot your computer into it. Crazy: "Starting in assembly right away would be a bit too insane, so I first wrote a reference implementation in C". Instructions are provided to put it on a USB stick. [via Hacker News]

18 Responses to “Minecraft in Assembly language”

  1. Andrew Singleton says:

    I want to see this, minetest, or one of the other ‘hey lets do minecraft in x language’ do something different once it’s established worldbuilding.

    What I dunno but it’d be bad if they just did a full clone.

  2. Илья Найдов says:

    Minecraft OS anyone?.. :)

  3. madopal says:

    Hey, maybe it won’t take 4GB for a server in assembly!

  4. sschenck says:

    OK, this is neat, but I’ve got to take issue with how it was presented. “Minecraft” isn’t a game type – it’s a specific piece of software. A Minecraft “clone” would need to support Minecraft world files, mods, et al. This is not that.

    • Kevin Pierce says:

      The issue here is that Minecraft is often defined by the client and server mods. The ability to relink Java JAR files to integrate these mods is a key to the game’s appeal.

  5. gjbloom says:

    He should translate it to ARM assembly language and port it to boot on a Raspberry Pi.  Instant-on, dedicated Minecraft appliance!

    • Andrew Singleton says:

      even though there’s a cut down version of minecraft on the pi for free.

      I could see this succeeding.

  6. miasm says:

    lets hope they stop short of encoding into spacetime itself.
    Then we would be walking around in a… OH, SNAP!!

  7. jasonsewall says:

    As someone who has written more than a few lines of assembly in my day, let me say assembly != faster. This is neat, and it is clearly (both by inspection and the author’s admission) a toy, educational project. That is great! That is neat!

    But don’t get it confused with the future of computing – it is the dim, distant past and we should be happy to have it behind us.

    When I was young and (more) naive, I used to fantasize about computer games that booted your machine and avoided all the waste and problems of modern operating systems. Wrong! Whatever resources you free up are severely offset by the many things the OS does for you that you must forego or write yourself.

    Everyone who is exclaiming that this will save memory and make things faster needs to take an OS class.

    * Graphics: Right away we see that he has written his own raytracer because he doesn’t have OpenGL (no GPU). That’s got to hurt.  In fact, he is just marching rays through the grid: no accelerations structures, just brute force.

    * Net: Minecraft is pretty heavily online, right? Did he write his own TCP/IP stack? No way, no access to NIC.

    * Persistent storage is nice; where will you store your carefully constructed voxel Millennium Falcon model? Who is setting up filesystems and handling writes for you?

    * Memory!! It looks like his current world size is 32^3, which sounds small (I don’t play Minecraft). Without paging and modern memory managers, how will you use all the glorious storage on your machine?

    You can forget about threads (multi-core), input devices (other than the keyboard), output devices other than VGA-resolution results, etc and a bunch of other things I am glossing over.

    There are definitely crufty corners in our OSes, but they are still totally worth it over writing it all ourselves in ASM (even Windows).

    In fact, very little is (or should) be written in assembly nowdays. The important things are algorithmic improvements and thread/data-level scalability. I only use assembly when the compiler’s code generator makes a “mistake” (i.e. doesn’t emit instructions in the best format for performance) and that is quite rare. Modern CPUs are very good at finding instruction-level parallelism in most code and you are better off focusing on higher-level concepts and adding features.

    TL;DR: Good class project, probably quite illuminating and satisfying. Absolutely not a replacement for any version of Minecraft running on an OS.

    • Jose Crosa says:

      Here, have my like. Future posters: ^this.

    • Boundegar says:

      You’re just a co-opted apologist for operating systems, which is Tha Man.

    • When I was young and (more) naive, I used to fantasize about computer games that booted your machine and avoided all the waste and problems of modern operating systems

      I’m not sure about your age, so this might be before your time, but in the 8-bit era (and even the early IBM PC era), that’s exactly how most games worked — games came on floppies or tapes (and hard drives weren’t around at least for home machines), and the full operating system would take a large chunk of the available space. So most games just had a bootloader that dumped you into the game itself.

  8. cleek says:

    FTFA: “Unfortunately this turned out to be a lot more work than I expected, so
    currently a large fraction of the codebase is still in C.”

  9. DevinC says:

    …So once Minecraft is ported to DCPU-16 assembly, you could play it in 0x10c.  

    And with enough redstone, you could build a machine to play 0x10c in Minecraft.

Leave a Reply