Interactive Work
-
DPF Image Format
DemoI designed what I call the DPF image format particularly for images that would be negatively impacted by JPEG's artifacts and that had too many colours for a GIF. This is most similar to the niche that PNG is focused on, so I tested it mainly against PNG compression.
DPF tends to perform significantly better than PNG for certain types of images, especially those that contain large empty space such as screenshots of text documents or other productivity type applications, but worse than PNG for more photographic content.
So what does significantly better mean? 10-20 percent the size of a PNG (80-90% relative compression) is the most common result for the best case scenarios, and for images that are particularly uncompressible, DPF can even be larger than the original image. I'd say common results for less ideal situations is about 50% smaller than a PNG.I've implemented the codec in PHP, which has pros and cons. I'm running on a shared server so trying to compress images that are too large will exceed my execution time or memory limits, which is a bit of a hindrance but I also found it to be a fun challenge. Of course using PHP also means the process is not nearly as fast as a C implementation would be, and some images can take 10-15 seconds to encode.
The format allows for 15 bits of encoding options as well as password protection on compressed images, but currently I've implemented 2 types of encoding: the default, and one that skips the final step in compression, leaving a semi-readable file.
There is not currently support for alpha channels or higher than 24-bit depth, but these could very simply be added with an encoding option.Try these images for the convert field (in the URL):
screenshot.png, screenshot2.png, screenshot3.png, screenshot4.png, pticon.png, test.png, test2.png, text.png, jpgtest.jpg, paltest.gif, test.bmp, hardimage.png, hardimage2.png, worstcase.png
The convert field can also take URLs to images, but the log will not report the original image size or, as a result, the correct total compression achieved.
Try adding &enc=-1 to the URL to get a semi-readable DPF to download, though note that this option will result in siginificantly larger file sizes. -
D2K Downloads System
DownloadThis actually contains two related but slightly different PHP systems: a downloads system and a gallery system. They are somewhat interrelated, as they evolved from the same original code and I made an attempt at one point to combine the two, but as I was using them I found that they worked perfectly well as they were and left them as-is. The downloads system in particular was intended to be as easy as possible for someone to add to any website without really touching PHP. To this end it includes a setup page that walks the operator through setting up MySQL databases, doing as much as possible automatically. It also separates out the code from the layout, making it as simple as possible for someone setting this up on their own server to customize it to their needs without touching any important functionality. Additionally, it includes a comprehensive management system where an operator can add and organize files into heirarchical categories, as well as track views and downloads with numbers and charts generated on the fly.
The name is something of a relic: when I wrote these systems I wrote them for a website I created called D2K Studios.
MySQL is required for the databases, and ImageMagick for generating the graphs to depict stats. Initially I wrote them to use flat file databases, and the gallery still does so for tracking metadata, analytics, and user ratings. -
Number Crunchers
DownloadThree little programs are included in this download:
perfTest:
A CPU performance test I wrote just to see what might be involved in getting some sort of meaningful performance numbers that can be compared between different processors. It runs 5 tests 10 times each, generates primes, calculates distances, performs exponential functions, runs a 2D averaging function, and compares and modifies two large 2D arrays interdependently.
The source for this is included.
PrimeGen:
Generates 10 million prime numbers. It times how long the process takes and gives progress updates at every 10%.
The source is included.
Tax Calculator:
This is a little VB.net program that I wrote mainly to figure out what the base price for an item needed to be to reach a given final price, given a known tax rate. Fill in any two cells and it will calculate the empty one. Tax is in %. So for example for GST in Canada you would enter 5, not 0.05 or 1.05.
The source is not included for this one because VB.net is a bit messy. -
Paint Methods
DownloadExcuse the messy interface of this program and you'll find some pretty quick draw methods implemented in a language not known for its speed. I wrote functions to draw images and parametric shapes in real time, including photoshop quality blending, all in a Visual Basic program.
Notes:
Left click paints an image
Right click paints a circle controlled by the parameters available
Both are affected by the blend selection
The button bounces an image around, other draw functions won't work while this is going on.
The program may need Windows XP compatibility mode enabled: it is after all written in VB6! -
Particl Puzzl
DownloadThis is a little prototype of an idea I had for a puzzle game where the player controls a "grabber" that pulls puzzle pieces into the play area. The puzzle pieces themselves would then interact with each other according to physics and certain particular interactions (eg. some pull other pieces together, others push them away, etc). Certain interactions would eliminate the puzzle pieces (In the prototype they explode when there are enough of the same colour in a small enough area except for special pieces like black, white, and purple), and the game is over when a certain limit is reached on the number of pieces in play.
So in short, the player tries to move the grabber to get the right pieces into play so that the pieces will explode before the piece limit is reached.
It's much simpler to play than to explain, and a bit simplistic in this prototype, but a bit hypnotic too.
Different colours are worth different point values.
I used HGE for the DirectX interface.