Guys and girls, do come play me at normal chess (but I like 1 move per 14 days, if you're gonna challenge me) - i'm at the said chess.com site too, you can find me on my realname (no spaces).
I've been thinking more about gd chess, and messin around with gd to warm up, and I have realised that a vital part of my new game environment (i'm going to make an entire game development suite for gd! here come the gif games) is the good old "imagemap"! Yep, that forgotten piece of technology no one give's a rat's bottom about these days - it'll be absolutely vital to the playing of my games! They have to have image maps because I need to know exactly what part of a gif a person clicked for me to respond correctly! Not bad, eh? Some pretty tricky i/o management, though. I mean I can't put a url on every pixel. Well, theoretically yes, but hey.
Anyway, slow and steady... that's the sailor's way (well no, the sailor's way is: round the world and home again).
this is where i'll start working - it may come alive with experimentation soon:
http://www.ukusers4u.com/cgi-bin/gd1.cgi
the code's here:
Code:
#!/usr/bin/perl
# This creates a Web GIF image on the fly
use GD;
$horizontal=1000;
print "Content-type: image/gif\n\n";
# create a new image
$im = new GD::Image($horizontal,1000);
# allocate some colors
$white = $im->colorAllocate(255,255,255);
$black = $im->colorAllocate(0,0,0);
$red = $im->colorAllocate(255,0,0);
$blue = $im->colorAllocate(0,0,255);
# make the background transparent and interlaced
$im->transparent($white);
$im->interlaced('true');
# Put a black frame around the picture
$im->rectangle(0,0,$horizontal-1,999,$black);
$im->rectangle(0,0,100,200,$blue);
$im->rectangle(300,300,500,400,$red);
$im->rectangle(500,100,550,150,$blue);
#$im->rectangle(horizontaltop,verticaltop,horizontalbottom,verticalbottom,col);
# Draw a blue oval
# $im->arc(50,50,95,75,0,360,$blue);
# And fill it with red
# $im->fill(50,50,$red);
#$im->rectangle(40,40,50,50,$blue);
# Convert the image to GIF and print it on standard output
print $im->gif;
NB I'm pretty sure that IFRAMES will be used to house the game space, in the final cut