Monthly archive: May, 2007

Composition with Blue and Grey

An simple abstract composition, designed for use as a wallpaper. To an extent, Mondrian-esque (but not really).

Composition with Blue and Grey

Download

Categories: Design & graphics, Projects » Graphics, Projects » Graphics » Miscellaneous graphics and Projects

maestro: /me is about to post some mostly decontextualised code on the blag.

function unitstats($unit) {
/* gets the stats of a particular unit */
$stats = array();
if ($unit == 'l') {
$stats['atk'] = 24;
$stats['def'] = 18;
} elseif ($unit == ‘e’) {
$stats['atk'] = 4;
$stats['def'] = 2;
} elseif ($unit == ’s’) {
$stats['atk'] = 12;
$stats['def'] = 4;
} elseif ($unit == ‘r’) {
$stats['atk'] = 2;
$stats['def'] = 4;
} elseif ($unit == ‘o’) {
$stats['atk'] = 12;
$stats['def'] = 6;
} elseif ($unit == ‘a’) {
$stats['atk'] = 12;
$stats['def'] = 4;
}
return $stats;
}


$avb = round($stats1['atk'] / $stats2['def']);
$bva = round($stats2['atk'] / $stats1['def']);
$health1 -= $bva;
$health2 -= $avb;

Categories: Projects » Games » Authority and Programming » PHP
Authority is an online strategy game with units and stuff, currently in development.

bkgset updated, so it’s better than ever

I’ve updated bkgset, yay. It is now better at handling different kinds of images, including ones that use transparency. The readme file is more useful. Most importantly, it also now able to resize the images to fit the resolution properly–unlike the Windows ’stretch’ option, which disregards the aspect ratio and therefore often distorts the image. This is a very useful feature (for me, at least) that I’ve been meaning to add for a while.

I imagine this wouldn’t work in Windows Vista; if you’ve got Vista, give bkgset a try (making sure you keep the windowsxp variable set to True) and let me know what happens. Also, if you happen to have a pre-XP version of Windows, it’d be nice to get some feedback on whether bkgset still works on it. All that said, I think I’m the only person who uses bkgset. Let me know if you do.

Categories: Programming » Python and Projects » Applications » bkgset
bkgset is a tool for randomly setting Windows wallpapers.