Much Assembly Required: Game Your Way To Assembly Guru Status

It can be hard these days to find an excuse to create something for learning purposes. Want a microcontroller board? Why make one when you can buy an Arduino or a Blue Pill for nearly nothing? Want to control a 3D printer? Why write the code when you can just download something that works well like Marlin or Repetier? If you want to learn assembly language, then, it can be hard to figure out something you want to do that isn’t so silly that it demotivates you. If that sounds like you, then you should check out Much Assembly Required.

This is a multi-player game that runs in your Web browser. But before you click close, consider this: the game has you control an autonomous robot using an x86-like assembly language. Your robots have to find resources and build structures so it is sort of a mash up of Minecraft and one of the many modern Hammurabi-inspired games like Civilization.

The robots have a variety of peripherals including: drills, lasers, LiDar, legs, a hologram projector, solar-charged batteries, clocks, and more mundane things such as clocks, floppy drives, and a random number generator. The virtual world simulates day and night, so plan your power management accordingly.

You might wonder if you should even bother learning assembly. While it is true it isn’t as necessary as it once was,  understanding what the computer is doing in a very basic way can help form your thinking in surprising ways. There are also those times when you need to optimize something in assembly and that’s the difference between working and not working.

If you want to do something more practical, we’ve looked at options before. Of course, you can always slip your C compiler some assembly, too.

18 thoughts on “Much Assembly Required: Game Your Way To Assembly Guru Status

  1. “You might wonder if you should even bother learning assembly. While it is true it isn’t as necessary as it once was, understanding what the computer is doing in a very basic way can help form your thinking in surprising ways. There are also those times when you need to optimize something in assembly and that’s the difference between working and not working.”

    Kind of hard to be a “hacker” without knowing it.

    1. I agree in concept. However, as we discuss a lot around here the word hacker means different things to different people. The barrier to entry for building and customizing things has gotten lower and lower which is a good thing. However, it does mean today’s hacker might not know assembly and maybe can get along for a long time without it. On the other hand, as I pointed out, knowing assembly is almost always a good thing as long as you also have the wisdom for when not to use it.

      1. Lol,
        “Knowledge is knowing what to say. Wisdom is knowing whether or not to say it.”
        You can use assembly for a lot. It’s a great way to get a lot done in a small space but if you are bypassing or ignoring OS services you will cause a problem that is very hard for others to debug. This is becoming more important as RTOSs become more common.

        1. Anyone who plays with the Arduino API timers or UARTs can certainly point out the counter example.
          Most of the time every hundred lines of code adds at least one critical bug.

          ASM is no different from an other simple language, and is usually what you end up looking at debugging hardware level firmware anyways, as how else will you know your wrapper library is linking garbage due to code optimization…

          Every high-level language including C/C++ has things like code-motion optimization, and most of the time it must be disabled for time critical RTOS applications. Everyones pet languages .NET/Lua/Python/Java have fundamental problems in a guaranteed-latency environment, but most kids (including Microsoft itself) wouldn’t have a clue why it is important. Thus, almost all modern OS written by myopic experts will leak under fuzz testing for zero-day-exploits due to the lack of true concurrency support, and low level exploits get easier if the memory management has more layers of abstraction.

          High level languages do make the program easier to build, and thus less prone to design errors as the runtime code is unrolled automatically.
          However, the 1 percent algorithmic flaw error-rate remains a fundamental property of human-beings, and compilers are far from perfect.

          If people have never coded at least one project in ASM, than they are probably a terrible programmer.

    2. I don’t regret the time I put in to learn assembler on a couple of different families, but you can do so much in C for most microcontrollers that I haven’t had to dip into assembler in a long time. I think one can still be a L337 h4x0r without learning assembler.

  2. I learned ML right after BASIC on a Commodore 64, oh so many years ago. This game is actually quite fun. My robot is all set up and about to begin its autonomous wandering and seeking resources after about an hour of work. They’re still adding and developing it in real time so if I don’t have time to play for a couple days (or weeks), I’ll have something new to poke at when I get back.

    Thanks to the creator and great community already playing, you’ve created something really nice and enjoyable. I hope it encourages many new ML programmers to be born. Just remember that when you hold a hammer, everything isn’t automatically a nail.

    Learning ML isn’t so much about learning another new language you have to know, it’s about learning to think about problems in a different way – breaking them down to rudimentary components to build back up a solution. I was never forced to learn ML officially. They hit us with C, Pascal, and FORTRAN as engineers. Knowing the ML for even a simple processor like the 6500 series made every other language just seem reasonable. IMO, learning it for that reason alone makes it worth the effort. The game just makes it fun.

    After your 100th time of typing MOV or a function preamble in a program, I promise you’ll get way more miserly in how you code. Maybe that’s not a bad thing either. The world originally had to fit in 64k (or smaller) chunks at a time.

  3. Am I the only one currently thinking of the game Duskers?

    Granted that game, while good, did have limited build/salvaging options. For instance you couldn’t tear down internal spaces of a derelict ship for additional scrap or even transfer over to the other ship if it offered more space.

  4. I can’t tell you how many times over the years, that an inept programmer tried to get us to “fix it in hardware” because they were too lazy or stupid to code a few routines in assembly language.

    In a graphics design, they wanted us to create a register that could be written to, and when read back would be the bit-reversal of the original. Because it was “messy to do in C”.

    Or a really old terminal design using a 4MHz Z80 and a high-level language that couldn’t keep up at 4800 baud. Yet a similar 2.5MHz Z80 could easily do 9600 baud with assembly.

  5. There is knowing something, and then there is knowing of something. Or, as I sometimes say when asked “do you know X?”: “I know enough to have an intelligent conversation about it at a party.” I think that the need to know assembler falls under this category nowadays. Would it be helpful to know assembly? Of course. In the great scheme of all of the things to know, is knowing assembly a priority? For many areas the answer is yes, but for an even larger number of areas, the answer is most certainly no, but people working in those areas still should know enough about it to be able to have an intelligent conversation about it.

Leave a Reply to LOLCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.