Hacker Newsnew | past | comments | ask | show | jobs | submit | HellMood's commentslogin

"Enchanted" is a 256 bytes(!) program that achieved 2nd place at this years "Revision" 256 bytes competition. The music you hear is also produced by these 256 bytes of code.

Youtube Capture -> https://www.youtube.com/watch?v=R3SgDwyblis

Revision Website -> https://2025.revision-party.net/blog/afterparty/

Code -> https://hellmood.111mb.de//enchanted.asm


Hi there :)

Author here, i quickly threw together a Python Port on Google Colab which also can generate an animated GIF. It's not meant to be perfectly coded or exactly emulating the assembler instructions, it just produces the same image(s)

https://colab.research.google.com/drive/1BFjI3GmuboYzTAf-jeJ...

Example Image : https://i.imgur.com/zIIRLam.gif


Lovebyte 2025 was a sizecoding competition held online from 15. to 16. February this year. They were hosting many size restricted competitions - going from 32 bytes to 1024 bytes, where coders from all around the world could anonymously submit entries to compete against each other. The 64 byte competition was won by "Starpath", a tiny animated raycaster showing curved 3D geometry with fake lighting, a copper night sky and a few tiny stars, while playing ambient wind sound over the speakers. In the download archive you will find different versions together with commented source code, the smallest one -only 55 bytes- is shown and explained in short (t)here


From 8.9 - 10.9. the yearly "Function" Demoscene Event with coding competitions was held in Budapest/Hungary https://2023.function.hu/

The winner of this years 256 byte intro competition: "Farewell" A 256 bytes intro for MSDOS showcasing four different real time 3D scenes(!) together with a soothing e-piano soundtrack

link to binary (etc.) https://www.pouet.net/prod.php?which=95042 Video : https://www.youtube.com/watch?v=xMMwP4SljXo

This production not only won the 256b competition with huge lead it also got the highest score among all other competitions at the event https://www.pouet.net/party_results.php?which=617&when=2023

In case you have any questions regarding more details please ask right away =)


The winner of this years 256 byte intro competition a 256 bytes intro for MSDOS, showcasing four different real time 3D scenes together with a soothing e-piano soundtrack

link to binary (etc.) https://www.pouet.net/prod.php?which=95042


Related discord channel : https://discord.gg/fvNHYjzV


Also #lovebyte on ircnet. The two rooms are bridged, though I haven't participated much outside of watching occasionally.


zooming rotating animation of an earth like textured planet with music, all generated from 256 bytes of x86 binary code for MS Dos, written in plain assembler

Youtube : https://www.youtube.com/watch?v=iJo6UudSY1I Commented Source : https://hellmood.111mb.de//one.zip


"...The submitted version (62 bytes) works as is in MS/FreeDos it is very fast though. There is another version without sound, synced to the timer, which is 44 bytes, also working on all Dos Versions. A size way lower than 40 bytes can be achieved with cutting alignment and color mapping..." (https://www.pouet.net/prod_nfo.php?which=86986)


The final freedos version is available. It includes the Amiga Ball as extra effect. The filesize is still 256 bytes.

https://www.youtube.com/watch?v=wlW84fEHngM


(source included in the link, writeup will follow) To my knowledge, the first implementation ever in 32 bytes. This builds upon the 65 bytes version of Vladislav Kaipetsky, Tenie Remmel and Mark Andreas from 1998.

Edit: The writeup is now available : http://www.sizecoding.org/wiki/Game_of_Life_32b

Capture : https://www.youtube.com/watch?v=EgqiLf19og4


The modbyte trick is clever.

The writeup sure brought back memories.

Over 20 years ago I made a 2-player graphical worm game for DOS. I still have it in a zip. It is 123 bytes long and back then I couldn't squeeze more out of it.

After reading that writeup I feel like there's so much bloat in that 123 bytes!


I did the same thing! The year was 1997. There was some kind of online coding competition back then if I recall correctly. Mine is larger (256 bytes) but it has a nice background image (a mandelbrot fractal). Here is the binary:

    M8CO4LATzRC7JABmZP83ZMcHvwFkjE8CaACgB7AI+jPJSfOqv0ABscaqUL3C/jPAM9tXvxAAZg+/
    8w+v2GaYZvfoZovQZg+v9mYrxmbB+AcrxS0AAcH7BivZg8NkZgPWZsHqEHUDT3XNi8cEEF+qRXW8
    WKris/u/6Hu+2HyL6rv///7EsQK62gPsqAh1++yoCHT74vGwCSaAPQ+qdoBP/sAmgDwPJogED4Zy
    /wP9A/P+zHXOZmSPBiQAsAPNEMPkYIrgPC11A71AATwRdQO9wP48HnUDvf//PCB1A70BADxQdQO7
    QAE8SHUDu8D+PEt1A7v//zxNdQO7AQCwIOYgzw==


Running on twt86.com:

http://twt86.co/?c=M8CO4LATzRC7JABmZP83ZMcHvwFkjE8CaACgB7AI%...

I see the mandelbrot background but then it exits


Not sure why, just tested it in native dosbox and it works.

edit: try pressing any arrow key when the fractal is drawing.

    ~controls :

    Player 1        Player 2 (or arrows)

       W               8
     A + D           4 + 6
       X               2


This is so interesting, VM using a URL for the code.


A bit of hair splitting, but technically it's an emulator, not a VM, since it's just simulating the CPU using javascript in your browser.


It is a base64 encoded highly optimized x86 assembly in DOSBox emulator inside a Javascript VM Chrome browser inside my Windows 10 Sandbox Nested Hyper-V VM inside VMware Workstation inside my Windows 10 machine.


Yeah, and then CPU which translates x86 code into uOPs.


There's always a relevant xkcd: https://xkcd.com/676/


It’s turtles all the way down.


Emulators are VMs too.


Well, depends a bit on what definitions you use.

For example there's VM in the sense of JVM. But there's also in VM in the sense of Xen (VM) vs Docker (not a VM).

And probably a few more slightly different usages.


Those are both VMs in the same sense. A VM creates an abstract, indirect implementation of a computing system. Sometimes that's with a lot of hardware offload as in Xen or picojava. Sometimes that's with a JIT as in HotSpot, orginal VMWare, or Transmeta. Sometimes that's just with an interpreter like the original JVM or Dosbox.

They're all virtual machines whether they're running code originally meant for execution on hardware or not.


That's a pretty wide definition. One that also encompasses any 'bare metal' OS, because they use microcode these days.


10 years later, I wrote a fractal zoomer in asm, it was 399bytes, with a nice color palette.

https://www.pouet.net/prod.php?which=24447


I remember that! it was on rec.games.programmer, wasn't it?


It was usenet for sure, probably the rec.games.programmer.


Please make it available online!


I can make it available here :)

Here's the binary:

  uBMAzRC6AKCOwovyM/+xAYvp+rraA+yoCHX77KgIdPsmgDWRdDCQkORgityyBDqHawF0C5CQ/sP+
  ynXy6wmQKtzQ44uPcwED+YD0BIf+h+k793W/tAyA9ATA7AKK1IDCQbgDAM0QtALNIcMeIBEfJCYX
  Jf//AQDA/kAB
Copy that to a file and then: "base64 -d blah.txt > worms.com"

Make sure there are no spaces in the beginning of the lines.

This is from the original document:

  "This is a version of the worm game for two players.
  Game objective is to stay alive longer than the other worm!
  You die if you eat yourself, ie. you are going RIGHT and you press LEFT.
  
  Move the worm with the following keys:
     PLAYER A:  (topmost worm)
        W
      A   D
        S
  
     PLAYER B:  (lower worm)
        I
      J   L
        K
  
  Winner is indicated by player letter, "A" or "B".
  An even game is indicated by a "C". An even game means that the worms
  ate each others heads, and nobody won."
Edit: correct base64 formatting



cool. For OpenBSD:

     cat worms.uue
begin-base64 644 worms.com uBMAzRC6AKCOwovyM/+xAYvp+rraA+yoCHX77KgIdPsmgDWRdDCQkORgityyBDqHawF0C5CQ/sP+ ynXy6wmQKtzQ44uPcwED+YD0BIf+h+k793W/tAyA9ATA7AKK1IDCQbgDAM0QtALNIcMeIBEfJCYX Jf//AQDA/kAB

        b64decode -o worms.com worms.uue


I have to say, you really are an amazing coder. I read your write up for “memories.” a few days ago and it completely blew my mind. Thanks for sharing your knowledge!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: