Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
Outrageous programming - Gif Chess
Old 01-15-2009, 09:26 PM Outrageous programming - Gif Chess
Banned

Posts: 923
Name: Geoff Vader
Location: In my dreams
Trades: 0
For anyone who knows perl and what gd is, this'll outrage you! I'm going to write an entire chess game application inside a perl script with a single gif output

So in essence the entire application of the chess game will be "inside" a gif, out there on the web

I'm going to use it to create my non-death chess version and see if it can work and become a working version of chess.

A game in a gif. I can make TONNES of gif games. So they don't have fluid motion, but they do have strategy! Brilliant.

Java will allow me to make games with fluid motion, of course.

The chess application would take about a day to write, I reckon. It's pretty simple stuff. Very few rules and pieces. So maybe a quarter of a day. Easy work. (But i've taken some advice from some perl wizards and I'm going to make this project my first proper oop perl... so it'll take a month or more instead... but don't worry, i'll bring it here... all opensource. practise for my future opensource projects, eg a.i.)

Gif hangman would be easy. And so many gif games. Interesting new game concept or what? Low-memory games. Low bandwidth games.

Last edited by witnesstheday; 01-17-2009 at 05:02 AM..
witnesstheday is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-17-2009, 09:28 AM Re: Outrageous programming - Gif Chess
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
When you're done with it, I'll be happy to beat you at your own game.
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 01-17-2009, 01:03 PM Re: Outrageous programming - Gif Chess
AD7863's Avatar
Major Geek

Posts: 435
Name: Artful Dodger
Location: England, UK
Trades: 0
I'm quite good at chess aswell. I play on chess.com atm sometimes.
__________________

Please login or register to view this content. Registration is FREE
AD7863 is offline
Reply With Quote
View Public Profile Visit AD7863's homepage!
 
Old 01-17-2009, 01:39 PM Re: Outrageous programming - Gif Chess
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
I'm a long-term ICC member, and though my play has slowed recently, I'm still pretty strong compared to most players.
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 01-17-2009, 01:47 PM Re: Outrageous programming - Gif Chess
Decaf's Avatar
Ultra Talker

Posts: 489
Name: Adam
Trades: 0
Do it!!
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Decaf is offline
Reply With Quote
View Public Profile Visit Decaf's homepage!
 
Old 01-18-2009, 01:12 PM Re: Outrageous programming - Gif Chess
Banned

Posts: 923
Name: Geoff Vader
Location: In my dreams
Trades: 0
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

Last edited by witnesstheday; 01-18-2009 at 01:55 PM..
witnesstheday is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Outrageous programming - Gif Chess
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.10754 seconds with 12 queries