Home

Awesome

1k ASCII Mini Robot Factory

Note: This code was written for a 1K contest and is pretty unreadable. For a non-obfuscated version with more features see this repository

The blog, Boing Boing, used to run a spinoff technology site called Boing Boing Gadgets. In 2008, they ran a 1k code contest with the following preface.

1 kilobyte. 1 kibibyte. 1 kilobit. 1,000 ASCII characters. Source code, file size, tile size, the number of letters in a short story: you decide. Use your imagination. Give us a thousand of whatever you want. A 1,000 byte JPG, MP3 or textfile. Need a little extra? 1,024 will do, we’re not religious. We’re cool. Just make it 1K of awesome, k?

In the spirit of '1,000', these 1,000 bytes of javascript will randomly assemble 1,000 different possible ASCII art robots. Inspired by the classic Tomy Pocket Game, Robot Factory, the code generates robots using parts from the models below:

   #MRF-000       #MRF-111       #MRF-222       #MRF-333       #MRF-444
    "Finn"         "Glork"        "Tilde"        "Scone"        "Flrrx"
     ___T_         \.===./         o___o          T___            )_(
    | o o |        | b d |        //0-0\\         |[o]|          |ooo|
    |__-__|         \_=_/         |\_-_/|         \_-_/          |_#_|
    /| []|\      o==|ooo|==o      /|(\)|\      7--|=0=|--<   .-._/___\_.-.
  ()/|___|\()       |___|        d |___| b        |___|      :"  \___/  ";
     |_|_|         .'._.'.        . \_/  .        // \\          (   )
     /_|_\         |_| |_|       . .:::.. .      _\\ //_        __) (__

   #MRF-555       #MRF-666       #MRF-777       #MRF-888       #MRF-999
   "Wheldon"       "Omex"        "Ruffle"        "Sirn"         "Tozar"
     |---|          .---.           Y__           .===.          _._._
     |6=6|         } - - {        _/o o\_        //d d\\        -)o o(-
     |_o_|          \_0_/          \_o_/         \\_u_//         \_=_/
}-. /\--o/\ .-{   .=[::+]=.    )=o=|L88|=o=(     ,=|x|=.    ()ooo|\=/|ooo()
   " |___| "    ]=' [___] '=[  )=o=|___|=o=(     'c/_\  'c       |___|
      .".           /| |\       .  /___\  .       /| |\           |_|
      |_|          [_] [_]    . ..:::::::.  .    (0) (0)         (ooo)

The code comes in two flavors.

q-mrf.html - The Quantum Mini Robot Factory randomly generates a single robot.
Demo

al-mrf.html - The Assembly Line Mini Robot Factory outputs all 1,000 possible combinations of robots.
Demo

License

The 1k ASCII Mini Robot Factory is licensed under the MIT License.