Tuesday, 16 December 2008

What can you Write in 128 Bytes?

In contrast to the ever increasing memory available, a number of programmers are choosing to demonstrate their coding prowess by squeezing as much as possible into an incredibly tiny program. It has become a popular pastime to code an impressive graphical display in either 128 or 256 bytes.

Before zooming off to try this for yourself, why not check out some of the competition? Five of the best are listed below, and also my own contribution.

OKOOKO by Ind. The coloured rings sway gently. Good use of colour.
InterferenceInterference by New Generation Crew. A fast moving interference pattern between two sets of rings. Supplied with source code.
CtvereckyCtverecky by RRRola. A chaotic, spiralling pattern. Only 93 bytes long. Supplied with source code.
CorkscrewedCorkscrewed by lord Kelvin - a smooth, gentle swirl slowly draws you in. Great use of colour. Supplied with source code.
Color DreamColor Dream by Digimind - a chaotic looking swarm of spheres. Impressive in motion.
Plasma WavePlasma Wave by John Metcalf - my own contribution. A display of flowing plasma. Supplied with source code.
If there's a program you think I should have included, or you want to show off your own demo, please leave a comment below.

11 comments:

  1. All 128b intros submitted to pouet.net:

    http://www.pouet.net/prodlist.php?type%5B%5D=128b&order=&page=1&order=&x=12&y=7

    ReplyDelete
  2. And where is the source code?

    ReplyDelete
  3. Hi Cristian,

    The screenshot links to the Pouet page. If you download the zip files, some of them contain asm source.

    John

    ReplyDelete
  4. I guess the old microprocessor programmers (8085 and 8086) will be able to appreciate this.

    But even today, those programming for embedded devices, have to be very smart in terms of memory usage.

    ReplyDelete
  5. This is so cool. Didn't know such things could be created with such small code. it's also nice to have a historical review of programming such as this site. Great work!

    ReplyDelete
  6. These kind of graphical things in particular are well suited for tiny programs, since they are fractal-like in their nature. Fractals are known to look fantastic in spite of being generated from very simple principles.

    ReplyDelete
  7. Here's an interesting take on a similar contest.

    http://stackoverflow.com/questions/891643/twitter-image-encoding-challenge

    The challenge was to figure out how to compress an image so that its content could be sent using twitter's 140 character limit.

    ReplyDelete
  8. To paraphrase the Farbrausch demomakers: They are very good...

    ReplyDelete
  9. This comment has been removed by the author.

    ReplyDelete
  10. To be honest, a lot of demos that small are compressed. I have no clue how (probably not UPX), but I'm pretty sure the 4k cdak is compressed. Check out cdak, it's very impressive. And if you think farbrausch is good, look at Fairlight and CNCD's demos. You need a good graphics card though.

    ReplyDelete
  11. Depends on language and application. Eficiency of the compiler is important... or assembler.

    ReplyDelete

Note: only a member of this blog may post a comment.