z0b's realm

Programming

Keep in mind that every executable here has been compressed with the UPX compressor and some crappy anti-virus programs flag the decompressor stub as a virus. So when you download something from here, check the file hash and if they match, you can ignore the anti-virus' whining (and then you can get a better AV software).

Projects

These are larger lumps of code. They might actually be useful for someone. They're also sometimes updated and maintained.

  • ncfg

    A configuration file reading/writing library. Plain C99, UTF-8, small and fast.

    Version:0.9.9
    Released:Feb 23. 2017
    License:zlib/libpng
  • N-Puzzle

    Simple implementation of the classic 15-block sliding puzzle. Very small and portable.

    Version:1.2.1
    Released:August 18. 2013
    License:GPL
  • ZipReader and ZipWriter

    Two small C++ class for reading and writing files. They don't support all the features of the ZIP format, but support enough to be useful.

    License:zlib/libpng
  • ods

    Basic ODS (OpenDocument Spreadsheet) loader/data extractor written in Python.

    Version:0.91
    Released:July 16 2015
    License:zlib/libpng

Snippets

  • Snippets

    A collection of short but useful snippets. They're on their own page so they don't grow this page needlessly.

Code

You can't really call these "projects", they are more like "doodles" or "toying arounds". Some of them are old experiments of mine and for some inexplicable reason I have dug up the code, cleaned them up and released them here. Source code is always included, maybe someone finds it useful.

Unlike the projects above, these can get updated; even new ones can get released. That's because creating/updating these does not take that much of time.

JavaScript

  • Binary and SI prefixes

    JavaScript utility to convert between binary and SI prefixes. Find out how big, er, small your new shiny hard disk actually is...

  • Spinning 3D cube in JavaScript

    On that day the temperature exceeded 34 degrees Celsius and it was too hot to be inside, outside or anywhere. I could not brain much, so I made this.

2D & 3D Graphics

Some of these are software rendered (SDL, get the runtime here), some use GLSL shaders. Not all of these are standalone executables; some of them are just code listings.

3D adventures in the 2D world

  • Sphere rendering

    How to render textured and lit 3D spheres... in 2D.

  • Shade Map

    A sunlight "shade" map. Shares a lot with the above "3D" spheres, since the principles are very similar.

Pixel pushing

  • BarTwister

    Rotating "twister" bar effect.

  • Rotozoomer

    A good old rotozoomer effect, with bilinear texture filtering to make it look better.

  • Cellular textures

    Cellular textures

  • Fault Noise

    Fault noiseThis teeny tiny snippet generates what is known as "fault noise". The resulting images are usually used as heightmaps in terrain engines. The algorithm is simple: take an image and initialize it to some "middle" value. Then pick two random points in the image. Imagine a line through them that splits the image in two halves. Increment the pixel values on the other side of that line, and decrement on the remaining side. Choose another random line, and repeat this process the image looks good.

    This is a simple, naive plain C99 implementation. It's not particularly fast, but it serves as a demonstration of the algorithm. A GPU version should be possible, but I've not tried it.

    One significant improvement that could be done is to apply a slight blur on the image either during generation, or afterwards. This would hide the sometimes very visible splits.