DiVision projects
Everything that was not a game. Our school ran a programming contest every winter, and for a few years it was my main reason to write code. In January 1998 I brought four programs and got the prize for the most original one; for the 1999 contest I had ten; in 2001 I took first place in three categories and the audience award. Most of all I made what I needed myself: a file manager, a shell, a vocabulary trainer, a metronome.
Programs
Synthesizer 1998
For the first contest: the keyboard becomes a piano from 65 to 3,120 Hz on the PC speaker, with three play styles, recording with note lengths, replay, a note graph and saving to a file.
File Commander 1997–1999
It began in December 1997 as AndreyCommander, a menu with a calculator, a siren and a piano, and grew into my own two-panel Norton Commander, version 1.80 by November 1999: its own archive format FCA (run-length encoding plus a password), copying and moving whole directory trees, opening files by extension, a resident clock, and three ways to delete — erase, move to a recycle bin, or “destroy”, which first overwrites the file.
Buttons’99 1998–1999
My own Windows: about 2,200 lines of Pascal with a taskbar, windows built from buttons wired to procedures, a scientific calculator with four memory registers and a graph plotter, a Paint, colour settings saved to a file, and a synthesizer with an on-screen keyboard that records a tune with note lengths. In the video it plays a tune I saved in March 1999.
WRD 1999
A vocabulary trainer I used myself: a dictionary with any number of columns, here German irregular verbs (Russian, infinitive, Präteritum, Perfekt), sorting by column, search, and a test that shows one column and asks you to type the others. In the video: two test rounds, the second with a deliberate mistake.
Help Explorer 2000
For the help screens of my games I wrote a small browser and a markup language for it, HHL, “a simplified HTML”: [Label] marks a heading, <Label> or <Label:file> is a link, {picture} shows an image, * switches the colour, and a link can also start a program and come back to the page when it exits. The Space War manual was written in it. In the same months I made my own sprite format, shown below: a sprite stored as runs of opaque pixels, drawn with plain memory copies and no transparency checks — the trick behind the speed of Space War 2K and Doom RF.
Potok 2001
Two weeks before the Bred generator, another way to write nonsense: by rules. Each word list is a text file, and a line can refer to other lists, %teoria to the theories, %comp to the computers, %stupid to phrases like “did anyone understand what I wrote”. The program expands the references recursively and fixes the capital letters, and out comes pseudo-scientific Russian prose about Newton’s laws and IBM-compatible computers. In today’s terms, a generator over a context-free grammar. Below are two rules and what they produced (in Russian, with the original 2001 typos).
Правила (FRAZA.TXT): %dla мы должны изучить %teoria. %first %comp, так как %teoria - %bad. Результат: Для поднятия реакции мы должны изучить эффект сверхпроводимости. Кто-нибудь понял, что я написал:) из ранее известного свойства мы видим: теория отношений в пространстве оказался верным :) Теорема Пифагора, понимаешь ли, доказал всю свою силу потому что она нулевой...
Bred generator 2001
A nonsense generator, written in June 2001: it reads books and writes new text one letter at a time. Each next letter is taken from a place in the books where the previous six letters are the same, and every few letters it jumps to a random place. Fed with Anna Karenina and War and Peace, it writes text that sounds like Tolstoy and means nothing. In today’s terms, a character-level Markov chain of order 6, a distant ancestor of language models. Below is a sample it produced.
Дай вам Бог, которые не могу пить, - грустно и старалась угадать стала на лестницу. - Пускай посмотрит, т. е. один и о чем же порядком. Няня-Савишна, почему он сделала партию крокета. Стой, канальи! - Да, вот она, - сказал Иогеля, боком платье, но не верить мне денег нет. - решил князь Андрей Болконская приехал сделать.
Ticker 2001–2002
A metronome in Delphi for my guitar practice: pick a sound, set the tempo in milliseconds or in beats per second, minute or hour, and all four fields stay in sync.
F(x) 2002
A function plotter in Delphi that understands formulas with sin, ln, log, integer and fractional parts — and derivatives: a' differentiates symbolically, by rewriting the formula string with the product and quotient rules. Hover to see f(x) and f'(x), drag to pan, wheel to zoom.
Original source code
procedure convert;
var i,j,k:longint;
f:word;
r:rec;
b:^tar;
begin
j:=0;
spr.maxa:=0;
new(b);
spr.maxsp:=0; f:=0;
for j:=0 to my-1 do
begin
i:=0;
while i<mx do
begin
if bmp^[j*mx+i]<>black then
begin
k:=i;
while (bmp^[j*mx+k]<>black)and(k<my) do inc(k);
r[spr.maxsp].x:=i;
r[spr.maxsp].y:=my-j-1;
r[spr.maxsp].l:=k-i;
r[spr.maxsp].w:=f;
move(bmp^[j*mx+i],b^[f],r[spr.maxsp].l);
inc(f,r[spr.maxsp].l);
inc(spr.maxsp);
i:=k;
end;
inc(i);
end;
end;
spr.maxa:=f;
getmem(spr.a,spr.maxa);
move(b^,spr.a^,spr.maxa);
getmem(spr.sp,5*spr.maxsp);
move(r,spr.sp^,5*spr.maxsp);
dispose(b);
end;
procedure putsprite(dx,dy:integer);
{Эффективна, если много прзрачных точек}
var i:integer;
r:tr;
begin
for i:=0 to spr.maxsp-1 do
begin
r:=spr.sp^[i];
move(spr.a^[r.w],scr^[(dx+r.x)+(dy+r.y)*320],r.l);
end;
end; July 2000. convert cuts every row of a BMP into runs of non-black pixels and keeps x, y, length and an offset into one packed array; putsprite is then just one move per run. The comment says it: “efficient when there are many transparent pixels”.