1. 36

Via: https://hackaday.com/2018/11/21/tiny-ray-tracer-fits-in-64-bytes/

Throughout human history, people try to make the biggest, the fastest, and — sometimes — the smallest. [Hellmood] falls into the latter category and proves it with a 64 byte [interactive 3D raycasting application][1] for MSDOS. Why MSDOS? We suppose why not? The .COM file format is lean, and you can take over everything without a lot of work. If the program were huge, it wouldn’t be very impressive. There are 64 shades of gray which is odd looking these days, however there are versions that use various color palettes and each one fits in 64 bytes or less. There’s even mouse control and you can see the results in the video below. There were even some versions that didn’t do 3D and ray tracing that fit in 43 bytes, but that’s not as impressive visually. As you might expect, the code is written in assembly: We looked at the code and recognized a BIOS call to set the video mode to 13 hex and some direct port output to the VGA video DAC at 0x3C9. We got lost after that, but it is certainly an economical program even if we can’t see how it is reading the mouse. If you get the urge to do some MSDOS programming yourself, you can [use gcc][2] although you will almost surely get bigger executables. If you are just nostalgic for old games and software, you can run those in [your browser][3]. [1]: https://www.pouet.net/prod.php?which=78044 [2]: https://hackaday.com/2018/05/14/msdos-development-with-gcc/ [3]: https://hackaday.com/2016/02/05/a-dos-education-in-your-browser/

  1.  

  2. 11

    When my simple C code starts making executes more than a few K big, I begin to question my place in the universe. I start thinking “hey, I should malloc all those big arrays”. Sometimes reality sets in and I realise that 1000-item long array isn’t actually that large and doesn’t matter. I hate reality, the intro coders have it right.

    If I had been given a floppy full of demos when I was a kid with a Win98 PC…

    Quick introduction to pouet.net: checkout the 180KB demo fr-041 debris. Win32, runs 100% fine under Wine and doesn’t need much power (runs on my cheap netbook). Fetch some crackers/tea and run it, don’t watch it on Youtube. Remember: it’s faster to download than many JPEGs.

    1. 3

      Yes, farbrausch is incredible. You can also check out .kkrieger, and then go read some of the source code.

      Another impressive one is elevated by Rgba and TBC. This one is only 4k.

      1. 1

        That demo was wonderful. Thanks for posting it!

        I recently went through the exercise of upgrading my operating system, which involved backing up loads of files that I have accumulated over the years. The directory for Dark Souls 2 was about 20-30 GB and I don’t think it looked much nicer than that demo did. (Admittedly, there is a lot more content in DS2 and demo scene’s whole thing is making videos that are impossibly small.) Makes me wonder how far you could push demo scene techniques into full scale games.

        1. 3

          and demo scene’s whole thing is making videos that are impossibly small.

          Small nitpick: that’s only a subset of the demoscene. Some people prefer making things for old or even really old computers instead, or exotic machines, or size-unlimited demos for PCs, or even videos and animations, and sometimes experimental stuff

          [EDIT] Oh, and:

          Makes me wonder how far you could push demo scene techniques into full scale games.

          The problem for making these things small is that the techniques used are specialised (i.e. not applicable to every program out there), and they require a lot of effort. See eg. this blog post.

          Basically, lots of cheats are used to make something on screen look nice, while it doesn’t have to be (which is much easier to do when the program isn’t interactive). Here’s an example of this.

      2. 1

        I wonder if it’s called wolf as an homage to Wolfenstein.

        1. 3

          As explained here on pouët, it was inspired by another intro called Wolf128b, which was indeed inspired by Wolfenstein.

        2. 1

          There are so many amazing demos out there but my personal favourite has to be Chaos Theory (64K) with debris a close second.